Client/MainForm.cs
changeset 71 f444344fc205
parent 70 dcd2bbb90d42
child 72 fd0bb39a7818
     1.1 --- a/Client/MainForm.cs	Tue Oct 14 19:32:09 2014 +0200
     1.2 +++ b/Client/MainForm.cs	Wed Oct 22 12:17:52 2014 +0200
     1.3 @@ -182,12 +182,21 @@
     1.4              iClient.SetBitmap(field);
     1.5          }
     1.6  
     1.7 -        private void buttonLayoutUpdatWithSpan_Click(object sender, EventArgs e)
     1.8 +        private void buttonBitmapLayout_Click(object sender, EventArgs e)
     1.9 +        {
    1.10 +            SetLayoutWithBitmap();
    1.11 +        }
    1.12 +
    1.13 +        /// <summary>
    1.14 +        /// Define a layout with a bitmap field on the left and two lines of text on the right.
    1.15 +        /// </summary>
    1.16 +        private void SetLayoutWithBitmap()
    1.17          {
    1.18              //Define a 2 by 2 layout
    1.19              TableLayout layout = new TableLayout(2, 2);
    1.20 -            //Second column only takes up 25%
    1.21 +            //First column only takes 25%
    1.22              layout.Columns[0].Width = 25F;
    1.23 +            //Second column takes up 75% 
    1.24              layout.Columns[1].Width = 75F;
    1.25              //Send layout to server
    1.26              iClient.SetLayout(layout);
    1.27 @@ -208,8 +217,11 @@
    1.28                  graphics.DrawLine(blackPen, x1, y2, x2, y1);
    1.29              }
    1.30  
    1.31 +            //Create a bitmap field from the bitmap we just created
    1.32              BitmapField field = new BitmapField(0, bitmap);
    1.33 +            //We want our bitmap field to span across two rows
    1.34              field.RowSpan = 2;
    1.35 +            //Send it to our server
    1.36              iClient.SetBitmap(field);
    1.37  
    1.38              //Set texts