Example #1
0
        void btnDisConnection_Click(object sender, RoutedEventArgs e)
        {
            client.CloseAsync();
            client = null;

            this.btnDisConnection.IsEnabled = false;
            this.btnConnection.IsEnabled    = true;
        }
Example #2
0
 /// <summary>
 /// 连接聊天服务器
 /// </summary>
 public void ConnectionChatService()
 {
     if (null == client)
     {
         var end     = new EndpointAddress("http://localhost:6667/PlatformChat.svc");
         var binding = new PollingDuplexHttpBinding(PollingDuplexMode.MultipleMessagesPerPoll);
         client = new PlatformChatClient(new InstanceContext(this), binding, end);
     }
 }
Example #3
0
 static void Connection()
 {
     client = new PlatformChatClient(new InstanceContext(InstanceContext), binding, end);
 }
Example #4
0
 public void Initialize(PlatformChatClient proxy)
 {
     this.proxy = proxy;
 }