Server/Session.cs
changeset 62 ac698f4e1b36
parent 56 e86d84480b32
child 65 464486b81635
     1.1 --- a/Server/Session.cs	Mon Sep 22 13:21:00 2014 +0200
     1.2 +++ b/Server/Session.cs	Mon Sep 22 16:04:26 2014 +0200
     1.3 @@ -13,9 +13,9 @@
     1.4      /// Implement our display services.
     1.5      /// Each client connection has such a session object server side.
     1.6      /// </summary>
     1.7 -    [ServiceBehavior(   
     1.8 +    [ServiceBehavior(
     1.9                          ConcurrencyMode = ConcurrencyMode.Multiple,
    1.10 -                        InstanceContextMode = InstanceContextMode.PerSession                       
    1.11 +                        InstanceContextMode = InstanceContextMode.PerSession
    1.12                      )]
    1.13      class Session : IService, IDisposable
    1.14      {
    1.15 @@ -38,18 +38,6 @@
    1.16              Trace.TraceInformation("Server session closing.");
    1.17              SharpDisplayManager.Program.iMainForm.RemoveClientThreadSafe(SessionId);
    1.18          }
    1.19 -        
    1.20 -        //From IDisplayService
    1.21 -        public void SetTexts(System.Collections.Generic.IList<TextField> aTextFields)
    1.22 -        {
    1.23 -            SharpDisplayManager.Program.iMainForm.SetTextsThreadSafe(SessionId, aTextFields);
    1.24 -        }
    1.25 -
    1.26 -        //
    1.27 -        public void SetText(TextField aTextField)
    1.28 -        {
    1.29 -            SharpDisplayManager.Program.iMainForm.SetTextThreadSafe(SessionId, aTextField);
    1.30 -        }
    1.31  
    1.32          //
    1.33          public void SetName(string aClientName)
    1.34 @@ -66,13 +54,31 @@
    1.35              //callback.OnConnected();
    1.36          }
    1.37  
    1.38 +        public void SetLayout(TableLayout aLayout)
    1.39 +        {
    1.40 +            SharpDisplayManager.Program.iMainForm.SetClientLayoutThreadSafe(SessionId, aLayout);
    1.41 +        }
    1.42 +
    1.43 +        //From IDisplayService
    1.44 +        public void SetTexts(System.Collections.Generic.IList<TextField> aTextFields)
    1.45 +        {
    1.46 +            SharpDisplayManager.Program.iMainForm.SetTextsThreadSafe(SessionId, aTextFields);
    1.47 +        }
    1.48 +
    1.49 +        //
    1.50 +        public void SetText(TextField aTextField)
    1.51 +        {
    1.52 +            SharpDisplayManager.Program.iMainForm.SetTextThreadSafe(SessionId, aTextField);
    1.53 +        }
    1.54 +
    1.55 +
    1.56          ///
    1.57          public int ClientCount()
    1.58          {
    1.59              return SharpDisplayManager.Program.iMainForm.iClients.Count;
    1.60          }
    1.61  
    1.62 -        
    1.63 +
    1.64  
    1.65      }
    1.66