Example #1
0
        private void buttonLoginAsViewer_Click(object sender, EventArgs e)
        {
            if (m_CurrentlySelectedRemoteSystem == null)
            {
                textBoxSelectedSystem.ForeColor = Color.Red;
                textBoxSelectedSystem.Text      = "Please select a remote system to log into first";
                System.Media.SystemSounds.Beep.Play();
                return;
            }

            if (m_PWPrompt != null)
            {
                if (m_PWPrompt.Visible)
                {
                    return;
                }
            }

            m_PWPrompt = new LoginPWPrompt("Login as Viewer");

            m_PWPrompt.StartPosition = FormStartPosition.CenterScreen;

            m_PWPrompt.OnPasswordEntered -= m_CurrentlySelectedRemoteSystem.LoginAsAdmin;

            m_PWPrompt.OnPasswordEntered += m_CurrentlySelectedRemoteSystem.LoginAsViewer;
            m_PWPrompt.Show();
        }
Example #2
0
 void ClosePWPrompt()
 {
     if (m_PWPrompt.InvokeRequired)
     {
         this.BeginInvoke((MethodInvoker) delegate { this.ClosePWPrompt(); });
     }
     else
     {
         m_PWPrompt.Dispose();
         m_PWPrompt = null;
     }
 }
Example #3
0
        void ClosePWPrompt()
        {
            if (m_PWPrompt == null) return;

            if (m_PWPrompt.InvokeRequired)
            {
                this.BeginInvoke((MethodInvoker)delegate { this.ClosePWPrompt(); });
            }
            else
            {
                m_PWPrompt.Dispose();
                m_PWPrompt = null;
            }
        }
Example #4
0
        private void buttonLoginAsViewer_Click(object sender, EventArgs e)
        {
            if (((RemoteHosts) m_AppData.CurrentlyLoggedInRemoteServer).NullHost )
            {
                textBoxSelectedSystem.ForeColor = Color.Red;
                textBoxSelectedSystem.Text = "Please select a remote system to log into first";
                System.Media.SystemSounds.Beep.Play();
                return;
            }

            if (m_PWPrompt != null)
            {
                if (m_PWPrompt.Visible) return;
            }

            m_PWPrompt = new LoginPWPrompt("Login as Viewer");

            m_PWPrompt.StartPosition = FormStartPosition.CenterScreen;

            m_PWPrompt.OnPasswordEntered -= ((RemoteHosts) m_AppData.CurrentlyLoggedInRemoteServer).LoginAsAdmin;

            m_PWPrompt.OnPasswordEntered +=  ((RemoteHosts) m_AppData.CurrentlyLoggedInRemoteServer).LoginAsViewer;
            m_PWPrompt.Show();
        }