Exemplo n.º 1
0
        public void PromptForPassword()
        {
            frmTerminalInputBox inputBox = new frmTerminalInputBox("Enter the password:"******"Password", true);

            if (inputBox.ShowDialog() == DialogResult.OK)
            {
                TN3270.SetText(inputBox.txtInput.Text);
                TN3270.WaitForTextOnScreen(500, inputBox.txtInput.Text);
                Redraw();
            }
        }
Exemplo n.º 2
0
        public void PromptForUsername()
        {
            frmTerminalInputBox inputBox = new frmTerminalInputBox("Enter the username:"******"Username");

            if (inputBox.ShowDialog() == DialogResult.OK)
            {
                TN3270.SetText(inputBox.txtInput.Text);
                TN3270.WaitForTextOnScreen(500, inputBox.txtInput.Text);
                Redraw();
            }
        }
Exemplo n.º 3
0
        public void PromptForPassword()
        {
            frmTerminalInputBox inputBox = new frmTerminalInputBox("Enter the password:"******"Password", true);

            if (inputBox.ShowDialog() == DialogResult.OK)
            {
                TN3270.SetText(inputBox.txtInput.Text);
                int result = TN3270.WaitForTextOnScreen(5000, inputBox.txtInput.Text);

                if (result == -1)
                {
                    throw new TimeoutException($"Unable to find the password text within the allotted time of 5 seconds.");
                }

                Redraw();
            }
        }
Exemplo n.º 4
0
        public void PromptForUsername()
        {
            frmTerminalInputBox inputBox = new frmTerminalInputBox("Enter the username:"******"Username");

            if (inputBox.ShowDialog() == DialogResult.OK)
            {
                TN3270.SetText(inputBox.txtInput.Text);
                int result = TN3270.WaitForTextOnScreen(5000, inputBox.txtInput.Text);

                if (result == -1)
                {
                    throw new TimeoutException($"Unable to find '{inputBox.txtInput.Text}' within the allotted time of 5 seconds.");
                }

                Redraw();
            }
        }