Skip to content

Commit 1781bb5

Browse files
committed
Groups are now sorted
1 parent 1a2305d commit 1781bb5

5 files changed

Lines changed: 7 additions & 2 deletions

File tree

Source/NETworkManager/ViewModels/Applications/IPScannerViewModel.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,7 @@ public IPScannerViewModel(IDialogCoordinator instance)
349349

350350
_ipScannerProfiles = CollectionViewSource.GetDefaultView(IPScannerProfileManager.Profiles);
351351
_ipScannerProfiles.GroupDescriptions.Add(new PropertyGroupDescription("Group"));
352+
_ipScannerProfiles.SortDescriptions.Add(new SortDescription("Group", ListSortDirection.Ascending));
352353
_ipScannerProfiles.SortDescriptions.Add(new SortDescription("Name", ListSortDirection.Ascending));
353354
_ipScannerProfiles.Filter = o =>
354355
{

Source/NETworkManager/ViewModels/Applications/NetworkInterfaceViewModel.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,7 @@ public NetworkInterfaceViewModel(IDialogCoordinator instance)
654654

655655
_networkInterfaceProfiles = CollectionViewSource.GetDefaultView(NetworkInterfaceProfileManager.Profiles);
656656
_networkInterfaceProfiles.GroupDescriptions.Add(new PropertyGroupDescription("Group"));
657+
_networkInterfaceProfiles.SortDescriptions.Add(new SortDescription("Group", ListSortDirection.Ascending));
657658
_networkInterfaceProfiles.SortDescriptions.Add(new SortDescription("Name", ListSortDirection.Ascending));
658659
_networkInterfaceProfiles.Filter = o =>
659660
{
@@ -711,7 +712,7 @@ private bool ReloadNetworkInterfaces_CanExecute(object obj)
711712
}
712713

713714
private async void ReloadNetworkInterfacesAction()
714-
{
715+
{
715716
IsNetworkInterfaceLoading = true;
716717

717718
await Task.Delay(2000); // Make the user happy, let him see a reload animation
@@ -821,7 +822,7 @@ private async void ApplyProfileAction()
821822
progressDialogController.SetIndeterminate();
822823

823824
string subnetmask = SelectedProfile.Subnetmask;
824-
825+
825826
// CIDR to subnetmask
826827
if (SelectedProfile.EnableStaticIPAddress && subnetmask.StartsWith("/"))
827828
subnetmask = Subnetmask.GetFromCidr(int.Parse(subnetmask.TrimStart('/'))).Subnetmask;

Source/NETworkManager/ViewModels/Applications/PortScannerViewModel.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@ public PortScannerViewModel(IDialogCoordinator instance)
393393

394394
_portScannerProfiles = CollectionViewSource.GetDefaultView(PortScannerProfileManager.Profiles);
395395
_portScannerProfiles.GroupDescriptions.Add(new PropertyGroupDescription("Group"));
396+
_portScannerProfiles.SortDescriptions.Add(new SortDescription("Group", ListSortDirection.Ascending));
396397
_portScannerProfiles.SortDescriptions.Add(new SortDescription("Name", ListSortDirection.Ascending));
397398
_portScannerProfiles.Filter = o =>
398399
{

Source/NETworkManager/ViewModels/Applications/RemoteDesktopViewModel.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ public RemoteDesktopViewModel(IDialogCoordinator instance)
111111

112112
_remoteDesktopSessions = CollectionViewSource.GetDefaultView(RemoteDesktopSessionManager.Sessions);
113113
_remoteDesktopSessions.GroupDescriptions.Add(new PropertyGroupDescription("Group"));
114+
_remoteDesktopSessions.SortDescriptions.Add(new SortDescription("Group", ListSortDirection.Ascending));
114115
_remoteDesktopSessions.SortDescriptions.Add(new SortDescription("Name", ListSortDirection.Ascending));
115116
_remoteDesktopSessions.Filter = o =>
116117
{

Source/NETworkManager/ViewModels/Applications/WakeOnLanViewModel.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ public WakeOnLANViewModel(IDialogCoordinator instance)
206206

207207
_wakeOnLANClients = CollectionViewSource.GetDefaultView(WakeOnLANClientManager.Clients);
208208
_wakeOnLANClients.GroupDescriptions.Add(new PropertyGroupDescription("Group"));
209+
_wakeOnLANClients.SortDescriptions.Add(new SortDescription("Group", ListSortDirection.Ascending));
209210
_wakeOnLANClients.SortDescriptions.Add(new SortDescription("Name", ListSortDirection.Ascending));
210211
_wakeOnLANClients.Filter = o =>
211212
{

0 commit comments

Comments
 (0)