Esempio n. 1
0
        void DisconnectUser()
        {
            if (isConnected)
            {
                client.Disconnect(clientID);

                client.UserConnection();

                client      = null;
                isConnected = false;

                tbUserName.IsEnabled = true;
                bCall.IsEnabled      = false;

                bConnection.Content = "Connect";
            }
        }
Esempio n. 2
0
        void ConnectUser()
        {
            if (!isConnected)
            {
                client = new ServiceMessengerClient(new InstanceContext(this), "netTcpBinding");

                clientID = client.Connect(tbUserName.Text);

                //client = new ServiceMessengerClient(new InstanceContext(this), "UdpBinding_IServiceMessenger");

                //clientID = client.Connect(tbUserName.Text);

                client.UserConnection();

                tbUserName.IsEnabled = false;
                bCall.IsEnabled      = true;

                bConnection.Content = "Disconnect";

                isConnected = true;
            }
        }