Exemplo n.º 1
0
        //------------------------------------------------------------------------
        private void btnTest_Click(object sender, EventArgs e)
        {
            SymSession test = new SymSession();

            try
            {
                if (!test.Connect(txtIP.Text, int.Parse(txtPort.Text)))
                {
                    MessageBox.Show(test.error, "PwrIDE", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                if (!test.AIXTest(txtUser.Text, txtPass.Text))
                {
                    MessageBox.Show(test.error, "PwrIDE", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error During Login\n" + ex.Message, "PwrIDE", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            test.Disconnect();
            MessageBox.Show("Server Connected Okay!", "PwrIDE", MessageBoxButtons.OK, MessageBoxIcon.None);
        }