コード例 #1
0
        private void Admin_Enabled_ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (this.Admin_Enabled_ToolStripMenuItem.Checked == true)
            {
                this.Admin_Enabled_ToolStripMenuItem.Checked = false;

                Admin_AllowTabSelection_ToolStripMenuItem.Visible = false;
                Admin_AllowTabSelection_ToolStripMenuItem.Checked = false;

                Admin_RealTimeResponse_ToolStripMenuItem.Visible = false;
                Admin_RealTimeResponse_ToolStripMenuItem.Checked = false;
            }
            else
            {
                PasswordForm enableAdminForm = new PasswordForm();
                enableAdminForm.ShowDialog();

                if (string.Equals(enableAdminForm.PasswordTextBox.Text, adminPassword))
                {
                    this.Admin_Enabled_ToolStripMenuItem.Checked = true;

                    Admin_AllowTabSelection_ToolStripMenuItem.Visible = true;
                    Admin_AllowTabSelection_ToolStripMenuItem.Checked = true;

                    Admin_RealTimeResponse_ToolStripMenuItem.Visible = true;
                    Admin_RealTimeResponse_ToolStripMenuItem.Checked = true;

                    //ToggleExtendedTaskTabs(TabAction.Add);
                }
            }
        }
コード例 #2
0
        void SocialExchangeForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            e.Cancel = true;

            PasswordForm closeForm = new PasswordForm();

            closeForm.ShowDialog();
            if (string.Equals(closeForm.PasswordTextBox.Text, adminPassword))
            {
                e.Cancel = false;
            }
            else
            {
                MessageBox.Show("Invalid password entered. Please try again. You will be returned to the application.", "Invalid Password", MessageBoxButtons.OK);
            }
        }
コード例 #3
0
ファイル: MainForm.cs プロジェクト: zimoo/SocialExchange2
        private void Admin_Enabled_ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if(this.Admin_Enabled_ToolStripMenuItem.Checked == true)
            {
                this.Admin_Enabled_ToolStripMenuItem.Checked = false;

                Admin_AllowTabSelection_ToolStripMenuItem.Visible = false;
                Admin_AllowTabSelection_ToolStripMenuItem.Checked = false;

                Admin_RealTimeResponse_ToolStripMenuItem.Visible = false;
                Admin_RealTimeResponse_ToolStripMenuItem.Checked = false;
            }
            else
            {
                PasswordForm enableAdminForm = new PasswordForm();
                enableAdminForm.ShowDialog();

                if (string.Equals(enableAdminForm.PasswordTextBox.Text, adminPassword))
                {
                    this.Admin_Enabled_ToolStripMenuItem.Checked = true;

                    Admin_AllowTabSelection_ToolStripMenuItem.Visible = true;
                    Admin_AllowTabSelection_ToolStripMenuItem.Checked = true;

                    Admin_RealTimeResponse_ToolStripMenuItem.Visible = true;
                    Admin_RealTimeResponse_ToolStripMenuItem.Checked = true;

                    //ToggleExtendedTaskTabs(TabAction.Add);
                }
            }
        }
コード例 #4
0
ファイル: MainForm.cs プロジェクト: zimoo/SocialExchange2
        private void SocialExchangeForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            e.Cancel = true;

            PasswordForm closeForm = new PasswordForm();
            closeForm.ShowDialog();

            if(string.Equals(closeForm.PasswordTextBox.Text, adminPassword) && closeForm.DialogResult == System.Windows.Forms.DialogResult.OK)
            {
                e.Cancel = false;
            }
            else
            {
                MessageBox.Show("Invalid password entered. Please try again. You will be returned to the application.", "Invalid Password", MessageBoxButtons.OK);
            }
        }