Esempio n. 1
0
 private void closeSessionToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (_AppClient != null)
     {
         AppTestCloseForm aInput = new AppTestCloseForm();
         aInput.Text = "Close Session";
         if (aInput.ShowDialog() == DialogResult.OK)
         {
             _AppClient.CloseSession(_DefaultReceiver, _SessionId, (int)Enum.Parse(typeof(ACloseMode), aInput.CloseMode));
         }
     }
     else
     {
         uStatusError.Text = "Close session failed: Session not opened.";
     }
 }
Esempio n. 2
0
 private void disconnectToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (_AppClient != null)
     {
         AppTestCloseForm aInput = new AppTestCloseForm();
         aInput.Text = "Close Connection";
         if (aInput.ShowDialog() == DialogResult.OK)
         {
             _AppClient.CloseConnection(_DefaultReceiver, 0, (ACloseMode)Enum.Parse(typeof(ACloseMode), aInput.CloseMode));
         }
     }
     else
     {
         uStatusError.Text = "Disconnect failed: Not connected.";
     }
 }