From ac78c64f54add350c0633c8371d1ba55cd8f46c6 Mon Sep 17 00:00:00 2001
From: BornToBeRoot <16019165+BornToBeRoot@users.noreply.github.com>
Date: Thu, 19 Jun 2025 01:57:21 +0200
Subject: [PATCH 1/9] Feature: Migrate to simplechildwindow
---
.../IProfileManagerMinimal.cs | 4 +-
Source/NETworkManager/MainWindow.xaml.cs | 1 -
Source/NETworkManager/ProfileDialogManager.cs | 42 +-
.../AWSSessionManagerHostViewModel.cs | 6 +-
.../ViewModels/DNSLookupHostViewModel.cs | 2 +-
.../ViewModels/IPGeolocationHostViewModel.cs | 2 +-
.../ViewModels/IPScannerHostViewModel.cs | 2 +-
.../ViewModels/IPScannerViewModel.cs | 2 +-
.../ViewModels/NetworkInterfaceViewModel.cs | 2 +-
.../ViewModels/PingMonitorHostViewModel.cs | 2 +-
.../ViewModels/PortScannerHostViewModel.cs | 2 +-
.../ViewModels/PowerShellHostViewModel.cs | 2 +-
.../ViewModels/ProfilesViewModel.cs | 3 +-
.../ViewModels/PuTTYHostViewModel.cs | 2 +-
.../ViewModels/RemoteDesktopHostViewModel.cs | 2 +-
.../ViewModels/SNMPHostViewModel.cs | 2 +-
.../ViewModels/TigerVNCHostViewModel.cs | 2 +-
.../ViewModels/TracerouteHostViewModel.cs | 2 +-
.../ViewModels/WakeOnLANViewModel.cs | 2 +-
.../ViewModels/WebConsoleHostViewModel.cs | 2 +-
.../ViewModels/WhoisHostViewModel.cs | 2 +-
.../Views/ProfileChildWindow.xaml | 4626 +++++++++++++++++
.../Views/ProfileChildWindow.xaml.cs | 52 +
23 files changed, 4724 insertions(+), 42 deletions(-)
create mode 100644 Source/NETworkManager/Views/ProfileChildWindow.xaml
create mode 100644 Source/NETworkManager/Views/ProfileChildWindow.xaml.cs
diff --git a/Source/NETworkManager.Profiles/IProfileManagerMinimal.cs b/Source/NETworkManager.Profiles/IProfileManagerMinimal.cs
index 1950391bd5..4832dfbedd 100644
--- a/Source/NETworkManager.Profiles/IProfileManagerMinimal.cs
+++ b/Source/NETworkManager.Profiles/IProfileManagerMinimal.cs
@@ -11,6 +11,7 @@ public interface IProfileManagerMinimal
///
public void OnProfileManagerDialogOpen()
{
+
}
///
@@ -18,5 +19,6 @@ public void OnProfileManagerDialogOpen()
///
public void OnProfileManagerDialogClose()
{
+
}
-}
\ No newline at end of file
+}
diff --git a/Source/NETworkManager/MainWindow.xaml.cs b/Source/NETworkManager/MainWindow.xaml.cs
index 8d89e1d99c..891f37016f 100644
--- a/Source/NETworkManager/MainWindow.xaml.cs
+++ b/Source/NETworkManager/MainWindow.xaml.cs
@@ -472,7 +472,6 @@ await this.ShowMessageAsync(Strings.SettingsHaveBeenReset,
// Show welcome dialog
if (SettingsManager.Current.WelcomeDialog_Show)
{
-
var childWindow = new WelcomeChildWindow();
var viewModel = new WelcomeViewModel(instance =>
diff --git a/Source/NETworkManager/ProfileDialogManager.cs b/Source/NETworkManager/ProfileDialogManager.cs
index f7666e03c8..f181c8efd8 100644
--- a/Source/NETworkManager/ProfileDialogManager.cs
+++ b/Source/NETworkManager/ProfileDialogManager.cs
@@ -9,9 +9,11 @@
using NETworkManager.Views;
using System;
using System.Collections.Generic;
+using System.Configuration;
using System.Security;
using System.Threading.Tasks;
using System.Windows;
+using MahApps.Metro.SimpleChildWindow;
namespace NETworkManager;
@@ -466,36 +468,36 @@ private static GroupInfo ParseGroupInfo(GroupViewModel instance)
#region Dialog to add, edit, copy as and delete profile
- public static Task ShowAddProfileDialog(object context, IProfileManagerMinimal viewModel,
- IDialogCoordinator dialogCoordinator, ProfileInfo profile = null, string group = null,
+ public static Task ShowAddProfileDialog(Window parentWindow,IProfileManagerMinimal viewModel,
+ ProfileInfo profile = null, string group = null,
ApplicationName applicationName = ApplicationName.None)
{
- CustomDialog customDialog = new()
- {
- Title = Strings.AddProfile,
- Style = (Style)Application.Current.FindResource(DialogResourceKey)
- };
- ProfileViewModel profileViewModel = new(async instance =>
+ var childWindow = new ProfileChildWindow(parentWindow);
+
+ ProfileViewModel profileViewModel = new(instance =>
{
- await dialogCoordinator.HideMetroDialogAsync(context, customDialog);
+ childWindow.IsOpen = false;
+ Settings.ConfigurationManager.Current.IsChildWindowOpen = false;
+
viewModel.OnProfileManagerDialogClose();
-
+
ProfileManager.AddProfile(ParseProfileInfo(instance));
- }, async _ =>
+ }, _ =>
{
- await dialogCoordinator.HideMetroDialogAsync(context, customDialog);
+ childWindow.IsOpen = false;
+ Settings.ConfigurationManager.Current.IsChildWindowOpen = false;
+
viewModel.OnProfileManagerDialogClose();
}, ProfileManager.GetGroupNames(), group, ProfileEditMode.Add, profile, applicationName);
- customDialog.Content = new ProfileDialog
- {
- DataContext = profileViewModel
- };
-
- viewModel.OnProfileManagerDialogOpen();
-
- return dialogCoordinator.ShowMetroDialogAsync(context, customDialog);
+ childWindow.Title = Strings.AddProfile;
+
+ childWindow.DataContext = profileViewModel;
+
+ Settings.ConfigurationManager.Current.IsChildWindowOpen = true;
+
+ return parentWindow.ShowChildWindowAsync(childWindow);
}
public static Task ShowEditProfileDialog(IProfileManagerMinimal viewModel,
diff --git a/Source/NETworkManager/ViewModels/AWSSessionManagerHostViewModel.cs b/Source/NETworkManager/ViewModels/AWSSessionManagerHostViewModel.cs
index 5bc0474e38..7949331169 100644
--- a/Source/NETworkManager/ViewModels/AWSSessionManagerHostViewModel.cs
+++ b/Source/NETworkManager/ViewModels/AWSSessionManagerHostViewModel.cs
@@ -443,7 +443,7 @@ private void ConnectProfileExternalAction()
private void AddProfileAction()
{
ProfileDialogManager
- .ShowAddProfileDialog(this, this, _dialogCoordinator, null, null, ApplicationName.AWSSessionManager)
+ .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.AWSSessionManager)
.ConfigureAwait(false);
}
@@ -999,8 +999,8 @@ private void SetProfilesView(ProfileInfo profile = null)
Profiles.Filter = o =>
{
if (string.IsNullOrEmpty(Search))
- return true ;
-
+ return true;
+
if (o is not ProfileInfo info)
return false;
diff --git a/Source/NETworkManager/ViewModels/DNSLookupHostViewModel.cs b/Source/NETworkManager/ViewModels/DNSLookupHostViewModel.cs
index 8ef01da9d7..382d3be891 100644
--- a/Source/NETworkManager/ViewModels/DNSLookupHostViewModel.cs
+++ b/Source/NETworkManager/ViewModels/DNSLookupHostViewModel.cs
@@ -251,7 +251,7 @@ private void LookupProfileAction()
private void AddProfileAction()
{
- ProfileDialogManager.ShowAddProfileDialog(this, this, _dialogCoordinator, null, null, ApplicationName.DNSLookup)
+ ProfileDialogManager.ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.DNSLookup)
.ConfigureAwait(false);
}
diff --git a/Source/NETworkManager/ViewModels/IPGeolocationHostViewModel.cs b/Source/NETworkManager/ViewModels/IPGeolocationHostViewModel.cs
index b0bb7f42eb..9f25e1463d 100644
--- a/Source/NETworkManager/ViewModels/IPGeolocationHostViewModel.cs
+++ b/Source/NETworkManager/ViewModels/IPGeolocationHostViewModel.cs
@@ -252,7 +252,7 @@ private void QueryProfileAction()
private void AddProfileAction()
{
ProfileDialogManager
- .ShowAddProfileDialog(this, this, _dialogCoordinator, null, null, ApplicationName.IPGeolocation)
+ .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.IPGeolocation)
.ConfigureAwait(false);
}
diff --git a/Source/NETworkManager/ViewModels/IPScannerHostViewModel.cs b/Source/NETworkManager/ViewModels/IPScannerHostViewModel.cs
index a352707c3a..f5d35e405f 100644
--- a/Source/NETworkManager/ViewModels/IPScannerHostViewModel.cs
+++ b/Source/NETworkManager/ViewModels/IPScannerHostViewModel.cs
@@ -251,7 +251,7 @@ private void ScanProfileAction()
private void AddProfileAction()
{
- ProfileDialogManager.ShowAddProfileDialog(this, this, _dialogCoordinator, null, null, ApplicationName.IPScanner)
+ ProfileDialogManager.ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.IPScanner)
.ConfigureAwait(false);
}
diff --git a/Source/NETworkManager/ViewModels/IPScannerViewModel.cs b/Source/NETworkManager/ViewModels/IPScannerViewModel.cs
index a95b877b2e..affc75a685 100644
--- a/Source/NETworkManager/ViewModels/IPScannerViewModel.cs
+++ b/Source/NETworkManager/ViewModels/IPScannerViewModel.cs
@@ -344,7 +344,7 @@ private async void AddProfileSelectedHostAction()
var window = Application.Current.Windows.OfType().FirstOrDefault(x => x.IsActive);
- await ProfileDialogManager.ShowAddProfileDialog(window, this, _dialogCoordinator, profileInfo, null,
+ await ProfileDialogManager.ShowAddProfileDialog(window, this, profileInfo, null,
ApplicationName.IPScanner);
}
diff --git a/Source/NETworkManager/ViewModels/NetworkInterfaceViewModel.cs b/Source/NETworkManager/ViewModels/NetworkInterfaceViewModel.cs
index f11c4ecf84..0c970129c9 100644
--- a/Source/NETworkManager/ViewModels/NetworkInterfaceViewModel.cs
+++ b/Source/NETworkManager/ViewModels/NetworkInterfaceViewModel.cs
@@ -751,7 +751,7 @@ private void ApplyProfileProfileAction()
private void AddProfileAction()
{
ProfileDialogManager
- .ShowAddProfileDialog(this, this, _dialogCoordinator, null, null, ApplicationName.NetworkInterface)
+ .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.NetworkInterface)
.ConfigureAwait(false);
}
diff --git a/Source/NETworkManager/ViewModels/PingMonitorHostViewModel.cs b/Source/NETworkManager/ViewModels/PingMonitorHostViewModel.cs
index 413f213ebb..f6c9e44825 100644
--- a/Source/NETworkManager/ViewModels/PingMonitorHostViewModel.cs
+++ b/Source/NETworkManager/ViewModels/PingMonitorHostViewModel.cs
@@ -357,7 +357,7 @@ private void ExportAction()
private void AddProfileAction()
{
ProfileDialogManager
- .ShowAddProfileDialog(this, this, _dialogCoordinator, null, null, ApplicationName.PingMonitor)
+ .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.PingMonitor)
.ConfigureAwait(false);
}
diff --git a/Source/NETworkManager/ViewModels/PortScannerHostViewModel.cs b/Source/NETworkManager/ViewModels/PortScannerHostViewModel.cs
index bac9aa7a66..3856ead6ad 100644
--- a/Source/NETworkManager/ViewModels/PortScannerHostViewModel.cs
+++ b/Source/NETworkManager/ViewModels/PortScannerHostViewModel.cs
@@ -252,7 +252,7 @@ private void ScanProfileAction()
private void AddProfileAction()
{
ProfileDialogManager
- .ShowAddProfileDialog(this, this, _dialogCoordinator, null, null, ApplicationName.PortScanner)
+ .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.PortScanner)
.ConfigureAwait(false);
}
diff --git a/Source/NETworkManager/ViewModels/PowerShellHostViewModel.cs b/Source/NETworkManager/ViewModels/PowerShellHostViewModel.cs
index 7165e98b05..6e28099cfb 100644
--- a/Source/NETworkManager/ViewModels/PowerShellHostViewModel.cs
+++ b/Source/NETworkManager/ViewModels/PowerShellHostViewModel.cs
@@ -359,7 +359,7 @@ private void ConnectProfileExternalAction()
private void AddProfileAction()
{
ProfileDialogManager
- .ShowAddProfileDialog(this, this, _dialogCoordinator, null, null, ApplicationName.PowerShell)
+ .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.PowerShell)
.ConfigureAwait(false);
}
diff --git a/Source/NETworkManager/ViewModels/ProfilesViewModel.cs b/Source/NETworkManager/ViewModels/ProfilesViewModel.cs
index e71def69ba..2861c637a1 100644
--- a/Source/NETworkManager/ViewModels/ProfilesViewModel.cs
+++ b/Source/NETworkManager/ViewModels/ProfilesViewModel.cs
@@ -3,6 +3,7 @@
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
+using System.Windows;
using System.Windows.Data;
using System.Windows.Input;
using System.Windows.Threading;
@@ -165,7 +166,7 @@ public bool IsSearching
private void AddProfileAction()
{
- ProfileDialogManager.ShowAddProfileDialog(this, this, _dialogCoordinator, null, SelectedGroup?.Name)
+ ProfileDialogManager.ShowAddProfileDialog(Application.Current.MainWindow, this, null, SelectedGroup?.Name)
.ConfigureAwait(false);
}
diff --git a/Source/NETworkManager/ViewModels/PuTTYHostViewModel.cs b/Source/NETworkManager/ViewModels/PuTTYHostViewModel.cs
index e560490cf1..a295673b6d 100644
--- a/Source/NETworkManager/ViewModels/PuTTYHostViewModel.cs
+++ b/Source/NETworkManager/ViewModels/PuTTYHostViewModel.cs
@@ -366,7 +366,7 @@ private void ConnectProfileExternalAction()
private void AddProfileAction()
{
- ProfileDialogManager.ShowAddProfileDialog(this, this, _dialogCoordinator, null, null, ApplicationName.PuTTY)
+ ProfileDialogManager.ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.PuTTY)
.ConfigureAwait(false);
}
diff --git a/Source/NETworkManager/ViewModels/RemoteDesktopHostViewModel.cs b/Source/NETworkManager/ViewModels/RemoteDesktopHostViewModel.cs
index 9995bbf22c..9205e65a6a 100644
--- a/Source/NETworkManager/ViewModels/RemoteDesktopHostViewModel.cs
+++ b/Source/NETworkManager/ViewModels/RemoteDesktopHostViewModel.cs
@@ -337,7 +337,7 @@ private void ConnectProfileExternalAction()
private void AddProfileAction()
{
ProfileDialogManager
- .ShowAddProfileDialog(this, this, _dialogCoordinator, null, null, ApplicationName.RemoteDesktop)
+ .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.RemoteDesktop)
.ConfigureAwait(false);
}
diff --git a/Source/NETworkManager/ViewModels/SNMPHostViewModel.cs b/Source/NETworkManager/ViewModels/SNMPHostViewModel.cs
index d624478b5b..898b1dc8eb 100644
--- a/Source/NETworkManager/ViewModels/SNMPHostViewModel.cs
+++ b/Source/NETworkManager/ViewModels/SNMPHostViewModel.cs
@@ -249,7 +249,7 @@ private void AddTabProfileAction()
private void AddProfileAction()
{
- ProfileDialogManager.ShowAddProfileDialog(this, this, _dialogCoordinator, null, null, ApplicationName.SNMP)
+ ProfileDialogManager.ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.SNMP)
.ConfigureAwait(false);
}
diff --git a/Source/NETworkManager/ViewModels/TigerVNCHostViewModel.cs b/Source/NETworkManager/ViewModels/TigerVNCHostViewModel.cs
index 9240e006f6..ae9005b4bf 100644
--- a/Source/NETworkManager/ViewModels/TigerVNCHostViewModel.cs
+++ b/Source/NETworkManager/ViewModels/TigerVNCHostViewModel.cs
@@ -301,7 +301,7 @@ private void ConnectProfileExternalAction()
private void AddProfileAction()
{
- ProfileDialogManager.ShowAddProfileDialog(this, this, _dialogCoordinator, null, null, ApplicationName.TigerVNC)
+ ProfileDialogManager.ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.TigerVNC)
.ConfigureAwait(false);
}
diff --git a/Source/NETworkManager/ViewModels/TracerouteHostViewModel.cs b/Source/NETworkManager/ViewModels/TracerouteHostViewModel.cs
index dee7c15f94..6100e9ffc5 100644
--- a/Source/NETworkManager/ViewModels/TracerouteHostViewModel.cs
+++ b/Source/NETworkManager/ViewModels/TracerouteHostViewModel.cs
@@ -252,7 +252,7 @@ private void TraceProfileAction()
private void AddProfileAction()
{
ProfileDialogManager
- .ShowAddProfileDialog(this, this, _dialogCoordinator, null, null, ApplicationName.Traceroute)
+ .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.Traceroute)
.ConfigureAwait(false);
}
diff --git a/Source/NETworkManager/ViewModels/WakeOnLANViewModel.cs b/Source/NETworkManager/ViewModels/WakeOnLANViewModel.cs
index 03175c4d35..33cca4ba2c 100644
--- a/Source/NETworkManager/ViewModels/WakeOnLANViewModel.cs
+++ b/Source/NETworkManager/ViewModels/WakeOnLANViewModel.cs
@@ -308,7 +308,7 @@ private void WakeUpProfileAction()
private void AddProfileAction()
{
- ProfileDialogManager.ShowAddProfileDialog(this, this, _dialogCoordinator, null, null, ApplicationName.WakeOnLAN)
+ ProfileDialogManager.ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.WakeOnLAN)
.ConfigureAwait(false);
}
diff --git a/Source/NETworkManager/ViewModels/WebConsoleHostViewModel.cs b/Source/NETworkManager/ViewModels/WebConsoleHostViewModel.cs
index 59dbf9c47e..21c577b541 100644
--- a/Source/NETworkManager/ViewModels/WebConsoleHostViewModel.cs
+++ b/Source/NETworkManager/ViewModels/WebConsoleHostViewModel.cs
@@ -299,7 +299,7 @@ private void ConnectProfileAction()
private void AddProfileAction()
{
ProfileDialogManager
- .ShowAddProfileDialog(this, this, _dialogCoordinator, null, null, ApplicationName.WebConsole)
+ .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.WebConsole)
.ConfigureAwait(false);
}
diff --git a/Source/NETworkManager/ViewModels/WhoisHostViewModel.cs b/Source/NETworkManager/ViewModels/WhoisHostViewModel.cs
index 68351a70ef..cd3ba9aa05 100644
--- a/Source/NETworkManager/ViewModels/WhoisHostViewModel.cs
+++ b/Source/NETworkManager/ViewModels/WhoisHostViewModel.cs
@@ -251,7 +251,7 @@ private void QueryProfileAction()
private void AddProfileAction()
{
- ProfileDialogManager.ShowAddProfileDialog(this, this, _dialogCoordinator, null, null, ApplicationName.Whois)
+ ProfileDialogManager.ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.Whois)
.ConfigureAwait(false);
}
diff --git a/Source/NETworkManager/Views/ProfileChildWindow.xaml b/Source/NETworkManager/Views/ProfileChildWindow.xaml
new file mode 100644
index 0000000000..0d43555bbd
--- /dev/null
+++ b/Source/NETworkManager/Views/ProfileChildWindow.xaml
@@ -0,0 +1,4626 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Source/NETworkManager/Views/ProfileChildWindow.xaml.cs b/Source/NETworkManager/Views/ProfileChildWindow.xaml.cs
new file mode 100644
index 0000000000..5e18fb6ef4
--- /dev/null
+++ b/Source/NETworkManager/Views/ProfileChildWindow.xaml.cs
@@ -0,0 +1,52 @@
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Input;
+
+namespace NETworkManager.Views;
+
+public partial class ProfileChildWindow
+{
+ // Set name as hostname (if empty or identical)
+ private string _oldName = string.Empty;
+
+ public ProfileChildWindow(Window parentWindow)
+ {
+ InitializeComponent();
+
+ // Set the width and height of the child window based on the parent window size
+ ChildWindowMaxWidth = 1050;
+ ChildWindowMaxHeight = 650;
+ ChildWindowWidth = parentWindow.ActualWidth * 0.85;
+ ChildWindowHeight = parentWindow.ActualHeight * 0.85;
+
+ // Update the size of the child window when the parent window is resized
+ parentWindow.SizeChanged += (_, _) =>
+ {
+ ChildWindowWidth = parentWindow.ActualWidth * 0.85;
+ ChildWindowHeight = parentWindow.ActualHeight * 0.85;
+ };
+ }
+
+ private void UserControl_Loaded(object sender, RoutedEventArgs e)
+ {
+ TextBoxName.Focus();
+ }
+
+ private void TextBoxName_OnGotFocus(object sender, RoutedEventArgs e)
+ {
+ _oldName = TextBoxName.Text;
+ }
+
+ private void TextBoxName_OnTextChanged(object sender, TextChangedEventArgs e)
+ {
+ if (_oldName == TextBoxHost.Text)
+ TextBoxHost.Text = TextBoxName.Text;
+
+ _oldName = TextBoxName.Text;
+ }
+
+ private void ScrollViewer_ManipulationBoundaryFeedback(object sender, ManipulationBoundaryFeedbackEventArgs e)
+ {
+ e.Handled = true;
+ }
+}
\ No newline at end of file
From e31ef7432e3e0dd98330f25fe586e81a4f5a09ce Mon Sep 17 00:00:00 2001
From: BornToBeRoot <16019165+BornToBeRoot@users.noreply.github.com>
Date: Mon, 23 Jun 2025 02:58:40 +0200
Subject: [PATCH 2/9] Chore: Adjust some colors & validations
---
.../BindingProxy.cs | 2 +-
Source/NETworkManager/MainWindow.xaml | 21 +++-
.../Resources/Styles/RectangleStyles.xaml | 12 +-
.../Templates/ValidationErrorTemplates.xaml | 109 ++++++++++--------
.../Views/ProfileChildWindow.xaml | 11 +-
5 files changed, 87 insertions(+), 68 deletions(-)
diff --git a/Source/NETworkManager.Utilities.WPF/BindingProxy.cs b/Source/NETworkManager.Utilities.WPF/BindingProxy.cs
index d35f951fc6..8906a9febf 100644
--- a/Source/NETworkManager.Utilities.WPF/BindingProxy.cs
+++ b/Source/NETworkManager.Utilities.WPF/BindingProxy.cs
@@ -17,4 +17,4 @@ protected override Freezable CreateInstanceCore()
{
return new BindingProxy();
}
-}
\ No newline at end of file
+}
diff --git a/Source/NETworkManager/MainWindow.xaml b/Source/NETworkManager/MainWindow.xaml
index 0003695288..b7543c4c43 100644
--- a/Source/NETworkManager/MainWindow.xaml
+++ b/Source/NETworkManager/MainWindow.xaml
@@ -238,16 +238,25 @@
diff --git a/Source/NETworkManager/Resources/Styles/RectangleStyles.xaml b/Source/NETworkManager/Resources/Styles/RectangleStyles.xaml
index e9d33f5ddf..31585c9008 100644
--- a/Source/NETworkManager/Resources/Styles/RectangleStyles.xaml
+++ b/Source/NETworkManager/Resources/Styles/RectangleStyles.xaml
@@ -40,7 +40,7 @@
-
+
@@ -54,7 +54,7 @@
-
+
@@ -82,7 +82,7 @@
-
+
@@ -95,7 +95,7 @@
-
+
@@ -155,7 +155,7 @@
-
+
@@ -181,7 +181,7 @@
-
+
diff --git a/Source/NETworkManager/Resources/Templates/ValidationErrorTemplates.xaml b/Source/NETworkManager/Resources/Templates/ValidationErrorTemplates.xaml
index 06d1bc472a..a07efd94c5 100644
--- a/Source/NETworkManager/Resources/Templates/ValidationErrorTemplates.xaml
+++ b/Source/NETworkManager/Resources/Templates/ValidationErrorTemplates.xaml
@@ -5,62 +5,73 @@
-
-
-
+
+ -->
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
-
-
+
-
-
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Source/NETworkManager/Views/ProfileChildWindow.xaml b/Source/NETworkManager/Views/ProfileChildWindow.xaml
index 0d43555bbd..0b0e41f089 100644
--- a/Source/NETworkManager/Views/ProfileChildWindow.xaml
+++ b/Source/NETworkManager/Views/ProfileChildWindow.xaml
@@ -22,12 +22,11 @@
ShowTitleBar="True"
TitleBarBackground="Transparent"
TitleBarNonActiveBackground="Transparent"
- TitleFontSize="18"
- Loaded="UserControl_Loaded"
- TitleForeground="{DynamicResource MahApps.Brushes.Gray3}"
- CloseByEscape="False"
- Padding="20"
- OverlayBrush="{DynamicResource ResourceKey=MahApps.Brushes.Gray.SemiTransparent}"
+ ShowCloseButton="True"
+ Loaded="UserControl_Loaded"
+ TitleForeground="{DynamicResource MahApps.Brushes.Gray3}"
+ CloseByEscape="False"
+ OverlayBrush="{DynamicResource ResourceKey=MahApps.Brushes.Gray.SemiTransparent}"
mc:Ignorable="d" d:DataContext="{d:DesignInstance viewModels:ProfileViewModel}">
From c4062713d06c7927abbc96e3f4e6b591e5e9907f Mon Sep 17 00:00:00 2001
From: BornToBeRoot <16019165+BornToBeRoot@users.noreply.github.com>
Date: Mon, 23 Jun 2025 05:23:53 +0200
Subject: [PATCH 3/9] Feature: Improve design / dialogs
---
Source/NETworkManager/MainWindow.xaml.cs | 2 +
Source/NETworkManager/NETworkManager.csproj | 5 +
Source/NETworkManager/ProfileDialogManager.cs | 129 +-
.../Resources/Styles/TextBlockStyles.xaml | 8 +-
.../Templates/ValidationErrorTemplates.xaml | 21 +-
.../AWSSessionManagerHostViewModel.cs | 6 +-
.../ViewModels/DNSLookupHostViewModel.cs | 6 +-
.../ViewModels/IPGeolocationHostViewModel.cs | 6 +-
.../ViewModels/IPScannerHostViewModel.cs | 6 +-
.../ViewModels/NetworkInterfaceViewModel.cs | 6 +-
.../ViewModels/PingMonitorHostViewModel.cs | 6 +-
.../ViewModels/PortScannerHostViewModel.cs | 6 +-
.../ViewModels/PowerShellHostViewModel.cs | 6 +-
.../ViewModels/ProfilesViewModel.cs | 8 +-
.../ViewModels/PuTTYHostViewModel.cs | 6 +-
.../ViewModels/RemoteDesktopHostViewModel.cs | 6 +-
.../ViewModels/SNMPHostViewModel.cs | 6 +-
.../ViewModels/TigerVNCHostViewModel.cs | 6 +-
.../ViewModels/TracerouteHostViewModel.cs | 6 +-
.../ViewModels/WakeOnLANViewModel.cs | 6 +-
.../ViewModels/WebConsoleHostViewModel.cs | 6 +-
.../ViewModels/WhoisHostViewModel.cs | 6 +-
.../Views/ConfirmDeleteChildWindow.xaml | 35 +
.../Views/ConfirmDeleteChildWindow.xaml.cs | 9 +
...entialsPasswordProfileFileChildWindow.xaml | 112 +-
...ialsPasswordProfileFileChildWindow.xaml.cs | 14 +-
.../Views/ProfileChildWindow.xaml | 20 +-
.../NETworkManager/Views/ProfileDialog.xaml | 4617 -----------------
.../Views/ProfileDialog.xaml.cs | 40 -
Source/NETworkManager/Views/ProfilesView.xaml | 119 +-
30 files changed, 310 insertions(+), 4925 deletions(-)
create mode 100644 Source/NETworkManager/Views/ConfirmDeleteChildWindow.xaml
create mode 100644 Source/NETworkManager/Views/ConfirmDeleteChildWindow.xaml.cs
delete mode 100644 Source/NETworkManager/Views/ProfileDialog.xaml
delete mode 100644 Source/NETworkManager/Views/ProfileDialog.xaml.cs
diff --git a/Source/NETworkManager/MainWindow.xaml.cs b/Source/NETworkManager/MainWindow.xaml.cs
index 891f37016f..2283b044c9 100644
--- a/Source/NETworkManager/MainWindow.xaml.cs
+++ b/Source/NETworkManager/MainWindow.xaml.cs
@@ -1442,6 +1442,8 @@ private async void LoadProfile(ProfileFileInfo info, bool showWrongPassword = fa
ProfileManager.Unload();
}, info.Name, showWrongPassword);
+ childWindow.Title = Strings.UnlockProfileFile;
+
childWindow.DataContext = viewModel;
ConfigurationManager.OnDialogOpen();
diff --git a/Source/NETworkManager/NETworkManager.csproj b/Source/NETworkManager/NETworkManager.csproj
index a64d71b66d..651c15fcca 100644
--- a/Source/NETworkManager/NETworkManager.csproj
+++ b/Source/NETworkManager/NETworkManager.csproj
@@ -141,6 +141,11 @@
Wpf
Designer
+
+ MSBuild:Compile
+ Wpf
+ Designer
+
diff --git a/Source/NETworkManager/ProfileDialogManager.cs b/Source/NETworkManager/ProfileDialogManager.cs
index f181c8efd8..dd95a33da0 100644
--- a/Source/NETworkManager/ProfileDialogManager.cs
+++ b/Source/NETworkManager/ProfileDialogManager.cs
@@ -10,6 +10,7 @@
using System;
using System.Collections.Generic;
using System.Configuration;
+using System.Diagnostics;
using System.Security;
using System.Threading.Tasks;
using System.Windows;
@@ -308,7 +309,7 @@ private static GroupInfo ParseGroupInfo(GroupViewModel instance)
{
Name = name,
Description = instance.Description?.Trim(),
-
+
Profiles = profiles,
// Remote Desktop
@@ -468,133 +469,139 @@ private static GroupInfo ParseGroupInfo(GroupViewModel instance)
#region Dialog to add, edit, copy as and delete profile
- public static Task ShowAddProfileDialog(Window parentWindow,IProfileManagerMinimal viewModel,
+ public static Task ShowAddProfileDialog(Window parentWindow, IProfileManagerMinimal viewModel,
ProfileInfo profile = null, string group = null,
ApplicationName applicationName = ApplicationName.None)
{
-
var childWindow = new ProfileChildWindow(parentWindow);
ProfileViewModel profileViewModel = new(instance =>
{
childWindow.IsOpen = false;
- Settings.ConfigurationManager.Current.IsChildWindowOpen = false;
-
+ Settings.ConfigurationManager.Current.IsChildWindowOpen = false;
+
viewModel.OnProfileManagerDialogClose();
-
+
ProfileManager.AddProfile(ParseProfileInfo(instance));
}, _ =>
{
+ Debug.WriteLine("Profile dialog closed without saving");
+
childWindow.IsOpen = false;
Settings.ConfigurationManager.Current.IsChildWindowOpen = false;
-
+
viewModel.OnProfileManagerDialogClose();
}, ProfileManager.GetGroupNames(), group, ProfileEditMode.Add, profile, applicationName);
childWindow.Title = Strings.AddProfile;
-
- childWindow.DataContext = profileViewModel;
+
+ childWindow.DataContext = profileViewModel;
+
+ viewModel.OnProfileManagerDialogOpen();
Settings.ConfigurationManager.Current.IsChildWindowOpen = true;
return parentWindow.ShowChildWindowAsync(childWindow);
}
- public static Task ShowEditProfileDialog(IProfileManagerMinimal viewModel,
- IDialogCoordinator dialogCoordinator, ProfileInfo profile)
+ public static Task ShowEditProfileDialog(Window parentWindow, IProfileManagerMinimal viewModel,
+ ProfileInfo profile)
{
- CustomDialog customDialog = new()
- {
- Title = Strings.EditProfile,
- Style = (Style)Application.Current.FindResource(DialogResourceKey)
- };
+ var childWindow = new ProfileChildWindow(parentWindow);
- ProfileViewModel profileViewModel = new(async instance =>
+ ProfileViewModel profileViewModel = new(instance =>
{
- await dialogCoordinator.HideMetroDialogAsync(viewModel, customDialog);
+ childWindow.IsOpen = false;
+ Settings.ConfigurationManager.Current.IsChildWindowOpen = false;
+
viewModel.OnProfileManagerDialogClose();
ProfileManager.ReplaceProfile(profile, ParseProfileInfo(instance));
- }, async _ =>
+ }, _ =>
{
- await dialogCoordinator.HideMetroDialogAsync(viewModel, customDialog);
+ childWindow.IsOpen = false;
+ Settings.ConfigurationManager.Current.IsChildWindowOpen = false;
+
viewModel.OnProfileManagerDialogClose();
}, ProfileManager.GetGroupNames(), profile.Group, ProfileEditMode.Edit, profile);
- customDialog.Content = new ProfileDialog
- {
- DataContext = profileViewModel
- };
+ childWindow.Title = Strings.EditProfile;
- viewModel.OnProfileManagerDialogOpen();
+ childWindow.DataContext = profileViewModel;
- return dialogCoordinator.ShowMetroDialogAsync(viewModel, customDialog);
+ viewModel.OnProfileManagerDialogOpen();
+
+ Settings.ConfigurationManager.Current.IsChildWindowOpen = true;
+
+ return parentWindow.ShowChildWindowAsync(childWindow);
}
- public static Task ShowCopyAsProfileDialog(IProfileManagerMinimal viewModel,
- IDialogCoordinator dialogCoordinator, ProfileInfo profile)
+ public static Task ShowCopyAsProfileDialog(Window parentWindow, IProfileManagerMinimal viewModel,
+ ProfileInfo profile)
{
- CustomDialog customDialog = new()
- {
- Title = Strings.CopyProfile,
- Style = (Style)Application.Current.FindResource(DialogResourceKey)
- };
+ var childWindow = new ProfileChildWindow(parentWindow);
- ProfileViewModel profileViewModel = new(async instance =>
+ ProfileViewModel profileViewModel = new(instance =>
{
- await dialogCoordinator.HideMetroDialogAsync(viewModel, customDialog);
+ childWindow.IsOpen = false;
+ Settings.ConfigurationManager.Current.IsChildWindowOpen = false;
+
viewModel.OnProfileManagerDialogClose();
ProfileManager.AddProfile(ParseProfileInfo(instance));
- }, async _ =>
+ }, _ =>
{
- await dialogCoordinator.HideMetroDialogAsync(viewModel, customDialog);
+ childWindow.IsOpen = false;
+ Settings.ConfigurationManager.Current.IsChildWindowOpen = false;
+
viewModel.OnProfileManagerDialogClose();
}, ProfileManager.GetGroupNames(), profile.Group, ProfileEditMode.Copy, profile);
- customDialog.Content = new ProfileDialog
- {
- DataContext = profileViewModel
- };
-
+ childWindow.Title = Strings.CopyProfile;
+
+ childWindow.DataContext = profileViewModel;
+
viewModel.OnProfileManagerDialogOpen();
+
+ Settings.ConfigurationManager.Current.IsChildWindowOpen = true;
- return dialogCoordinator.ShowMetroDialogAsync(viewModel, customDialog);
+ return parentWindow.ShowChildWindowAsync(childWindow);
}
- public static Task ShowDeleteProfileDialog(IProfileManagerMinimal viewModel,
- IDialogCoordinator dialogCoordinator, IList profiles)
+ public static Task ShowDeleteProfileDialog(Window parentWindow, IProfileManagerMinimal viewModel,
+ IList profiles)
{
- CustomDialog customDialog = new()
- {
- Title = profiles.Count == 1
- ? Strings.DeleteProfile
- : Strings.DeleteProfiles
- };
-
- ConfirmDeleteViewModel confirmDeleteViewModel = new(async _ =>
+ var childWindow = new ConfirmDeleteChildWindow();
+
+ ConfirmDeleteViewModel confirmDeleteViewModel = new(_ =>
{
- await dialogCoordinator.HideMetroDialogAsync(viewModel, customDialog);
+ childWindow.IsOpen = false;
+ Settings.ConfigurationManager.Current.IsChildWindowOpen = false;
+
viewModel.OnProfileManagerDialogClose();
ProfileManager.RemoveProfiles(profiles);
- }, async _ =>
+ }, _ =>
{
- await dialogCoordinator.HideMetroDialogAsync(viewModel, customDialog);
+ childWindow.IsOpen = false;
+ Settings.ConfigurationManager.Current.IsChildWindowOpen = false;
+
+
viewModel.OnProfileManagerDialogClose();
},
profiles.Count == 1
? Strings.DeleteProfileMessage
: Strings.DeleteProfilesMessage);
- customDialog.Content = new ConfirmDeleteDialog
- {
- DataContext = confirmDeleteViewModel
- };
+ childWindow.Title = Strings.DeleteProfile;
+
+ childWindow.DataContext = confirmDeleteViewModel;
viewModel.OnProfileManagerDialogOpen();
+
+ Settings.ConfigurationManager.Current.IsChildWindowOpen = true;
- return dialogCoordinator.ShowMetroDialogAsync(viewModel, customDialog);
+ return parentWindow.ShowChildWindowAsync(childWindow);
}
#endregion
diff --git a/Source/NETworkManager/Resources/Styles/TextBlockStyles.xaml b/Source/NETworkManager/Resources/Styles/TextBlockStyles.xaml
index 2ef0067312..886e024a66 100644
--- a/Source/NETworkManager/Resources/Styles/TextBlockStyles.xaml
+++ b/Source/NETworkManager/Resources/Styles/TextBlockStyles.xaml
@@ -28,7 +28,7 @@
+
-
+
\ No newline at end of file
diff --git a/Source/NETworkManager/Views/ProfileDialog.xaml b/Source/NETworkManager/Views/ProfileDialog.xaml
deleted file mode 100644
index 575d49cb28..0000000000
--- a/Source/NETworkManager/Views/ProfileDialog.xaml
+++ /dev/null
@@ -1,4617 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Source/NETworkManager/Views/ProfileDialog.xaml.cs b/Source/NETworkManager/Views/ProfileDialog.xaml.cs
deleted file mode 100644
index 5663e06dfc..0000000000
--- a/Source/NETworkManager/Views/ProfileDialog.xaml.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Input;
-
-namespace NETworkManager.Views;
-
-public partial class ProfileDialog
-{
- // Set name as hostname (if empty or identical)
- private string _oldName = string.Empty;
-
- public ProfileDialog()
- {
- InitializeComponent();
- }
-
- private void UserControl_Loaded(object sender, RoutedEventArgs e)
- {
- TextBoxName.Focus();
- }
-
- private void TextBoxName_OnGotFocus(object sender, RoutedEventArgs e)
- {
- _oldName = TextBoxName.Text;
- }
-
- private void TextBoxName_OnTextChanged(object sender, TextChangedEventArgs e)
- {
- if (_oldName == TextBoxHost.Text)
- TextBoxHost.Text = TextBoxName.Text;
-
- _oldName = TextBoxName.Text;
- }
-
- private void ScrollViewer_ManipulationBoundaryFeedback(object sender,
- ManipulationBoundaryFeedbackEventArgs e)
- {
- e.Handled = true;
- }
-}
\ No newline at end of file
diff --git a/Source/NETworkManager/Views/ProfilesView.xaml b/Source/NETworkManager/Views/ProfilesView.xaml
index ffe66b7a56..6ad9c4c684 100644
--- a/Source/NETworkManager/Views/ProfilesView.xaml
+++ b/Source/NETworkManager/Views/ProfilesView.xaml
@@ -263,111 +263,11 @@
SortMemberPath="Whois_Enabled" MinWidth="80" Width="Auto" />
-
-
-
-
-
-
+
-
From 6260d1f0ee87335afe698480a70db71045d555fd Mon Sep 17 00:00:00 2001
From: BornToBeRoot <16019165+BornToBeRoot@users.noreply.github.com>
Date: Mon, 23 Jun 2025 05:25:03 +0200
Subject: [PATCH 4/9] Chore: Cleanup
---
...entialsPasswordProfileFileChildWindow.xaml | 42 +------------------
1 file changed, 2 insertions(+), 40 deletions(-)
diff --git a/Source/NETworkManager/Views/CredentialsPasswordProfileFileChildWindow.xaml b/Source/NETworkManager/Views/CredentialsPasswordProfileFileChildWindow.xaml
index cc1756ab91..eb3e8b751f 100644
--- a/Source/NETworkManager/Views/CredentialsPasswordProfileFileChildWindow.xaml
+++ b/Source/NETworkManager/Views/CredentialsPasswordProfileFileChildWindow.xaml
@@ -75,29 +75,10 @@
-
-
From 9088777b99ad8f738083ba2050730c83062715c4 Mon Sep 17 00:00:00 2001
From: BornToBeRoot <16019165+BornToBeRoot@users.noreply.github.com>
Date: Tue, 24 Jun 2025 00:14:36 +0200
Subject: [PATCH 5/9] Feature: Delete dialog added
---
.../Views/ConfirmDeleteChildWindow.xaml | 25 ++++++++++++++++---
...entialsPasswordProfileFileChildWindow.xaml | 5 ++--
2 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/Source/NETworkManager/Views/ConfirmDeleteChildWindow.xaml b/Source/NETworkManager/Views/ConfirmDeleteChildWindow.xaml
index 0ebf687adc..ade7d6bdf3 100644
--- a/Source/NETworkManager/Views/ConfirmDeleteChildWindow.xaml
+++ b/Source/NETworkManager/Views/ConfirmDeleteChildWindow.xaml
@@ -6,6 +6,9 @@
xmlns:viewModels="clr-namespace:NETworkManager.ViewModels"
xmlns:localization="clr-namespace:NETworkManager.Localization.Resources;assembly=NETworkManager.Localization"
xmlns:simpleChildWindow="clr-namespace:MahApps.Metro.SimpleChildWindow;assembly=MahApps.Metro.SimpleChildWindow"
+ xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
+ ChildWindowWidth="450"
+ ChildWindowMaxHeight="500"
ShowTitleBar="True"
TitleBarBackground="Transparent"
TitleBarNonActiveBackground="Transparent"
@@ -22,9 +25,25 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/NETworkManager/Views/CredentialsPasswordProfileFileChildWindow.xaml b/Source/NETworkManager/Views/CredentialsPasswordProfileFileChildWindow.xaml
index eb3e8b751f..912bc8442c 100644
--- a/Source/NETworkManager/Views/CredentialsPasswordProfileFileChildWindow.xaml
+++ b/Source/NETworkManager/Views/CredentialsPasswordProfileFileChildWindow.xaml
@@ -49,9 +49,10 @@
+ Foreground="{DynamicResource MahApps.Brushes.Gray3}"/>
From dd1b5173d033b7881ad01b982d25f8d9b60979a8 Mon Sep 17 00:00:00 2001
From: BornToBeRoot <16019165+BornToBeRoot@users.noreply.github.com>
Date: Tue, 24 Jun 2025 00:55:46 +0200
Subject: [PATCH 6/9] Feature: Update OK Delete Info Dialog design
---
Source/NETworkManager/NETworkManager.csproj | 2 +-
Source/NETworkManager/ProfileDialogManager.cs | 53 ++++-----
.../AWSSessionManagerSettingsViewModel.cs | 43 ++++---
.../ViewModels/DNSLookupSettingsViewModel.cs | 51 ++++----
.../ViewModels/IPScannerSettingsViewModel.cs | 37 +++---
...del.cs => OKCancelInfoMessageViewModel.cs} | 6 +-
.../PortScannerSettingsViewModel.cs | 38 +++---
.../ViewModels/ProfilesViewModel.cs | 2 +-
.../ViewModels/SNMPSettingsViewModel.cs | 40 ++++---
.../ViewModels/SNTPLookupSettingsViewModel.cs | 32 ++---
.../ViewModels/SettingsProfilesViewModel.cs | 38 +++---
.../Views/AWSSessionManagerSettingsView.xaml | 108 ++++-------------
.../Views/ConfirmDeleteChildWindow.xaml.cs | 9 --
.../Views/ConfirmDeleteDialog.xaml | 26 -----
.../Views/ConfirmDeleteDialog.xaml.cs | 9 --
.../Views/DNSLookupSettingsView.xaml | 108 ++++-------------
.../Views/IPScannerSettingsView.xaml | 108 ++++-------------
...ml => OKCancelInfoMessageChildWindow.xaml} | 4 +-
.../OKCancelInfoMessageChildWindow.xaml.cs | 9 ++
.../Views/PortScannerSettingsView.xaml | 108 ++++-------------
.../Views/SNMPSettingsView.xaml | 108 ++++-------------
.../Views/SNTPLookupSettingsView.xaml | 107 ++++-------------
.../Views/SettingsProfilesView.xaml | 110 ++++--------------
23 files changed, 345 insertions(+), 811 deletions(-)
rename Source/NETworkManager/ViewModels/{ConfirmDeleteViewModel.cs => OKCancelInfoMessageViewModel.cs} (74%)
delete mode 100644 Source/NETworkManager/Views/ConfirmDeleteChildWindow.xaml.cs
delete mode 100644 Source/NETworkManager/Views/ConfirmDeleteDialog.xaml
delete mode 100644 Source/NETworkManager/Views/ConfirmDeleteDialog.xaml.cs
rename Source/NETworkManager/Views/{ConfirmDeleteChildWindow.xaml => OKCancelInfoMessageChildWindow.xaml} (97%)
create mode 100644 Source/NETworkManager/Views/OKCancelInfoMessageChildWindow.xaml.cs
diff --git a/Source/NETworkManager/NETworkManager.csproj b/Source/NETworkManager/NETworkManager.csproj
index 651c15fcca..e6165da77b 100644
--- a/Source/NETworkManager/NETworkManager.csproj
+++ b/Source/NETworkManager/NETworkManager.csproj
@@ -141,7 +141,7 @@
Wpf
Designer
-
+
MSBuild:Compile
Wpf
Designer
diff --git a/Source/NETworkManager/ProfileDialogManager.cs b/Source/NETworkManager/ProfileDialogManager.cs
index dd95a33da0..94cae98c51 100644
--- a/Source/NETworkManager/ProfileDialogManager.cs
+++ b/Source/NETworkManager/ProfileDialogManager.cs
@@ -475,7 +475,7 @@ public static Task ShowAddProfileDialog(Window parentWindow, IProfileManagerMini
{
var childWindow = new ProfileChildWindow(parentWindow);
- ProfileViewModel profileViewModel = new(instance =>
+ ProfileViewModel childWindowViewModel = new(instance =>
{
childWindow.IsOpen = false;
Settings.ConfigurationManager.Current.IsChildWindowOpen = false;
@@ -495,7 +495,7 @@ public static Task ShowAddProfileDialog(Window parentWindow, IProfileManagerMini
childWindow.Title = Strings.AddProfile;
- childWindow.DataContext = profileViewModel;
+ childWindow.DataContext = childWindowViewModel;
viewModel.OnProfileManagerDialogOpen();
@@ -509,7 +509,7 @@ public static Task ShowEditProfileDialog(Window parentWindow, IProfileManagerMin
{
var childWindow = new ProfileChildWindow(parentWindow);
- ProfileViewModel profileViewModel = new(instance =>
+ ProfileViewModel childWindowViewModel = new(instance =>
{
childWindow.IsOpen = false;
Settings.ConfigurationManager.Current.IsChildWindowOpen = false;
@@ -527,7 +527,7 @@ public static Task ShowEditProfileDialog(Window parentWindow, IProfileManagerMin
childWindow.Title = Strings.EditProfile;
- childWindow.DataContext = profileViewModel;
+ childWindow.DataContext = childWindowViewModel;
viewModel.OnProfileManagerDialogOpen();
@@ -541,7 +541,7 @@ public static Task ShowCopyAsProfileDialog(Window parentWindow, IProfileManagerM
{
var childWindow = new ProfileChildWindow(parentWindow);
- ProfileViewModel profileViewModel = new(instance =>
+ ProfileViewModel childWindowViewModel = new(instance =>
{
childWindow.IsOpen = false;
Settings.ConfigurationManager.Current.IsChildWindowOpen = false;
@@ -559,7 +559,7 @@ public static Task ShowCopyAsProfileDialog(Window parentWindow, IProfileManagerM
childWindow.Title = Strings.CopyProfile;
- childWindow.DataContext = profileViewModel;
+ childWindow.DataContext = childWindowViewModel;
viewModel.OnProfileManagerDialogOpen();
@@ -571,9 +571,9 @@ public static Task ShowCopyAsProfileDialog(Window parentWindow, IProfileManagerM
public static Task ShowDeleteProfileDialog(Window parentWindow, IProfileManagerMinimal viewModel,
IList profiles)
{
- var childWindow = new ConfirmDeleteChildWindow();
+ var childWindow = new OKCancelInfoMessageChildWindow();
- ConfirmDeleteViewModel confirmDeleteViewModel = new(_ =>
+ OKCancelInfoMessageViewModel childWindowViewModel = new(_ =>
{
childWindow.IsOpen = false;
Settings.ConfigurationManager.Current.IsChildWindowOpen = false;
@@ -586,7 +586,6 @@ public static Task ShowDeleteProfileDialog(Window parentWindow, IProfileManagerM
childWindow.IsOpen = false;
Settings.ConfigurationManager.Current.IsChildWindowOpen = false;
-
viewModel.OnProfileManagerDialogClose();
},
profiles.Count == 1
@@ -595,7 +594,7 @@ public static Task ShowDeleteProfileDialog(Window parentWindow, IProfileManagerM
childWindow.Title = Strings.DeleteProfile;
- childWindow.DataContext = confirmDeleteViewModel;
+ childWindow.DataContext = childWindowViewModel;
viewModel.OnProfileManagerDialogOpen();
@@ -669,34 +668,36 @@ public static Task ShowEditGroupDialog(IProfileManagerMinimal viewModel, IDialog
return dialogCoordinator.ShowMetroDialogAsync(viewModel, customDialog);
}
- public static Task ShowDeleteGroupDialog(IProfileManagerMinimal viewModel,
- IDialogCoordinator dialogCoordinator, GroupInfo group)
+ public static Task ShowDeleteGroupDialog(Window parentWindow, IProfileManagerMinimal viewModel,
+ GroupInfo group)
{
- CustomDialog customDialog = new()
- {
- Title = Strings.DeleteGroup
- };
-
- ConfirmDeleteViewModel confirmDeleteViewModel = new(async _ =>
+ var childWindow = new OKCancelInfoMessageChildWindow();
+
+ OKCancelInfoMessageViewModel childWindowViewModel = new(_ =>
{
- await dialogCoordinator.HideMetroDialogAsync(viewModel, customDialog);
+ childWindow.IsOpen = false;
+ Settings.ConfigurationManager.Current.IsChildWindowOpen = false;
+
viewModel.OnProfileManagerDialogClose();
ProfileManager.RemoveGroup(group);
- }, async _ =>
+ }, _ =>
{
- await dialogCoordinator.HideMetroDialogAsync(viewModel, customDialog);
+ childWindow.IsOpen = false;
+ Settings.ConfigurationManager.Current.IsChildWindowOpen = false;
+
viewModel.OnProfileManagerDialogClose();
}, Strings.DeleteGroupMessage);
- customDialog.Content = new ConfirmDeleteDialog
- {
- DataContext = confirmDeleteViewModel
- };
+ childWindow.Title = Strings.DeleteGroup;
+
+ childWindow.DataContext = childWindowViewModel;
viewModel.OnProfileManagerDialogOpen();
- return dialogCoordinator.ShowMetroDialogAsync(viewModel, customDialog);
+ Settings.ConfigurationManager.Current.IsChildWindowOpen = true;
+
+ return parentWindow.ShowChildWindowAsync(childWindow);
}
#endregion
diff --git a/Source/NETworkManager/ViewModels/AWSSessionManagerSettingsViewModel.cs b/Source/NETworkManager/ViewModels/AWSSessionManagerSettingsViewModel.cs
index 04c2160bc6..a2ba562bb3 100644
--- a/Source/NETworkManager/ViewModels/AWSSessionManagerSettingsViewModel.cs
+++ b/Source/NETworkManager/ViewModels/AWSSessionManagerSettingsViewModel.cs
@@ -3,10 +3,11 @@
using System.Diagnostics;
using System.IO;
using System.Threading.Tasks;
+using System.Windows;
using System.Windows.Data;
-using System.Windows.Forms;
using System.Windows.Input;
using MahApps.Metro.Controls.Dialogs;
+using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Localization.Resources;
using NETworkManager.Models.AWS;
using NETworkManager.Settings;
@@ -207,12 +208,12 @@ private void DeleteAWSProfileAction()
private void BrowseFileAction()
{
- var openFileDialog = new OpenFileDialog
+ var openFileDialog = new System.Windows.Forms.OpenFileDialog
{
Filter = GlobalStaticConfiguration.ApplicationFileExtensionFilter
};
- if (openFileDialog.ShowDialog() == DialogResult.OK)
+ if (openFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
ApplicationFilePath = openFileDialog.FileName;
}
@@ -274,27 +275,31 @@ public async Task EditAWSProfile()
await _dialogCoordinator.ShowMetroDialogAsync(this, customDialog);
}
- private async Task DeleteAWSProfile()
+ private Task DeleteAWSProfile()
{
- var customDialog = new CustomDialog
- {
- Title = Strings.DeleteAWSProfile
- };
+ var childWindow = new OKCancelInfoMessageChildWindow();
- var viewModel = new ConfirmDeleteViewModel(_ =>
+ var childWindowViewModel = new OKCancelInfoMessageViewModel(_ =>
{
- _dialogCoordinator.HideMetroDialogAsync(this, customDialog);
+ childWindow.IsOpen = false;
+ ConfigurationManager.Current.IsChildWindowOpen = false;
SettingsManager.Current.AWSSessionManager_AWSProfiles.Remove(SelectedAWSProfile);
- }, _ => { _dialogCoordinator.HideMetroDialogAsync(this, customDialog); },
- Strings.DeleteAWSProfileMessage);
-
- customDialog.Content = new ConfirmDeleteDialog
- {
- DataContext = viewModel
- };
-
- await _dialogCoordinator.ShowMetroDialogAsync(this, customDialog);
+ }, _ =>
+ {
+ childWindow.IsOpen = false;
+ ConfigurationManager.Current.IsChildWindowOpen = false;
+ },
+ Strings.DeleteAWSProfileMessage
+ );
+
+ childWindow.Title = Strings.DeleteAWSProfile;
+
+ childWindow.DataContext = childWindowViewModel;
+
+ ConfigurationManager.Current.IsChildWindowOpen = true;
+
+ return (Application.Current.MainWindow as MainWindow).ShowChildWindowAsync(childWindow);
}
private async Task Configure()
diff --git a/Source/NETworkManager/ViewModels/DNSLookupSettingsViewModel.cs b/Source/NETworkManager/ViewModels/DNSLookupSettingsViewModel.cs
index d7634f1267..defa8b9d6e 100644
--- a/Source/NETworkManager/ViewModels/DNSLookupSettingsViewModel.cs
+++ b/Source/NETworkManager/ViewModels/DNSLookupSettingsViewModel.cs
@@ -10,8 +10,10 @@
using System.ComponentModel;
using System.Linq;
using System.Threading.Tasks;
+using System.Windows;
using System.Windows.Data;
using System.Windows.Input;
+using MahApps.Metro.SimpleChildWindow;
namespace NETworkManager.ViewModels;
@@ -41,8 +43,11 @@ public DNSServerConnectionInfoProfile SelectedDNSServer
}
}
- private List ServerInfoProfileNames => [.. SettingsManager.Current.DNSLookup_DNSServers
- .Where(x => !x.UseWindowsDNSServer).Select(x => x.Name)];
+ private List ServerInfoProfileNames =>
+ [
+ .. SettingsManager.Current.DNSLookup_DNSServers
+ .Where(x => !x.UseWindowsDNSServer).Select(x => x.Name)
+ ];
private bool _addDNSSuffix;
@@ -154,10 +159,10 @@ public QueryClass QueryClass
}
}
- /*
+ /*
* Disabled until more query types are implemented.
- *
-
+ *
+
private bool _showOnlyMostCommonQueryTypes;
public bool ShowOnlyMostCommonQueryTypes
@@ -352,27 +357,31 @@ public async Task EditDNSServer()
await _dialogCoordinator.ShowMetroDialogAsync(this, customDialog);
}
- private async Task DeleteDNSServer()
+ private Task DeleteDNSServer()
{
- var customDialog = new CustomDialog
- {
- Title = Strings.DeleteDNSServer
- };
+ var childWindow = new OKCancelInfoMessageChildWindow();
- var viewModel = new ConfirmDeleteViewModel(_ =>
+ var childWindowViewModel = new OKCancelInfoMessageViewModel(_ =>
{
- _dialogCoordinator.HideMetroDialogAsync(this, customDialog);
+ childWindow.IsOpen = false;
+ ConfigurationManager.Current.IsChildWindowOpen = false;
SettingsManager.Current.DNSLookup_DNSServers.Remove(SelectedDNSServer);
- }, _ => { _dialogCoordinator.HideMetroDialogAsync(this, customDialog); },
- Strings.DeleteDNSServerMessage);
-
- customDialog.Content = new ConfirmDeleteDialog
- {
- DataContext = viewModel
- };
-
- await _dialogCoordinator.ShowMetroDialogAsync(this, customDialog);
+ }, _ =>
+ {
+ childWindow.IsOpen = false;
+ ConfigurationManager.Current.IsChildWindowOpen = false;
+ },
+ Strings.DeleteDNSServerMessage
+ );
+
+ childWindow.Title = Strings.DeleteDNSServer;
+
+ childWindow.DataContext = childWindowViewModel;
+
+ ConfigurationManager.Current.IsChildWindowOpen = true;
+
+ return (Application.Current.MainWindow as MainWindow).ShowChildWindowAsync(childWindow);
}
#endregion
diff --git a/Source/NETworkManager/ViewModels/IPScannerSettingsViewModel.cs b/Source/NETworkManager/ViewModels/IPScannerSettingsViewModel.cs
index 3ab2ee132c..ca5ecf0796 100644
--- a/Source/NETworkManager/ViewModels/IPScannerSettingsViewModel.cs
+++ b/Source/NETworkManager/ViewModels/IPScannerSettingsViewModel.cs
@@ -1,7 +1,10 @@
using System.ComponentModel;
+using System.Threading.Tasks;
+using System.Windows;
using System.Windows.Data;
using System.Windows.Input;
using MahApps.Metro.Controls.Dialogs;
+using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Localization.Resources;
using NETworkManager.Settings;
using NETworkManager.Utilities;
@@ -328,7 +331,7 @@ private void EditCustomCommandAction()
private void DeleteCustomCommandAction()
{
- DeleteCustomCommand();
+ DeleteCustomCommand().ConfigureAwait(false);
}
#endregion
@@ -382,27 +385,31 @@ public async void EditCustomCommand()
await _dialogCoordinator.ShowMetroDialogAsync(this, customDialog);
}
- private async void DeleteCustomCommand()
+ private Task DeleteCustomCommand()
{
- var customDialog = new CustomDialog
- {
- Title = Strings.DeleteCustomCommand
- };
+ var childWindow = new OKCancelInfoMessageChildWindow();
- var confirmDeleteViewModel = new ConfirmDeleteViewModel(_ =>
+ var childWindowViewModel = new OKCancelInfoMessageViewModel(_ =>
{
- _dialogCoordinator.HideMetroDialogAsync(this, customDialog);
+ childWindow.IsOpen = false;
+ ConfigurationManager.Current.IsChildWindowOpen = false;
SettingsManager.Current.IPScanner_CustomCommands.Remove(SelectedCustomCommand);
- }, _ => { _dialogCoordinator.HideMetroDialogAsync(this, customDialog); },
- Strings.DeleteCustomCommandMessage);
+ }, _ =>
+ {
+ childWindow.IsOpen = false;
+ ConfigurationManager.Current.IsChildWindowOpen = false;
+ },
+ Strings.DeleteCustomCommandMessage
+ );
- customDialog.Content = new ConfirmDeleteDialog
- {
- DataContext = confirmDeleteViewModel
- };
+ childWindow.Title = Strings.DeleteCustomCommand;
- await _dialogCoordinator.ShowMetroDialogAsync(this, customDialog);
+ childWindow.DataContext = childWindowViewModel;
+
+ ConfigurationManager.Current.IsChildWindowOpen = true;
+
+ return (Application.Current.MainWindow as MainWindow).ShowChildWindowAsync(childWindow);
}
#endregion
diff --git a/Source/NETworkManager/ViewModels/ConfirmDeleteViewModel.cs b/Source/NETworkManager/ViewModels/OKCancelInfoMessageViewModel.cs
similarity index 74%
rename from Source/NETworkManager/ViewModels/ConfirmDeleteViewModel.cs
rename to Source/NETworkManager/ViewModels/OKCancelInfoMessageViewModel.cs
index 3c481d11da..a6ca63ab39 100644
--- a/Source/NETworkManager/ViewModels/ConfirmDeleteViewModel.cs
+++ b/Source/NETworkManager/ViewModels/OKCancelInfoMessageViewModel.cs
@@ -4,12 +4,12 @@
namespace NETworkManager.ViewModels;
-public class ConfirmDeleteViewModel : ViewModelBase
+public class OKCancelInfoMessageViewModel : ViewModelBase
{
private readonly string _message;
- public ConfirmDeleteViewModel(Action deleteCommand,
- Action cancelHandler, string message)
+ public OKCancelInfoMessageViewModel(Action deleteCommand,
+ Action cancelHandler, string message)
{
DeleteCommand = new RelayCommand(_ => deleteCommand(this));
CancelCommand = new RelayCommand(_ => cancelHandler(this));
diff --git a/Source/NETworkManager/ViewModels/PortScannerSettingsViewModel.cs b/Source/NETworkManager/ViewModels/PortScannerSettingsViewModel.cs
index 10819086ca..2ddb475149 100644
--- a/Source/NETworkManager/ViewModels/PortScannerSettingsViewModel.cs
+++ b/Source/NETworkManager/ViewModels/PortScannerSettingsViewModel.cs
@@ -1,8 +1,10 @@
using System.ComponentModel;
using System.Threading.Tasks;
+using System.Windows;
using System.Windows.Data;
using System.Windows.Input;
using MahApps.Metro.Controls.Dialogs;
+using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Localization.Resources;
using NETworkManager.Models.Network;
using NETworkManager.Settings;
@@ -230,27 +232,31 @@ public async Task EditPortProfile()
await _dialogCoordinator.ShowMetroDialogAsync(this, customDialog);
}
- private async Task DeletePortProfile()
+ private Task DeletePortProfile()
{
- var customDialog = new CustomDialog
- {
- Title = Strings.DeletePortProfile
- };
+ var childWindow = new OKCancelInfoMessageChildWindow();
- var confirmDeleteViewModel = new ConfirmDeleteViewModel(async _ =>
+ var childWindowViewModel = new OKCancelInfoMessageViewModel(async _ =>
{
- await _dialogCoordinator.HideMetroDialogAsync(this, customDialog);
+ childWindow.IsOpen = false;
+ ConfigurationManager.Current.IsChildWindowOpen = false;
SettingsManager.Current.PortScanner_PortProfiles.Remove(SelectedPortProfile);
- }, async _ => { await _dialogCoordinator.HideMetroDialogAsync(this, customDialog); },
- Strings.DeletePortProfileMessage);
-
- customDialog.Content = new ConfirmDeleteDialog
- {
- DataContext = confirmDeleteViewModel
- };
-
- await _dialogCoordinator.ShowMetroDialogAsync(this, customDialog);
+ }, async _ =>
+ {
+ childWindow.IsOpen = false;
+ ConfigurationManager.Current.IsChildWindowOpen = false;
+ },
+ Strings.DeletePortProfileMessage
+ );
+
+ childWindow.Title = Strings.DeletePortProfile;
+
+ childWindow.DataContext = childWindowViewModel;
+
+ ConfigurationManager.Current.IsChildWindowOpen = true;
+
+ return (Application.Current.MainWindow as MainWindow).ShowChildWindowAsync(childWindow);
}
#endregion
diff --git a/Source/NETworkManager/ViewModels/ProfilesViewModel.cs b/Source/NETworkManager/ViewModels/ProfilesViewModel.cs
index 939bf67c5e..efb5deb5ba 100644
--- a/Source/NETworkManager/ViewModels/ProfilesViewModel.cs
+++ b/Source/NETworkManager/ViewModels/ProfilesViewModel.cs
@@ -221,7 +221,7 @@ private void EditGroupAction()
private void DeleteGroupAction()
{
- ProfileDialogManager.ShowDeleteGroupDialog(this, _dialogCoordinator, SelectedGroup).ConfigureAwait(false);
+ ProfileDialogManager.ShowDeleteGroupDialog(Application.Current.MainWindow, this, SelectedGroup).ConfigureAwait(false);
}
#endregion
diff --git a/Source/NETworkManager/ViewModels/SNMPSettingsViewModel.cs b/Source/NETworkManager/ViewModels/SNMPSettingsViewModel.cs
index 8f01f821d9..2ad88b2e84 100644
--- a/Source/NETworkManager/ViewModels/SNMPSettingsViewModel.cs
+++ b/Source/NETworkManager/ViewModels/SNMPSettingsViewModel.cs
@@ -3,10 +3,12 @@
using System.ComponentModel;
using System.Linq;
using System.Threading.Tasks;
+using System.Windows;
using System.Windows.Data;
using System.Windows.Input;
using Lextm.SharpSnmpLib.Messaging;
using MahApps.Metro.Controls.Dialogs;
+using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Localization.Resources;
using NETworkManager.Models.Network;
using NETworkManager.Settings;
@@ -199,27 +201,31 @@ public async Task EditOIDProfile()
await _dialogCoordinator.ShowMetroDialogAsync(this, customDialog);
}
- private async Task DeleteOIDProfile()
+ private Task DeleteOIDProfile()
{
- var customDialog = new CustomDialog
- {
- Title = Strings.DeleteOIDProfile
- };
-
- var confirmDeleteViewModel = new ConfirmDeleteViewModel(_ =>
+ var childWindow = new OKCancelInfoMessageChildWindow();
+
+ var childWindowViewModel = new OKCancelInfoMessageViewModel(_ =>
{
- _dialogCoordinator.HideMetroDialogAsync(this, customDialog);
+ childWindow.IsOpen = false;
+ ConfigurationManager.Current.IsChildWindowOpen = false;
SettingsManager.Current.SNMP_OidProfiles.Remove(SelectedOIDProfile);
- }, _ => { _dialogCoordinator.HideMetroDialogAsync(this, customDialog); },
- Strings.DeleteOIDProfileMessage);
-
- customDialog.Content = new ConfirmDeleteDialog
- {
- DataContext = confirmDeleteViewModel
- };
-
- await _dialogCoordinator.ShowMetroDialogAsync(this, customDialog);
+ }, _ =>
+ {
+ childWindow.IsOpen = false;
+ ConfigurationManager.Current.IsChildWindowOpen = false;
+ },
+ Strings.DeleteOIDProfileMessage
+ );
+
+ childWindow.Title = Strings.DeleteOIDProfile;
+
+ childWindow.DataContext = childWindowViewModel;
+
+ ConfigurationManager.Current.IsChildWindowOpen = true;
+
+ return (Application.Current.MainWindow as MainWindow).ShowChildWindowAsync(childWindow);
}
#endregion
diff --git a/Source/NETworkManager/ViewModels/SNTPLookupSettingsViewModel.cs b/Source/NETworkManager/ViewModels/SNTPLookupSettingsViewModel.cs
index c702a79fe5..46a8e4ed4e 100644
--- a/Source/NETworkManager/ViewModels/SNTPLookupSettingsViewModel.cs
+++ b/Source/NETworkManager/ViewModels/SNTPLookupSettingsViewModel.cs
@@ -2,9 +2,11 @@
using System.ComponentModel;
using System.Linq;
using System.Threading.Tasks;
+using System.Windows;
using System.Windows.Data;
using System.Windows.Input;
using MahApps.Metro.Controls.Dialogs;
+using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Localization.Resources;
using NETworkManager.Models.Network;
using NETworkManager.Settings;
@@ -183,27 +185,31 @@ public async Task EditServer()
await _dialogCoordinator.ShowMetroDialogAsync(this, customDialog);
}
- private async Task DeleteServer()
+ private Task DeleteServer()
{
- var customDialog = new CustomDialog
- {
- Title = Strings.DeleteSNTPServer
- };
+ var childWindow = new OKCancelInfoMessageChildWindow();
+
- var viewModel = new ConfirmDeleteViewModel(_ =>
+ var childWindowViewModel = new OKCancelInfoMessageViewModel(_ =>
{
- _dialogCoordinator.HideMetroDialogAsync(this, customDialog);
+ childWindow.IsOpen = false;
+ ConfigurationManager.Current.IsChildWindowOpen = false;
SettingsManager.Current.SNTPLookup_SNTPServers.Remove(SelectedSNTPServer);
- }, _ => { _dialogCoordinator.HideMetroDialogAsync(this, customDialog); },
+ }, _ =>
+ {
+ childWindow.IsOpen = false;
+ ConfigurationManager.Current.IsChildWindowOpen = false;
+ },
Strings.DeleteSNTPServerMessage);
- customDialog.Content = new ConfirmDeleteDialog
- {
- DataContext = viewModel
- };
+ childWindow.Title = Strings.DeleteSNTPServer;
- await _dialogCoordinator.ShowMetroDialogAsync(this, customDialog);
+ childWindow.DataContext = childWindowViewModel;
+
+ ConfigurationManager.Current.IsChildWindowOpen = true;
+
+ return (Application.Current.MainWindow as MainWindow).ShowChildWindowAsync(childWindow);
}
#endregion
diff --git a/Source/NETworkManager/ViewModels/SettingsProfilesViewModel.cs b/Source/NETworkManager/ViewModels/SettingsProfilesViewModel.cs
index 6cb82e7a57..08314bc757 100644
--- a/Source/NETworkManager/ViewModels/SettingsProfilesViewModel.cs
+++ b/Source/NETworkManager/ViewModels/SettingsProfilesViewModel.cs
@@ -3,9 +3,12 @@
using System.Diagnostics;
using System.Linq;
using System.Security.Cryptography;
+using System.Threading.Tasks;
+using System.Windows;
using System.Windows.Data;
using System.Windows.Input;
using MahApps.Metro.Controls.Dialogs;
+using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Localization.Resources;
using NETworkManager.Profiles;
using NETworkManager.Settings;
@@ -147,34 +150,37 @@ private async void EditProfileFileAction()
}
public ICommand DeleteProfileFileCommand =>
- new RelayCommand(_ => DeleteProfileFileAction(), DeleteProfileFile_CanExecute);
+ new RelayCommand(_ => DeleteProfileFileAction().ConfigureAwait(false), DeleteProfileFile_CanExecute);
private bool DeleteProfileFile_CanExecute(object obj)
{
return ProfileFiles.Cast().Count() > 1;
}
- private async void DeleteProfileFileAction()
+ private Task DeleteProfileFileAction()
{
- var customDialog = new CustomDialog
- {
- Title = Strings.DeleteProfileFile
- };
-
- var confirmDeleteViewModel = new ConfirmDeleteViewModel(async _ =>
+ var childWindow = new OKCancelInfoMessageChildWindow();
+
+ var childWindowViewModel = new OKCancelInfoMessageViewModel(async _ =>
{
- await _dialogCoordinator.HideMetroDialogAsync(this, customDialog);
+ childWindow.IsOpen = false;
+ ConfigurationManager.Current.IsChildWindowOpen = false;
ProfileManager.DeleteProfileFile(SelectedProfileFile);
- }, async _ => { await _dialogCoordinator.HideMetroDialogAsync(this, customDialog); },
+ }, async _ =>
+ {
+ childWindow.IsOpen = false;
+ ConfigurationManager.Current.IsChildWindowOpen = false;
+ },
Strings.DeleteProfileFileMessage);
- customDialog.Content = new ConfirmDeleteDialog
- {
- DataContext = confirmDeleteViewModel
- };
-
- await _dialogCoordinator.ShowMetroDialogAsync(this, customDialog);
+ childWindow.Title = Strings.DeleteProfileFile;
+
+ childWindow.DataContext = childWindowViewModel;
+
+ ConfigurationManager.Current.IsChildWindowOpen = true;
+
+ return (Application.Current.MainWindow as MainWindow).ShowChildWindowAsync(childWindow);
}
public ICommand EnableEncryptionCommand => new RelayCommand(_ => EnableEncryptionAction());
diff --git a/Source/NETworkManager/Views/AWSSessionManagerSettingsView.xaml b/Source/NETworkManager/Views/AWSSessionManagerSettingsView.xaml
index 82b2fd682d..10f3043c2d 100644
--- a/Source/NETworkManager/Views/AWSSessionManagerSettingsView.xaml
+++ b/Source/NETworkManager/Views/AWSSessionManagerSettingsView.xaml
@@ -85,94 +85,26 @@
-
-
-
-
-
+
diff --git a/Source/NETworkManager/Views/ConfirmDeleteChildWindow.xaml.cs b/Source/NETworkManager/Views/ConfirmDeleteChildWindow.xaml.cs
deleted file mode 100644
index 69d2796792..0000000000
--- a/Source/NETworkManager/Views/ConfirmDeleteChildWindow.xaml.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-namespace NETworkManager.Views;
-
-public partial class ConfirmDeleteChildWindow
-{
- public ConfirmDeleteChildWindow()
- {
- InitializeComponent();
- }
-}
diff --git a/Source/NETworkManager/Views/ConfirmDeleteDialog.xaml b/Source/NETworkManager/Views/ConfirmDeleteDialog.xaml
deleted file mode 100644
index 170aa8c094..0000000000
--- a/Source/NETworkManager/Views/ConfirmDeleteDialog.xaml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Source/NETworkManager/Views/ConfirmDeleteDialog.xaml.cs b/Source/NETworkManager/Views/ConfirmDeleteDialog.xaml.cs
deleted file mode 100644
index e0fb8ce456..0000000000
--- a/Source/NETworkManager/Views/ConfirmDeleteDialog.xaml.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-namespace NETworkManager.Views;
-
-public partial class ConfirmDeleteDialog
-{
- public ConfirmDeleteDialog()
- {
- InitializeComponent();
- }
-}
\ No newline at end of file
diff --git a/Source/NETworkManager/Views/DNSLookupSettingsView.xaml b/Source/NETworkManager/Views/DNSLookupSettingsView.xaml
index 88b908a06f..3f69e7581f 100644
--- a/Source/NETworkManager/Views/DNSLookupSettingsView.xaml
+++ b/Source/NETworkManager/Views/DNSLookupSettingsView.xaml
@@ -73,94 +73,26 @@
-
-
-
-
-
+
-
-
-
-
-
+
diff --git a/Source/NETworkManager/Views/ConfirmDeleteChildWindow.xaml b/Source/NETworkManager/Views/OKCancelInfoMessageChildWindow.xaml
similarity index 97%
rename from Source/NETworkManager/Views/ConfirmDeleteChildWindow.xaml
rename to Source/NETworkManager/Views/OKCancelInfoMessageChildWindow.xaml
index ade7d6bdf3..1fd3d8456a 100644
--- a/Source/NETworkManager/Views/ConfirmDeleteChildWindow.xaml
+++ b/Source/NETworkManager/Views/OKCancelInfoMessageChildWindow.xaml
@@ -1,4 +1,4 @@
-
+ mc:Ignorable="d" d:DataContext="{d:DesignInstance viewModels:OKCancelInfoMessageViewModel}">
diff --git a/Source/NETworkManager/Views/OKCancelInfoMessageChildWindow.xaml.cs b/Source/NETworkManager/Views/OKCancelInfoMessageChildWindow.xaml.cs
new file mode 100644
index 0000000000..aa4845464b
--- /dev/null
+++ b/Source/NETworkManager/Views/OKCancelInfoMessageChildWindow.xaml.cs
@@ -0,0 +1,9 @@
+namespace NETworkManager.Views;
+
+public partial class OKCancelInfoMessageChildWindow
+{
+ public OKCancelInfoMessageChildWindow()
+ {
+ InitializeComponent();
+ }
+}
diff --git a/Source/NETworkManager/Views/PortScannerSettingsView.xaml b/Source/NETworkManager/Views/PortScannerSettingsView.xaml
index db3eb952f6..1efe63feb7 100644
--- a/Source/NETworkManager/Views/PortScannerSettingsView.xaml
+++ b/Source/NETworkManager/Views/PortScannerSettingsView.xaml
@@ -70,94 +70,26 @@
-
-
-
-
-
+
-
-
-
-
-
+
-
-
-
-
-
+
diff --git a/Source/NETworkManager/Views/SettingsProfilesView.xaml b/Source/NETworkManager/Views/SettingsProfilesView.xaml
index 11799a4b0f..5112afb2c9 100644
--- a/Source/NETworkManager/Views/SettingsProfilesView.xaml
+++ b/Source/NETworkManager/Views/SettingsProfilesView.xaml
@@ -144,95 +144,25 @@
-
-
-
-
-
+
\ No newline at end of file
From 285b3d324c7c5922c784e48e8f53a1e6e53a9113 Mon Sep 17 00:00:00 2001
From: BornToBeRoot <16019165+BornToBeRoot@users.noreply.github.com>
Date: Tue, 24 Jun 2025 00:59:04 +0200
Subject: [PATCH 7/9] Docs: #3087
---
Website/docs/changelog/next-release.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Website/docs/changelog/next-release.md b/Website/docs/changelog/next-release.md
index ac3b8ecf77..695bc5779b 100644
--- a/Website/docs/changelog/next-release.md
+++ b/Website/docs/changelog/next-release.md
@@ -40,6 +40,8 @@ Release date: **xx.xx.2025**
## Improvements
- Redesign welcome dialog. [#3077](https://github.com/BornToBeRoot/NETworkManager/pull/3077)
+- Redesign profile dialog. [#3087](https://github.com/BornToBeRoot/NETworkManager/pull/3087)
+- Redesign confirm delete dialog. [#3087](https://github.com/BornToBeRoot/NETworkManager/pull/3087)
- Add upgrade dialog when updating from a previous version. [#3077](https://github.com/BornToBeRoot/NETworkManager/pull/3077)
**WiFi**
From 8df1bcfa1c87278cdc033928d6061e676c596f62 Mon Sep 17 00:00:00 2001
From: BornToBeRoot <16019165+BornToBeRoot@users.noreply.github.com>
Date: Tue, 24 Jun 2025 01:12:39 +0200
Subject: [PATCH 8/9] Fix: Profile file name case insensitive
---
.../NETworkManager.Validators/ProfileFileUniqueValidator.cs | 6 ++++--
Website/docs/changelog/next-release.md | 3 +++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/Source/NETworkManager.Validators/ProfileFileUniqueValidator.cs b/Source/NETworkManager.Validators/ProfileFileUniqueValidator.cs
index 0f4b524fba..4d7fdc15fa 100644
--- a/Source/NETworkManager.Validators/ProfileFileUniqueValidator.cs
+++ b/Source/NETworkManager.Validators/ProfileFileUniqueValidator.cs
@@ -1,4 +1,5 @@
-using System.Globalization;
+using System;
+using System.Globalization;
using System.Linq;
using System.Windows.Controls;
using NETworkManager.Localization.Resources;
@@ -10,7 +11,8 @@ public class ProfileFileUniqueValidator : ValidationRule
{
public override ValidationResult Validate(object value, CultureInfo cultureInfo)
{
- return ProfileManager.ProfileFiles.Any(x => x.Name == value as string)
+ return ProfileManager.ProfileFiles.Any(x =>
+ string.Equals(x.Name, value as string, StringComparison.OrdinalIgnoreCase))
? new ValidationResult(false, Strings.ProfileNameAlreadyExists)
: ValidationResult.ValidResult;
}
diff --git a/Website/docs/changelog/next-release.md b/Website/docs/changelog/next-release.md
index 695bc5779b..0c4f69757f 100644
--- a/Website/docs/changelog/next-release.md
+++ b/Website/docs/changelog/next-release.md
@@ -82,6 +82,9 @@ Release date: **xx.xx.2025**
## Bugfixes
+- Fixed an issue where the profile file could be overwritten when creating a new profile file with the same name, but with another case (`Profile` exists, but `profile` is created). [#3087](https://github.com/BornToBeRoot/NETworkManager/pull/3087)
+- Fixed an application crash when a profile file is renamed to another case (e.g. `Profile` to `profile`) [#3087](https://github.com/BornToBeRoot/NETworkManager/pull/3087).
+
**Network Interface**
- Re-select the network interface after a network change or configuration update. Thanks to [@Ghislain1](https://github.com/Ghislain1) [#3004](https://github.com/BornToBeRoot/NETworkManager/pull/3004) [#2962](https://github.com/BornToBeRoot/NETworkManager/pull/2962)
From d2d6df4a61fb1ea8c022db496155ee08fb13b160 Mon Sep 17 00:00:00 2001
From: BornToBeRoot <16019165+BornToBeRoot@users.noreply.github.com>
Date: Tue, 24 Jun 2025 01:15:59 +0200
Subject: [PATCH 9/9] Update DNSLookup.cs
---
Source/NETworkManager.Models/Network/DNSLookup.cs | 2 --
1 file changed, 2 deletions(-)
diff --git a/Source/NETworkManager.Models/Network/DNSLookup.cs b/Source/NETworkManager.Models/Network/DNSLookup.cs
index 6afe12d0b9..556a91763b 100644
--- a/Source/NETworkManager.Models/Network/DNSLookup.cs
+++ b/Source/NETworkManager.Models/Network/DNSLookup.cs
@@ -232,8 +232,6 @@ private void ProcessDnsAnswers(IEnumerable answers, NameServe
if (answers is not DnsResourceRecord[] dnsResourceRecords)
return;
- Debug.WriteLine(dnsResourceRecords);
-
// A
foreach (var record in dnsResourceRecords.OfType())
OnRecordReceived(new DNSLookupRecordReceivedArgs(