private void CheckServices() { if (callbackClient != null) { RefCount += 1; switch (callbackClient.State) { case System.ServiceModel.CommunicationState.Closed: RegiestServices(); break; case System.ServiceModel.CommunicationState.Faulted: callbackClient.Abort(); RegiestServices(); break; case System.ServiceModel.CommunicationState.Opened: callbackClient.LoginAsync(); break; } } if (_refdateTimer != null) { _refdateTimer.Start(); } }
private void RegiestServices() { if (services == null) services = new BasicServices(); client = services.PlatformClient; callbackClient = services.CallBackClient; if (callbackClient != null) { callbackClient.ReceiveReceived += new EventHandler<ReceiveReceivedEventArgs>(CallBackClient_ReceiveReceived); callbackClient.LoginCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(CallBackClient_LoginCompleted); callbackClient.LoginAsync(); } }
private void RegiestServices() { if (services == null) { services = new BasicServices(); } client = services.PlatformClient; callbackClient = services.CallBackClient; if (callbackClient != null) { callbackClient.ReceiveReceived += new EventHandler <ReceiveReceivedEventArgs>(CallBackClient_ReceiveReceived); callbackClient.LoginCompleted += new EventHandler <System.ComponentModel.AsyncCompletedEventArgs>(CallBackClient_LoginCompleted); callbackClient.LoginAsync(); } }