# HG changeset patch # User StephaneLenclud # Date 1432635835 -7200 # Node ID 426cc984fd180aaa48d4e6e71ef140a70c450312 # Parent 8badd89fb78ca801593b0dafd1780f424d4b8698 Documentation and minor clean-up. diff -r 8badd89fb78c -r 426cc984fd18 Client/Client.cs --- a/Client/Client.cs Wed May 06 22:07:32 2015 +0200 +++ b/Client/Client.cs Tue May 26 12:23:55 2015 +0200 @@ -31,7 +31,7 @@ namespace SharpDisplayClient { /// - /// + /// Client side Sharp Display callback implementation. /// [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple)] public class Callback : ICallback, IDisposable @@ -43,6 +43,9 @@ MainForm = aMainForm; } + /// + /// Not used I believe. + /// public void OnConnected() { //Debug.Assert(Thread.CurrentThread.IsThreadPoolThread); @@ -71,7 +74,7 @@ /// - /// + /// Client side implementation of our Sharp Display Service. /// [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple)] public class Client : DuplexClientBase @@ -200,6 +203,12 @@ } } + /// + /// Set our client's name. + /// Client's name is typically user friendly. + /// It does not have to be unique. + /// + /// Our client name. public void SetName(string aClientName) { Name = aClientName; @@ -207,7 +216,10 @@ iClient.SetName(aClientName); } - + /// + /// Set your client fields' layout. + /// + /// The layout to apply for this client. public void SetLayout(TableLayout aLayout) { Layout = aLayout; @@ -238,7 +250,7 @@ if (!fieldFound) { - //Field not found, make to use SetFields with all your fields at least once after setting your layout. + //Field not found, make sure to use CreateFields first after setting your layout. return false; } @@ -274,7 +286,7 @@ // if (fieldFoundCount!=aFields.Count) { - //Field not found, make sure to use SetFields with all your fields at least once after setting your layout. + //Field not found, make sure to use CreateFields first after setting your layout. return false; } @@ -285,6 +297,7 @@ /// /// Use this function when creating your fields. + /// This must be done at least once after setting your layout. /// /// public void CreateFields(System.Collections.Generic.IList aFields) @@ -294,6 +307,10 @@ iClient.SetFields(aFields); } + /// + /// Provide the number of clients currently connected to our server. + /// + /// Number of clients currently connected to our server. public int ClientCount() { CheckConnection(); diff -r 8badd89fb78c -r 426cc984fd18 Interface/Interface.cs --- a/Interface/Interface.cs Wed May 06 22:07:32 2015 +0200 +++ b/Interface/Interface.cs Tue May 26 12:23:55 2015 +0200 @@ -18,6 +18,7 @@ { /// /// For client to specify a specific layout. + /// A table layout is sent from client to server and defines data fields layout on our display. /// [DataContract] public class TableLayout @@ -26,9 +27,13 @@ { Columns = new List(); Rows = new List(); - Cells = new List(); } + /// + /// Construct our table layout. + /// + /// Number of column in our table. + /// Number of rows in our table. public TableLayout(int aColumnCount, int aRowCount) { Columns = new List(); @@ -46,9 +51,6 @@ } [DataMember] - public List Cells { get; set; } - - [DataMember] public List Columns { get; set; } [DataMember] @@ -56,7 +58,8 @@ } /// - /// + /// Define a data field on our display. + /// Data field can be either text or bitmap. /// [DataContract] public class DataField diff -r 8badd89fb78c -r 426cc984fd18 Server/MainForm.Hid.cs --- a/Server/MainForm.Hid.cs Wed May 06 22:07:32 2015 +0200 +++ b/Server/MainForm.Hid.cs Tue May 26 12:23:55 2015 +0200 @@ -13,6 +13,9 @@ namespace SharpDisplayManager { + /// + /// Implement handling of HID input reports notably to be able to launch an application using the Green Start button from IR remotes. + /// [System.ComponentModel.DesignerCategory("Code")] public class MainFormHid : Form {