Example #1
0
        private void endSessionToolStripMenuItem_Click(object sender, EventArgs e)
        {
            statusLabel.Text = "Connecting";
            Refresh();

            try {
                client.EndSession();

                statusLabel.Text = "Ready";
            }
            catch (Exception error) {
                statusLabel.Text = "Error";

                MessageBox.Show(error.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally {
                client = null;
            }

            SetMenuState();
        }
Example #2
0
        private void startSessionToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (startSessionForm.ShowDialog(this) == DialogResult.OK)
            {
                WebInterfaceSoapClient temp = new WebInterfaceSoapClient();

                statusLabel.Text = "Connecting";
                Refresh();

                try {
                    if (temp.StartSession(startSessionForm.Username, startSessionForm.Password))
                    {
                        client = temp;
                    }

                    statusLabel.Text = "Ready";
                }
                catch (Exception error) {
                    statusLabel.Text = "Error";
                    MessageBox.Show(error.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            SetMenuState();
        }