Skip to content

Commit 1ab5d61

Browse files
committed
Fix: Close #2803
1 parent 3612e7a commit 1ab5d61

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

Source/GlobalAssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
[assembly: AssemblyTrademark("")]
77
[assembly: AssemblyCulture("")]
88

9-
[assembly: AssemblyVersion("2024.5.12.0")]
10-
[assembly: AssemblyFileVersion("2024.5.12.0")]
9+
[assembly: AssemblyVersion("2024.8.1.0")]
10+
[assembly: AssemblyFileVersion("2024.8.1.0")]

Source/NETworkManager.Profiles/ProfileManager.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ public static void Save()
482482
// Only if the password provided earlier was valid...
483483
if (LoadedProfileFile.IsPasswordValid)
484484
{
485-
var decryptedBytes = SerializeToByteArray(new List<GroupInfo>(Groups));
485+
var decryptedBytes = SerializeToByteArray([..Groups]);
486486
var encryptedBytes = CryptoHelper.Encrypt(decryptedBytes,
487487
SecureStringHelper.ConvertToString(LoadedProfileFile.Password),
488488
GlobalStaticConfiguration.Profile_EncryptionKeySize,
@@ -493,7 +493,7 @@ public static void Save()
493493
}
494494
else
495495
{
496-
SerializeToFile(LoadedProfileFile.Path, new List<GroupInfo>(Groups));
496+
SerializeToFile(LoadedProfileFile.Path, [..Groups]);
497497
}
498498

499499
ProfilesChanged = false;

Source/NETworkManager.Settings/SettingsManager.cs

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System.Linq;
55
using System.Xml.Serialization;
66
using log4net;
7+
using NETworkManager.Controls;
78
using NETworkManager.Models;
89
using NETworkManager.Models.Network;
910
using NETworkManager.Models.PowerShell;
@@ -333,6 +334,10 @@ private static void UpgradeTo_2023_11_28_0()
333334
private static void UpgradeToLatest(Version version)
334335
{
335336
Log.Info($"Apply upgrade to {version}...");
337+
338+
Log.Info("Reset ApplicationList to default...");
339+
Current.General_ApplicationList =
340+
new ObservableSetCollection<ApplicationInfo>(ApplicationManager.GetDefaultList());
336341
}
337342

338343
#endregion

Source/NETworkManager/MainWindow.xaml.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -700,8 +700,8 @@ private void LoadApplicationList()
700700

701701
// Select the application
702702
// Set application via command line, or select the default one, fallback to the first visible one
703-
var applicationList = Applications.Cast<ApplicationInfo>();
704-
703+
var applicationList = Applications.Cast<ApplicationInfo>().ToArray();
704+
705705
if (CommandLineManager.Current.Application != ApplicationName.None)
706706
SelectedApplication = applicationList.FirstOrDefault(x => x.Name == CommandLineManager.Current.Application);
707707
else
@@ -1259,7 +1259,7 @@ private void RunCommandDoAction()
12591259

12601260
private void RunCommandCloseAction()
12611261
{
1262-
RunCommandFlyoutClose();
1262+
RunCommandFlyoutClose().ConfigureAwait(false);
12631263
}
12641264

12651265
#endregion
@@ -1321,7 +1321,7 @@ private void RunCommandDo()
13211321
}
13221322

13231323
// Close the flyout
1324-
RunCommandFlyoutClose(true);
1324+
RunCommandFlyoutClose(true).ConfigureAwait(false);
13251325
}
13261326

13271327
/// <summary>
@@ -1360,7 +1360,7 @@ private void FlyoutRunCommand_IsKeyboardFocusWithinChanged(object sender, Depend
13601360
if (e.NewValue is not false)
13611361
return;
13621362

1363-
RunCommandFlyoutClose();
1363+
RunCommandFlyoutClose().ConfigureAwait(false);
13641364
}
13651365

13661366
#endregion

0 commit comments

Comments
 (0)