@@ -90,7 +90,7 @@ private void FormSetup_Load(object sender, EventArgs e)
9090 listBoxMacroTags . Items . Add ( macroTag . Name + " (" + macroTag . Description + ")" ) ;
9191 }
9292
93- checkBoxUseKeyboardShortcuts . Checked = Convert . ToBoolean ( _config . Settings . User . GetByKey ( "UseKeyboardShortcuts" ) . Value ) ;
93+ checkBoxUseKeyboardShortcuts . Checked = Convert . ToBoolean ( _config . Settings . User . GetByKey ( "UseKeyboardShortcuts" , false , true ) . Value ) ;
9494
9595 comboBoxKeyboardShortcutStartScreenCaptureModifier1 . Items . Clear ( ) ;
9696 comboBoxKeyboardShortcutStartScreenCaptureModifier1 . Items . Add ( AutoScreenCapture . ModifierKeys . Alt . ToString ( ) ) ;
@@ -199,8 +199,8 @@ private void FormSetup_Load(object sender, EventArgs e)
199199 }
200200
201201 // Optimize Screen Capture
202- checkBoxOptimizeScreenCapture . Checked = Convert . ToBoolean ( _config . Settings . User . GetByKey ( "OptimizeScreenCapture" ) . Value ) ;
203- trackBarImageDiffTolerance . Value = Convert . ToInt32 ( _config . Settings . User . GetByKey ( "ImageDiffTolerance" ) . Value ) ;
202+ checkBoxOptimizeScreenCapture . Checked = Convert . ToBoolean ( _config . Settings . User . GetByKey ( "OptimizeScreenCapture" , false , true ) . Value ) ;
203+ trackBarImageDiffTolerance . Value = Convert . ToInt32 ( _config . Settings . User . GetByKey ( "ImageDiffTolerance" , 20 , true ) . Value ) ;
204204 labelSelectedImageDiffTolerance . Text = trackBarImageDiffTolerance . Value . ToString ( ) + "%" ;
205205 CheckEnabledStatusOnOptimizeScreenCaptureControls ( ) ;
206206
@@ -212,8 +212,8 @@ private void FormSetup_Load(object sender, EventArgs e)
212212
213213 private void FormSetup_Shown ( object sender , EventArgs e )
214214 {
215- bool applyScreenshotLabel = Convert . ToBoolean ( _config . Settings . User . GetByKey ( "ApplyScreenshotLabel" ) . Value ) ;
216- string screenshotLabel = _config . Settings . User . GetByKey ( "ScreenshotLabel" ) . Value . ToString ( ) ;
215+ bool applyScreenshotLabel = Convert . ToBoolean ( _config . Settings . User . GetByKey ( "ApplyScreenshotLabel" , false , true ) . Value ) ;
216+ string screenshotLabel = _config . Settings . User . GetByKey ( "ScreenshotLabel" , string . Empty , true ) . Value . ToString ( ) ;
217217
218218 checkBoxScreenshotLabel . Checked = applyScreenshotLabel ;
219219
@@ -451,7 +451,7 @@ public void RefreshApplicationFocusList()
451451 }
452452 }
453453
454- string applicationFocus = _config . Settings . User . GetByKey ( "ApplicationFocus" ) . Value . ToString ( ) ;
454+ string applicationFocus = _config . Settings . User . GetByKey ( "ApplicationFocus" , string . Empty , true ) . Value . ToString ( ) ;
455455
456456 if ( string . IsNullOrEmpty ( applicationFocus ) )
457457 {
@@ -471,8 +471,8 @@ public void RefreshApplicationFocusList()
471471
472472 listBoxProcessList . SelectedIndex = listBoxProcessList . Items . IndexOf ( applicationFocus ) ;
473473
474- numericUpDownApplicationFocusDelayBefore . Value = Convert . ToInt32 ( _config . Settings . User . GetByKey ( "ApplicationFocusDelayBefore" ) . Value ) ;
475- numericUpDownApplicationFocusDelayAfter . Value = Convert . ToInt32 ( _config . Settings . User . GetByKey ( "ApplicationFocusDelayAfter" ) . Value ) ;
474+ numericUpDownApplicationFocusDelayBefore . Value = Convert . ToInt32 ( _config . Settings . User . GetByKey ( "ApplicationFocusDelayBefore" , 0 , true ) . Value ) ;
475+ numericUpDownApplicationFocusDelayAfter . Value = Convert . ToInt32 ( _config . Settings . User . GetByKey ( "ApplicationFocusDelayAfter" , 0 , true ) . Value ) ;
476476 }
477477
478478 /// <summary>
@@ -548,7 +548,7 @@ private void buttonSetPassphrase_Click(object sender, EventArgs e)
548548
549549 _config . Settings . User . Save ( _config . Settings , _fileSystem ) ;
550550
551- textBoxPassphraseHash . Text = _config . Settings . User . GetByKey ( "Passphrase" ) . Value . ToString ( ) ;
551+ textBoxPassphraseHash . Text = _config . Settings . User . GetByKey ( "Passphrase" , string . Empty , true ) . Value . ToString ( ) ;
552552
553553 //_security.Key = textBoxPassphrase.Text;
554554 textBoxPassphrase . Clear ( ) ;
@@ -565,7 +565,7 @@ private void buttonClearPassphrase_Click(object sender, EventArgs e)
565565
566566 _config . Settings . User . Save ( _config . Settings , _fileSystem ) ;
567567
568- textBoxPassphraseHash . Text = _config . Settings . User . GetByKey ( "Passphrase" ) . Value . ToString ( ) ;
568+ textBoxPassphraseHash . Text = _config . Settings . User . GetByKey ( "Passphrase" , string . Empty , true ) . Value . ToString ( ) ;
569569
570570 //_security.Key = string.Empty;
571571 textBoxPassphrase . Clear ( ) ;
0 commit comments