Skip to content

Commit

Permalink
refactor(Weasel.Setup): disable select button when default user folde…
Browse files Browse the repository at this point in the history
…r is used
  • Loading branch information
WhiredPlanck committed Jan 10, 2025
1 parent 968534f commit 13fe7f3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Weasel.Setup/SetupOptionDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ private void InstallOptionDialog_Load(object sender, System.EventArgs e)
defaultFolderRadio.Checked = string.IsNullOrEmpty(UserDir);
customFolderRadio.Checked = !string.IsNullOrEmpty(UserDir);
customPathBox.Enabled = !string.IsNullOrEmpty(UserDir);
selectButton.Enabled = !string.IsNullOrEmpty(UserDir);
customPathBox.Text = UserDir;

if (IsInstalled) {
Expand All @@ -37,6 +38,7 @@ private void DefaultFolderRadio_CheckedChanged(object sender, System.EventArgs e
{
customPathBox.Text = string.Empty;
customPathBox.Enabled = false;
selectButton.Enabled= false;
}
}

Expand All @@ -45,6 +47,7 @@ private void CustomFolderRadio_CheckedChanged(object sender, System.EventArgs e)
if (customFolderRadio.Checked)
{
customPathBox.Enabled = true;
selectButton.Enabled = true;
}
}

Expand Down

0 comments on commit 13fe7f3

Please sign in to comment.