Exemplo n.º 1
0
        private void toolStripMenuItemEMode_Click(object sender, EventArgs e)
        {
            FormPassword formPassword = new FormPassword();

            try
            {
                formPassword.MinimizeBox = false;
                formPassword.MaximizeBox = false;
                formPassword.ShowDialog();
                if (formPassword.Password == "cypress")
                {
                    passwordConfirmed = true;
                    toolStripMenuItemEMode.Checked = true;
                    toolStripMenuItemPMode.Checked = false;
                }
                else
                {
                    passwordConfirmed = false;
                    toolStripMenuItemEMode.Checked = false;
                    toolStripMenuItemPMode.Checked = true;

                    MessageBox.Show("Wrong Password!\n Please contact your test engineer ", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("ERROR: " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Log.error(ex.Message);
            }
            finally
            {
                formPassword.Dispose();
            }
        }
Exemplo n.º 2
0
        private void toolStripMenuItemEMode_Click(object sender, EventArgs e)
        {
            FormPassword formPassword = new FormPassword();
            try
            {
                formPassword.MinimizeBox = false;
                formPassword.MaximizeBox = false;
                formPassword.ShowDialog();
                if (formPassword.Password == "cypress")
                {
                    passwordConfirmed = true;
                    toolStripMenuItemEMode.Checked = true;
                    toolStripMenuItemPMode.Checked = false;

                }
                else
                {
                    passwordConfirmed = false;
                    toolStripMenuItemEMode.Checked = false;
                    toolStripMenuItemPMode.Checked = true;

                    MessageBox.Show("Wrong Password!\n Please contact your test engineer ", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("ERROR: " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Log.error(ex.Message);
            }
            finally
            {
                formPassword.Dispose();
            }
        }