1.1 --- a/Client/MainForm.cs Mon Oct 13 21:42:42 2014 +0200
1.2 +++ b/Client/MainForm.cs Tue Oct 14 19:32:09 2014 +0200
1.3 @@ -177,7 +177,48 @@
1.4 graphics.DrawLine(blackPen, x1, y2, x2, y1);
1.5 }
1.6
1.7 - iClient.SetBitmap(new BitmapField(0, bitmap));
1.8 + BitmapField field = new BitmapField(0, bitmap);
1.9 + field.ColumnSpan = 2;
1.10 + iClient.SetBitmap(field);
1.11 + }
1.12 +
1.13 + private void buttonLayoutUpdatWithSpan_Click(object sender, EventArgs e)
1.14 + {
1.15 + //Define a 2 by 2 layout
1.16 + TableLayout layout = new TableLayout(2, 2);
1.17 + //Second column only takes up 25%
1.18 + layout.Columns[0].Width = 25F;
1.19 + layout.Columns[1].Width = 75F;
1.20 + //Send layout to server
1.21 + iClient.SetLayout(layout);
1.22 +
1.23 + //Set a bitmap for our first field
1.24 + int x1 = 0;
1.25 + int y1 = 0;
1.26 + int x2 = 64;
1.27 + int y2 = 64;
1.28 +
1.29 + Bitmap bitmap = new Bitmap(x2, y2);
1.30 + Pen blackPen = new Pen(Color.Black, 3);
1.31 +
1.32 + // Draw line to screen.
1.33 + using (var graphics = Graphics.FromImage(bitmap))
1.34 + {
1.35 + graphics.DrawLine(blackPen, x1, y1, x2, y2);
1.36 + graphics.DrawLine(blackPen, x1, y2, x2, y1);
1.37 + }
1.38 +
1.39 + BitmapField field = new BitmapField(0, bitmap);
1.40 + field.RowSpan = 2;
1.41 + iClient.SetBitmap(field);
1.42 +
1.43 + //Set texts
1.44 + iClient.SetTexts(new TextField[]
1.45 + {
1.46 + new TextField(1, textBoxTop.Text, Alignment),
1.47 + new TextField(2, textBoxBottom.Text, Alignment)
1.48 + });
1.49 +
1.50 }
1.51 }
1.52 }