Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Minor improvements to the PreferencesDialog reset button.

  • Loading branch information...
commit 4abb7fc20bd5eb2dad78c98457de7c0c8b55b892 1 parent 33525d6
@wyldphyre wyldphyre authored
Showing with 9 additions and 5 deletions.
  1. +1 −0  src/InstallPad.cs
  2. +8 −5 src/PreferencesDialog.cs
View
1  src/InstallPad.cs
@@ -595,6 +595,7 @@ private void openAppList_LinkClicked(object sender, LinkLabelLinkClickedEventArg
private void preferencesLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
+ preferencesDialog.Defaults = InstallPadApp.Preferences.Defaults;
preferencesDialog.ShowDialog();
}
View
13 src/PreferencesDialog.cs
@@ -28,6 +28,12 @@ public partial class PreferencesDialog : Form
private Dictionary<string, string> defaults = null;
+ public Dictionary<string, string> Defaults
+ {
+ get { return defaults; }
+ set { defaults = value; }
+ }
+
public PreferencesDialog()
{
InitializeComponent();
@@ -48,9 +54,6 @@ private void SavePreferences()
private void PreferencesDialog_Load(object sender, EventArgs e)
{
- //populate defaults to avoid regenerating them each time they are referenced.
- defaults = InstallPadApp.Preferences.Defaults;
-
this.downloadTo.Text = InstallPadApp.Preferences.DownloadTo;
this.extractTo.Text = InstallPadApp.Preferences.InstallationRoot;
}
@@ -83,8 +86,8 @@ private void okButton_Click(object sender, EventArgs e)
private void resetButton_Click(object sender, EventArgs e)
{
- extractTo.Text = InstallPadApp.Preferences.Defaults[Resources.InstallationRoot];
- downloadTo.Text = InstallPadApp.Preferences.Defaults[Resources.DownloadTo];
+ extractTo.Text = Defaults[Resources.InstallationRoot];
+ downloadTo.Text = Defaults[Resources.DownloadTo];
}
public override void Refresh()
Please sign in to comment.
Something went wrong with that request. Please try again.