Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed issue #14 and added "Start minimized" checkbox #18

Merged
merged 11 commits into from
Jul 6, 2020
Next Next commit
Beginning "Start minimized" checkbox implementation.
rcorzon committed Jul 3, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 3400718cb49259c51174b90191d272b6253d5a64
30 changes: 22 additions & 8 deletions QuietOnTheSetUI/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 13 additions & 3 deletions QuietOnTheSetUI/Form1.cs
Original file line number Diff line number Diff line change
@@ -22,6 +22,8 @@ public partial class Form1 : Form
private string _password;
private int _maxVolume;
private bool _exitAllowed = false;
private RegistryKey rk = Registry.CurrentUser.OpenSubKey
("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);

public Form1()
{
@@ -236,9 +238,6 @@ private void exitButton_Click(object sender, EventArgs e)

private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
RegistryKey rk = Registry.CurrentUser.OpenSubKey
("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);

if (checkBox1.Checked)
{
rk.SetValue("QuietOnTheSet", Application.ExecutablePath.ToString());
@@ -248,5 +247,16 @@ private void checkBox1_CheckedChanged(object sender, EventArgs e)
rk.DeleteValue("QuietOnTheSet", false);
}
}
private void checkBox2_CheckedChanged(object sender, EventArgs e)
{
if (checkBox2.Checked)
{
// rk.SetValue("QuietOnTheSet_StartMinimized", true);
}
else
{
// rk.DeleteValue("QuietOnTheSet_StartMinimized", false);
}
}
}
}