Exemple #1
0
        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();
            }
        }
Exemple #2
0
        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();
            }
        }
Exemple #3
0
        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();
            }
        }