Skip to content

Commit 4b809d4

Browse files
author
Marc365
committed
Version 1.5
1 parent 316f631 commit 4b809d4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Form1.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,9 @@ private void Form1_Load(object sender, EventArgs e)
9898
registry = Registry.CurrentUser.OpenSubKey(_regKey);
9999
if (registry != null)
100100
{
101-
textBox1.Text = registry.GetValue(_regFile, null).ToString();
102-
_mode = int.Parse(registry.GetValue(_regMode, _mode).ToString());
101+
textBox1.Text = (string)registry.GetValue(_regFile, null);
102+
_mode = (int)registry.GetValue(_regMode, _mode);
103+
checkBox1.Checked = bool.Parse((string)registry.GetValue(_regDate, "True"));
103104
ModeSwap();
104105
}
105106

@@ -235,7 +236,8 @@ private void button1_Click(object sender, EventArgs e)
235236
// save the settings in the registry
236237
registry = Registry.CurrentUser.CreateSubKey(_regKey);
237238
registry.SetValue(_regFile, textBox1.Text);
238-
registry.SetValue(_regMode, _mode);
239+
registry.SetValue(_regMode, _mode);
240+
registry.SetValue(_regDate, checkBox1.Checked);
239241
registry.Close();
240242

241243
if (string.IsNullOrEmpty(textBox1.Text))

0 commit comments

Comments
 (0)