Client/MainForm.cs
changeset 172 5be2191d4be3
parent 171 151e11cac3b2
child 174 f5a6cec31e81
     1.1 --- a/Client/MainForm.cs	Fri Oct 30 16:45:33 2015 +0100
     1.2 +++ b/Client/MainForm.cs	Sun Nov 22 23:46:52 2015 +0100
     1.3 @@ -42,7 +42,7 @@
     1.4          Client iClient;
     1.5  		//
     1.6          ContentAlignment Alignment;
     1.7 -        DataField iTextFieldTop;
     1.8 +        TextField iTextFieldTop;
     1.9  
    1.10  		
    1.11  		/// <summary>
    1.12 @@ -52,7 +52,7 @@
    1.13          {
    1.14              InitializeComponent();
    1.15              Alignment = ContentAlignment.MiddleLeft;
    1.16 -            iTextFieldTop = new DataField(0);
    1.17 +            iTextFieldTop = new TextField(0);
    1.18          }
    1.19  
    1.20          public void OnCloseOrder()
    1.21 @@ -212,8 +212,8 @@
    1.22  			//Set our fields
    1.23  			iClient.CreateFields(new DataField[]
    1.24              {
    1.25 -                new DataField(0, textBoxTop.Text, Alignment),
    1.26 -                new DataField(1, textBoxBottom.Text, Alignment)
    1.27 +                new TextField(0, textBoxTop.Text, Alignment),
    1.28 +                new TextField(1, textBoxBottom.Text, Alignment)
    1.29              });
    1.30  
    1.31  		}
    1.32 @@ -230,10 +230,10 @@
    1.33              //Set texts
    1.34              iClient.CreateFields(new DataField[]
    1.35              {                
    1.36 -                new DataField(0, textBoxTop.Text, Alignment),
    1.37 -                new DataField(1, textBoxBottom.Text, Alignment),
    1.38 -                new DataField(2, "Third text field", Alignment),
    1.39 -                new DataField(3, "Forth text field", Alignment)
    1.40 +                new TextField(0, textBoxTop.Text, Alignment),
    1.41 +                new TextField(1, textBoxBottom.Text, Alignment),
    1.42 +                new TextField(2, "Third text field", Alignment),
    1.43 +                new TextField(3, "Forth text field", Alignment)
    1.44              });
    1.45  
    1.46          }
    1.47 @@ -255,7 +255,7 @@
    1.48                  graphics.DrawLine(blackPen, x1, y2, x2, y1);
    1.49              }
    1.50  
    1.51 -            DataField field = new DataField(0, bitmap);
    1.52 +            DataField field = new BitmapField(0, bitmap);
    1.53              //field.ColumnSpan = 2;
    1.54              iClient.SetField(field);
    1.55          }
    1.56 @@ -296,7 +296,7 @@
    1.57              }
    1.58  
    1.59              //Create a bitmap field from the bitmap we just created
    1.60 -            DataField field = new DataField(0, bitmap);
    1.61 +            BitmapField field = new BitmapField(0, bitmap);
    1.62              //We want our bitmap field to span across two rows
    1.63              field.RowSpan = 2;
    1.64  
    1.65 @@ -304,8 +304,8 @@
    1.66              iClient.CreateFields(new DataField[]
    1.67              {
    1.68                  field,
    1.69 -                new DataField(1, textBoxTop.Text, Alignment),
    1.70 -                new DataField(2, textBoxBottom.Text, Alignment)
    1.71 +                new TextField(1, textBoxTop.Text, Alignment),
    1.72 +                new TextField(2, textBoxBottom.Text, Alignment)
    1.73              });
    1.74  
    1.75          }
    1.76 @@ -338,19 +338,19 @@
    1.77              }
    1.78  
    1.79              //Create a bitmap field from the bitmap we just created
    1.80 -            DataField indicator1 = new DataField(2, bitmap);
    1.81 +            DataField indicator1 = new BitmapField(2, bitmap);
    1.82              //Create a bitmap field from the bitmap we just created
    1.83 -            DataField indicator2 = new DataField(3, bitmap);
    1.84 +            DataField indicator2 = new BitmapField(3, bitmap);
    1.85              //Create a bitmap field from the bitmap we just created
    1.86 -            DataField indicator3 = new DataField(4, bitmap);
    1.87 +            DataField indicator3 = new BitmapField(4, bitmap);
    1.88              //Create a bitmap field from the bitmap we just created
    1.89 -            DataField indicator4 = new DataField(5, bitmap);
    1.90 +            DataField indicator4 = new BitmapField(5, bitmap);
    1.91  
    1.92              //
    1.93 -            DataField textFieldTop = new DataField(0, textBoxTop.Text, Alignment);
    1.94 +            TextField textFieldTop = new TextField(0, textBoxTop.Text, Alignment);
    1.95              textFieldTop.RowSpan = 2;
    1.96  
    1.97 -            DataField textFieldBottom = new DataField(1, textBoxBottom.Text, Alignment);
    1.98 +            TextField textFieldBottom = new TextField(1, textBoxBottom.Text, Alignment);
    1.99              textFieldBottom.RowSpan = 2;
   1.100  
   1.101  
   1.102 @@ -372,8 +372,8 @@
   1.103  
   1.104              bool res = iClient.SetFields(new DataField[]
   1.105              {
   1.106 -                new DataField(0, textBoxTop.Text, Alignment),
   1.107 -                new DataField(1, textBoxBottom.Text, Alignment)
   1.108 +                new TextField(0, textBoxTop.Text, Alignment),
   1.109 +                new TextField(1, textBoxBottom.Text, Alignment)
   1.110              });
   1.111  
   1.112              if (!res)
   1.113 @@ -385,14 +385,14 @@
   1.114  
   1.115  		private void buttonLayoutOneTextField_Click(object sender, EventArgs e)
   1.116  		{
   1.117 -			//Set one column two lines layout
   1.118 +			//Set one column one line layout
   1.119  			TableLayout layout = new TableLayout(1, 1);
   1.120  			iClient.SetLayout(layout);
   1.121  
   1.122  			//Set our fields
   1.123  			iClient.CreateFields(new DataField[]
   1.124              {
   1.125 -                new DataField(0, textBoxTop.Text, Alignment)
   1.126 +                new TextField(0, textBoxTop.Text, Alignment)
   1.127              });
   1.128  		}
   1.129      }