Published v0.8.0.0.
2 using System.Collections.Generic;
5 using System.Threading.Tasks;
7 using SharpLib.Display;
9 namespace SharpDisplayManager
12 /// A UI thread copy of a client relevant data.
13 /// Keeping this copy in the UI thread helps us deal with threading issues.
15 public class ClientData
17 public ClientData(string aSessionId, ICallback aCallback)
19 SessionId = aSessionId;
21 Fields = new List<DataField>();
22 Layout = new TableLayout(1, 2); //Default to one column and two rows
27 public string SessionId { get; set; }
28 public string Name { get; set; }
29 public List<DataField> Fields { get; set; }
30 public TableLayout Layout { get; set; }
31 public ICallback Callback { get; set; }
33 public bool HasNewLayout { get; set; }
36 public DateTime LastSwitchTime { get; set; }
39 /// Look up the corresponding field in our field collection.
41 /// <param name="aField"></param>
42 /// <returns></returns>
43 public DataField FindSameFieldAs(DataField aField)
45 foreach (DataField field in Fields)
47 if (field.IsSameAs(aField))
58 /// Look up the corresponding field in our field collection.
60 /// <param name="aField"></param>
61 /// <returns></returns>
62 public int FindSameFieldIndex(DataField aField)
65 foreach (DataField field in Fields)
67 if (field.IsSameAs(aField))