diff --git a/StartMenuCleaner/MainForm.cs b/StartMenuCleaner/MainForm.cs
index 9626406..5cb872a 100644
--- a/StartMenuCleaner/MainForm.cs
+++ b/StartMenuCleaner/MainForm.cs
@@ -95,12 +95,15 @@ private void RemoveStartMenuShortcutEntry()
MyListBoxLog.Log(Enums.LogLevel.Error, ex.Message);
}
}
+
+ resultsCheckedListBox.ClearSelected();
+ resetStateCheck();
}
///
/// Sets the state of the results checked ListBox enabled.
///
- private void SetResultsCheckedListBoxEnabledState()
+ private void SetResultsCheckedListBoxEnabledState(bool setStateChecked = false)
{
if(resultsCheckedListBox != null && resultsCheckedListBox.CheckedItems != null)
{
@@ -113,6 +116,11 @@ private void SetResultsCheckedListBoxEnabledState()
{
removeButton.Enabled = false;
}
+
+ if(setStateChecked)
+ {
+ resetStateCheck();
+ }
}
}
@@ -169,7 +177,10 @@ private void scanButton_Click(object sender, EventArgs e)
}
finally
{
- SetResultsCheckedListBoxEnabledState();
+ if (_StateChecked)
+ SetResultsCheckedListBoxEnabledState();
+ else
+ SetResultsCheckedListBoxEnabledState(true);
}
}
@@ -205,7 +216,10 @@ private void scanCustomButton_Click(object sender, EventArgs e)
}
finally
{
- SetResultsCheckedListBoxEnabledState();
+ if(_StateChecked)
+ SetResultsCheckedListBoxEnabledState();
+ else
+ SetResultsCheckedListBoxEnabledState(true);
}
}
@@ -227,6 +241,8 @@ private void removeButton_Click(object sender, EventArgs e)
if (confirmResult == DialogResult.Yes)
{
RemoveStartMenuShortcutEntry();
+ removeButton.Enabled = false;
+ _StateChecked = true;
}
else
{
@@ -320,7 +336,12 @@ private void customSearchTextBox_Leave(object sender, EventArgs e)
/// The instance containing the event data.
private void resultsCheckedListBox_SelectedIndexChanged(object sender, EventArgs e)
{
- SetResultsCheckedListBoxEnabledState();
+ SetResultsCheckedListBoxEnabledState(setStateChecked: true);
+ }
+
+ private void resetStateCheck()
+ {
+ _StateChecked = !_StateChecked;
}
#endregion
diff --git a/StartMenuCleaner/Properties/AssemblyInfo.cs b/StartMenuCleaner/Properties/AssemblyInfo.cs
index 2ce2aa0..5b7b827 100644
--- a/StartMenuCleaner/Properties/AssemblyInfo.cs
+++ b/StartMenuCleaner/Properties/AssemblyInfo.cs
@@ -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("")]
@@ -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")]
diff --git a/StartMenuCleaner/Resources/BuildDate.txt b/StartMenuCleaner/Resources/BuildDate.txt
index c5b14a6..f8c5fcb 100644
--- a/StartMenuCleaner/Resources/BuildDate.txt
+++ b/StartMenuCleaner/Resources/BuildDate.txt
@@ -1 +1 @@
-12/04/2019
+21/02/2021