Ejemplo n.º 1
0
        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("Неверный пароль");
                }
            }
        }
Ejemplo n.º 2
0
        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("Неверный пароль");
                }
            }
        }
Ejemplo n.º 3
0
        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("Неверный пароль"); }
            }
        }
Ejemplo n.º 4
0
 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("Неверный пароль"); }
     }
 }