Ejemplo n.º 1
0
 void ConnectUser()
 {
     if (!isConnected)
     {
         client = new ServiceClient(new System.ServiceModel.InstanceContext(this));
         ID     = client.Connect(tbUserName.Text);
         tbUserName.IsEnabled    = false;
         bConnDisconn.Content    = "disconnect";
         isConnected             = true;
         mySolidColorBrush.Color = Color.FromArgb(255, 0, 255, 0);
         ind.Fill = mySolidColorBrush;
     }
 }
Ejemplo n.º 2
0
        void DisconnectUser()
        {
            if (isConnected)
            {
                client.Disconnect(ID);
                client = null;
                tbUserName.IsEnabled = true;
                bConnDisconn.Content = "connect";
                isConnected          = false;

                mySolidColorBrush.Color = Color.FromArgb(255, 255, 0, 0);
                ind.Fill = mySolidColorBrush;
            }
        }