Skip to content

Commit

Permalink
Version 1.0.0.5
Browse files Browse the repository at this point in the history
Fixed: Select All/None not working properly when manually checking or redoing a scan or after a delete.
  • Loading branch information
StevenStrike committed Feb 21, 2021
1 parent 6561ef9 commit aa624da
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 8 deletions.
29 changes: 25 additions & 4 deletions StartMenuCleaner/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,15 @@ private void RemoveStartMenuShortcutEntry()
MyListBoxLog.Log(Enums.LogLevel.Error, ex.Message);
}
}

resultsCheckedListBox.ClearSelected();
resetStateCheck();
}

/// <summary>
/// Sets the state of the results checked ListBox enabled.
/// </summary>
private void SetResultsCheckedListBoxEnabledState()
private void SetResultsCheckedListBoxEnabledState(bool setStateChecked = false)
{
if(resultsCheckedListBox != null && resultsCheckedListBox.CheckedItems != null)
{
Expand All @@ -113,6 +116,11 @@ private void SetResultsCheckedListBoxEnabledState()
{
removeButton.Enabled = false;
}

if(setStateChecked)
{
resetStateCheck();
}
}
}

Expand Down Expand Up @@ -169,7 +177,10 @@ private void scanButton_Click(object sender, EventArgs e)
}
finally
{
SetResultsCheckedListBoxEnabledState();
if (_StateChecked)
SetResultsCheckedListBoxEnabledState();
else
SetResultsCheckedListBoxEnabledState(true);
}
}

Expand Down Expand Up @@ -205,7 +216,10 @@ private void scanCustomButton_Click(object sender, EventArgs e)
}
finally
{
SetResultsCheckedListBoxEnabledState();
if(_StateChecked)
SetResultsCheckedListBoxEnabledState();
else
SetResultsCheckedListBoxEnabledState(true);
}
}

Expand All @@ -227,6 +241,8 @@ private void removeButton_Click(object sender, EventArgs e)
if (confirmResult == DialogResult.Yes)
{
RemoveStartMenuShortcutEntry();
removeButton.Enabled = false;
_StateChecked = true;
}
else
{
Expand Down Expand Up @@ -320,7 +336,12 @@ private void customSearchTextBox_Leave(object sender, EventArgs e)
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
private void resultsCheckedListBox_SelectedIndexChanged(object sender, EventArgs e)
{
SetResultsCheckedListBoxEnabledState();
SetResultsCheckedListBoxEnabledState(setStateChecked: true);
}

private void resetStateCheck()
{
_StateChecked = !_StateChecked;
}

#endregion
Expand Down
6 changes: 3 additions & 3 deletions StartMenuCleaner/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("SjServ")]
[assembly: AssemblyProduct("Start Menu Cleaner")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -33,7 +33,7 @@
// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut
// en utilisant '*', comme indiqué ci-dessous :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.4")]
[assembly: AssemblyFileVersion("1.0.0.4")]
[assembly: AssemblyVersion("1.0.0.5")]
[assembly: AssemblyFileVersion("1.0.0.5")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: InternalsVisibleTo("StartMenuCleaner_UnitTestProject")]
2 changes: 1 addition & 1 deletion StartMenuCleaner/Resources/BuildDate.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12/04/2019
21/02/2021

0 comments on commit aa624da

Please sign in to comment.