Client/Client.cs
changeset 32 4c416d2878dd
parent 31 f19b04646b6a
child 43 86aad774b532
     1.1 --- a/Client/Client.cs	Fri Aug 15 11:11:17 2014 +0200
     1.2 +++ b/Client/Client.cs	Fri Aug 15 13:26:38 2014 +0200
     1.3 @@ -33,7 +33,7 @@
     1.4          }
     1.5  
     1.6  
     1.7 -        public void OnServerClosing()
     1.8 +        public void OnCloseOrder()
     1.9          {
    1.10              //Debug.Assert(Thread.CurrentThread.IsThreadPoolThread);
    1.11              //Trace.WriteLine("Callback thread = " + Thread.CurrentThread.ManagedThreadId);
    1.12 @@ -64,16 +64,10 @@
    1.13              : base(callbackInstance, new NetTcpBinding(SecurityMode.None, true), new EndpointAddress("net.tcp://localhost:8001/DisplayService"))
    1.14          { }
    1.15  
    1.16 -        public void Connect(string aClientName)
    1.17 +        public void SetName(string aClientName)
    1.18          {
    1.19              Name = aClientName;
    1.20 -            Channel.Connect(aClientName);
    1.21 -        }
    1.22 -
    1.23 -        public void Disconnect()
    1.24 -        {
    1.25 -            Channel.Disconnect(Name);
    1.26 -            Name = "";
    1.27 +            Channel.SetName(aClientName);
    1.28          }
    1.29  
    1.30          public void SetText(int aLineIndex, string aText)
    1.31 @@ -81,13 +75,14 @@
    1.32              Channel.SetText(aLineIndex, aText);
    1.33          }
    1.34  
    1.35 -
    1.36          public void SetTexts(System.Collections.Generic.IList<string> aTexts)
    1.37          {
    1.38              Channel.SetTexts(aTexts);
    1.39          }
    1.40  
    1.41 -        
    1.42 -
    1.43 +        public int ClientCount()
    1.44 +        {
    1.45 +            return Channel.ClientCount();
    1.46 +        }
    1.47      }
    1.48  }