1.1 --- a/Interface/Interface.cs Mon Sep 22 16:04:26 2014 +0200
1.2 +++ b/Interface/Interface.cs Mon Sep 22 17:23:35 2014 +0200
1.3 @@ -11,10 +11,14 @@
1.4 using System.Collections;
1.5 using System.Drawing;
1.6 using System.Runtime.Serialization;
1.7 +using System.Windows.Forms;
1.8
1.9
1.10 namespace SharpDisplay
1.11 {
1.12 +
1.13 +
1.14 +
1.15 /// <summary>
1.16 /// TextField can be send to our server to be displayed on the screen.
1.17 /// </summary>
1.18 @@ -23,25 +27,36 @@
1.19 {
1.20 public TableLayout()
1.21 {
1.22 - ColumnCount = 0;
1.23 - RowCount = 0;
1.24 - //Alignment = ContentAlignment.MiddleLeft;
1.25 + Columns = new List<ColumnStyle>();
1.26 + Rows = new List<RowStyle>();
1.27 + Cells = new List<DataField>();
1.28 }
1.29
1.30 public TableLayout(int aColumnCount, int aRowCount)
1.31 {
1.32 - ColumnCount = aColumnCount;
1.33 - RowCount = aRowCount;
1.34 + Columns = new List<ColumnStyle>();
1.35 + Rows = new List<RowStyle>();
1.36 +
1.37 + for (int i = 0; i < aColumnCount; i++)
1.38 + {
1.39 + Columns.Add(new ColumnStyle(SizeType.Percent, 100 / aColumnCount));
1.40 + }
1.41 +
1.42 + for (int i = 0; i < aRowCount; i++)
1.43 + {
1.44 + Rows.Add(new RowStyle(SizeType.Percent, 100 / aRowCount));
1.45 + }
1.46 }
1.47
1.48 [DataMember]
1.49 - public int ColumnCount { get; set; }
1.50 + public List<DataField> Cells { get; set; }
1.51
1.52 [DataMember]
1.53 - public int RowCount { get; set; }
1.54 + public List<ColumnStyle> Columns { get; set; }
1.55
1.56 [DataMember]
1.57 - public List<DataField> Cells { get; set; }
1.58 + public List<RowStyle> Rows { get; set; }
1.59 +
1.60 }
1.61
1.62 /// <summary>