Server/MainForm.cs
changeset 79 76564df23849
parent 76 906d88eb53fb
child 88 4f09ae97cdcc
     1.1 --- a/Server/MainForm.cs	Tue Dec 16 13:24:12 2014 +0100
     1.2 +++ b/Server/MainForm.cs	Tue Dec 16 16:35:55 2014 +0100
     1.3 @@ -25,9 +25,9 @@
     1.4      //Delegates are used for our thread safe method
     1.5      public delegate void AddClientDelegate(string aSessionId, ICallback aCallback);
     1.6      public delegate void RemoveClientDelegate(string aSessionId);
     1.7 -    public delegate void SetTextDelegate(string SessionId, DataField aField);
     1.8 +    public delegate void SetFieldDelegate(string SessionId, DataField aField);
     1.9 +    public delegate void SetFieldsDelegate(string SessionId, System.Collections.Generic.IList<DataField> aFields);
    1.10      public delegate void SetLayoutDelegate(string SessionId, TableLayout aLayout);
    1.11 -    public delegate void SetFieldsDelegate(string SessionId, System.Collections.Generic.IList<DataField> aFields);
    1.12      public delegate void SetClientNameDelegate(string aSessionId, string aName);
    1.13  
    1.14  
    1.15 @@ -807,7 +807,7 @@
    1.16              if (this.InvokeRequired)
    1.17              {
    1.18                  //Not in the proper thread, invoke ourselves
    1.19 -                SetTextDelegate d = new SetTextDelegate(SetClientFieldThreadSafe);
    1.20 +                SetFieldDelegate d = new SetFieldDelegate(SetClientFieldThreadSafe);
    1.21                  this.Invoke(d, new object[] { aSessionId, aField });
    1.22              }
    1.23              else
    1.24 @@ -819,12 +819,12 @@
    1.25          }
    1.26  
    1.27          /// <summary>
    1.28 -        /// 
    1.29 +        ///
    1.30          /// </summary>
    1.31          /// <param name="aSessionId"></param>
    1.32          /// <param name="aField"></param>
    1.33          private void SetClientField(string aSessionId, DataField aField)
    1.34 -        {            
    1.35 +        {
    1.36              SetCurrentClient(aSessionId);
    1.37              ClientData client = iClients[aSessionId];
    1.38              if (client != null)
    1.39 @@ -845,7 +845,7 @@
    1.40                      client.Fields[aField.Index] = aField;
    1.41                      //
    1.42                      if (aField.IsText && tableLayoutPanel.Controls[aField.Index] is MarqueeLabel)
    1.43 -                    {                        
    1.44 +                    {
    1.45                          //Text field control already in place, just change the text
    1.46                          MarqueeLabel label = (MarqueeLabel)tableLayoutPanel.Controls[aField.Index];
    1.47                          somethingChanged = (label.Text != aField.Text || label.TextAlign != aField.Alignment);