Exemplo n.º 1
0
 public void SignIn()
 {
     SignedIn = SignedOut = false;
     Client.Disconnect(); //This function should not throw exception
     Client.Connect();
     Assert.AreEqual(true, SignedIn);
     Thread.Sleep(10);
     Client.Disconnect();
     Assert.AreEqual(true, SignedOut);
 }
Exemplo n.º 2
0
 private void btDisconnectApp_Click(object sender, EventArgs e)
 {
     try
     {
         appClient.Disconnect();
     }
     catch (Exception ex) { HandleException(ex); }
 }
Exemplo n.º 3
0
        private void BtConnect_Click(object sender, EventArgs e)
        {
            if (Client.Connected)
            {
                Client.Disconnect();
            }
            else
            {
                Client.HostName = TxtHostName.Text;
                Client.Port     = Convert.ToInt32(TxtPort.Text);
                Client.Connect();

                CbFunctions.Items.Clear();
                CbFunctions.Items.Add("(NONE)");
                CbFunctions.Items.AddRange(Client.Commands.ToArray());
                CbFunctions.SelectedIndex = 0;
            }
        }