mirror of
https://github.com/Crypto-Notepad/Crypto-Notepad.git
synced 2026-03-11 08:55:25 +00:00
MsgBox's placed in the middle of the parent forms
This commit is contained in:
parent
463fe44661
commit
825797024f
2 changed files with 20 additions and 9 deletions
|
|
@ -22,12 +22,16 @@ private void button1_Click(object sender, EventArgs e)
|
|||
if (textBox1.Text == MainWindow.key)
|
||||
{
|
||||
MainWindow.key = textBox2.Text;
|
||||
MainWindow.keyChanged = true;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
else if (textBox1.Text != MainWindow.key)
|
||||
else if (textBox1.Text != MainWindow.key)
|
||||
{
|
||||
MessageBox.Show("Wrong old key!");
|
||||
using (new CenterWinDialog(this))
|
||||
{
|
||||
MessageBox.Show("Wrong old key!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -60,9 +60,10 @@ private void saveSettingsButton_Click(object sender, EventArgs e)
|
|||
ps.KeySize = Convert.ToInt32(comboBox3.Text.ToString());
|
||||
ps.TheSalt = textBox1.Text;
|
||||
ps.PasswordIterations = Convert.ToInt32(textBox2.Text.ToString());
|
||||
|
||||
ps.Save();
|
||||
|
||||
MainWindow.settingsChanged = true;
|
||||
|
||||
this.Hide();
|
||||
}
|
||||
|
||||
|
|
@ -89,24 +90,30 @@ public static void DissociateExtension(string applicationExecutablePath, string
|
|||
private void panel1_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
colorDialog1.Color = panel1.BackColor;
|
||||
MessageBoxCenter.PrepToCenterMessageBoxOnForm(this);
|
||||
colorDialog1.ShowDialog();
|
||||
using (new CenterWinDialog(this))
|
||||
{
|
||||
colorDialog1.ShowDialog();
|
||||
}
|
||||
panel1.BackColor = colorDialog1.Color;
|
||||
}
|
||||
|
||||
private void panel2_Click(object sender, EventArgs e)
|
||||
{
|
||||
colorDialog1.Color = panel2.BackColor;
|
||||
MessageBoxCenter.PrepToCenterMessageBoxOnForm(this);
|
||||
colorDialog1.ShowDialog();
|
||||
using (new CenterWinDialog(this))
|
||||
{
|
||||
colorDialog1.ShowDialog();
|
||||
}
|
||||
panel2.BackColor = colorDialog1.Color;
|
||||
}
|
||||
|
||||
private void panel3_Click(object sender, EventArgs e)
|
||||
{
|
||||
colorDialog1.Color = panel3.BackColor;
|
||||
MessageBoxCenter.PrepToCenterMessageBoxOnForm(this);
|
||||
colorDialog1.ShowDialog();
|
||||
using (new CenterWinDialog(this))
|
||||
{
|
||||
colorDialog1.ShowDialog();
|
||||
}
|
||||
panel3.BackColor = colorDialog1.Color;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue