Most basic event action manager.
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 Priority = Priorities.Default;
22 Fields = new List<DataField>();
23 Layout = new TableLayout(1, 2); //Default to one column and two rows
28 public string SessionId { get; set; }
29 public string Name { get; set; }
30 public uint Priority { get; set; }
31 public List<DataField> Fields { get; set; }
32 public TableLayout Layout { get; set; }
33 public ICallback Callback { get; set; }
35 public bool HasNewLayout { get; set; }
38 public DateTime LastSwitchTime { get; set; }
41 /// Look up the corresponding field in our field collection.
43 /// <param name="aField"></param>
44 /// <returns></returns>
45 public DataField FindSameFieldAs(DataField aField)
47 foreach (DataField field in Fields)
49 if (field.IsSameAs(aField))
60 /// Look up the corresponding field in our field collection.
62 /// <param name="aField"></param>
63 /// <returns></returns>
64 public int FindSameFieldIndex(DataField aField)
67 foreach (DataField field in Fields)
69 if (field.IsSameAs(aField))