예제 #1
0
파일: MainMenu.cs 프로젝트: ondister/Recog
        private void smenu_pass_Click(object sender, EventArgs e)
        {
            PassBox db = new PassBox();

            db.Text = "Введите старый пароль";
            db.ShowDialog();
            if (db.DialogResult == DialogResult.OK)
            {
                if (db.Description == Properties.Settings.Default.Pass)
                {
                    PassBox newdb = new PassBox();
                    newdb.Text = "Введите новый пароль";
                    newdb.ShowDialog();
                    if (newdb.DialogResult == DialogResult.OK)
                    {
                        if (newdb.Description.Trim() != "")
                        {
                            Properties.Settings.Default.Pass = newdb.Description;
                            Properties.Settings.Default.Save();
                        }
                    }
                }
                else
                {
                    MessageBox.Show("Неверный пароль");
                }
            }
        }
예제 #2
0
파일: MainMenu.cs 프로젝트: ondister/Recog
        private void toolStripButton2_CheckedChanged(object sender, EventArgs e)
        {
            PassBox db = new PassBox();

            db.ShowDialog();
            if (db.DialogResult == DialogResult.OK)
            {
                if (db.Description == Properties.Settings.Default.Pass)
                {
                    Properties.Settings.Default.AllowViews = toolStripButton2.Checked;
                    Properties.Settings.Default.Save();
                    RefreshMenu();
                }
                else
                {
                    MessageBox.Show("Неверный пароль");
                }
            }
        }
예제 #3
0
파일: MainMenu.cs 프로젝트: ondister/Recog
        private void smenu_pass_Click(object sender, EventArgs e)
        {
            PassBox db = new PassBox();
            db.Text = "Введите старый пароль";
            db.ShowDialog();
            if (db.DialogResult == DialogResult.OK)
            {
                if (db.Description == Properties.Settings.Default.Pass)
                {
                    PassBox newdb = new PassBox();
                    newdb.Text = "Введите новый пароль";
                    newdb.ShowDialog();
                    if (newdb.DialogResult == DialogResult.OK)
                    {
                        if (newdb.Description.Trim()!="")
                        {
                            Properties.Settings.Default.Pass = newdb.Description;
                            Properties.Settings.Default.Save();
                        }
                    }

                }
                else { MessageBox.Show("Неверный пароль"); }
            }
        }
예제 #4
0
파일: MainMenu.cs 프로젝트: ondister/Recog
 private void toolStripButton2_CheckedChanged(object sender, EventArgs e)
 {
     PassBox db = new PassBox();
     db.ShowDialog();
     if (db.DialogResult == DialogResult.OK)
     {
         if (db.Description == Properties.Settings.Default.Pass)
         {
             Properties.Settings.Default.AllowViews = toolStripButton2.Checked;
             Properties.Settings.Default.Save();
             RefreshMenu();
         }
         else { MessageBox.Show("Неверный пароль"); }
     }
 }