Skip to content

Commit bf8673c

Browse files
committed
2.5.0.0 - More fixes for when we're upgrading from an old version of the application (such as 2.3).
1 parent 17b8120 commit bf8673c

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

interface/settings/FormFileTransferSettings.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ private void FormFileTransferSettings_Load(object sender, EventArgs e)
6363
checkBoxIsLinux.Checked = true;
6464
}
6565

66-
checkBoxDeleteLocalFileAfterSuccessfulUpload.Checked = Convert.ToBoolean(_config.Settings.User.GetByKey("SFTPDeleteLocalFileAfterSuccessfulUpload").Value);
67-
checkBoxKeepFailedUploads.Checked = Convert.ToBoolean(_config.Settings.User.GetByKey("SFTPKeepFailedUploads").Value);
66+
checkBoxDeleteLocalFileAfterSuccessfulUpload.Checked = Convert.ToBoolean(_config.Settings.User.GetByKey("SFTPDeleteLocalFileAfterSuccessfulUpload", false, true).Value);
67+
checkBoxKeepFailedUploads.Checked = Convert.ToBoolean(_config.Settings.User.GetByKey("SFTPKeepFailedUploads", true, true).Value);
6868
}
6969

7070
private void buttonCancel_Click(object sender, EventArgs e)

interface/setup/FormSetup.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)