|
13 | 13 | using System.Security; |
14 | 14 | using NETworkManager.Models; |
15 | 15 | using NETworkManager.Models.Network; |
16 | | -using Microsoft.PowerShell.Commands; |
17 | 16 |
|
18 | 17 | namespace NETworkManager.ViewModels; |
19 | 18 |
|
@@ -2574,34 +2573,6 @@ public string WakeOnLAN_Broadcast |
2574 | 2573 | OnPropertyChanged(); |
2575 | 2574 | } |
2576 | 2575 | } |
2577 | | - |
2578 | | - private bool _wakeOnLAN_OverridePort; |
2579 | | - public bool WakeOnLAN_OverridePort |
2580 | | - { |
2581 | | - get => _wakeOnLAN_OverridePort; |
2582 | | - set |
2583 | | - { |
2584 | | - if (value == _wakeOnLAN_OverridePort) |
2585 | | - return; |
2586 | | - |
2587 | | - _wakeOnLAN_OverridePort = value; |
2588 | | - OnPropertyChanged(); |
2589 | | - } |
2590 | | - } |
2591 | | - |
2592 | | - private int _wakeOnLAN_Port; |
2593 | | - public int WakeOnLAN_Port |
2594 | | - { |
2595 | | - get => _wakeOnLAN_Port; |
2596 | | - set |
2597 | | - { |
2598 | | - if (value == _wakeOnLAN_Port) |
2599 | | - return; |
2600 | | - |
2601 | | - _wakeOnLAN_Port = value; |
2602 | | - OnPropertyChanged(); |
2603 | | - } |
2604 | | - } |
2605 | 2576 | #endregion |
2606 | 2577 |
|
2607 | 2578 | #region Whois |
@@ -2789,7 +2760,7 @@ public ProfileViewModel(Action<ProfileViewModel> saveCommand, Action<ProfileView |
2789 | 2760 | PowerShell_AdditionalCommandLine = profileInfo.PowerShell_AdditionalCommandLine; |
2790 | 2761 | PowerShell_ExecutionPolicies = Enum.GetValues(typeof(PowerShell.ExecutionPolicy)).Cast<PowerShell.ExecutionPolicy>().ToList(); |
2791 | 2762 | PowerShell_OverrideExecutionPolicy = profileInfo.PowerShell_OverrideExecutionPolicy; |
2792 | | - PowerShell_ExecutionPolicy = editMode != ProfileEditMode.Add ? profileInfo.PowerShell_ExecutionPolicy : PowerShell_ExecutionPolicies.FirstOrDefault(x => x == SettingsManager.Current.PowerShell_ExecutionPolicy); ; |
| 2763 | + PowerShell_ExecutionPolicy = profileInfo.PowerShell_ExecutionPolicy; |
2793 | 2764 |
|
2794 | 2765 | // PuTTY |
2795 | 2766 | PuTTY_Enabled = editMode == ProfileEditMode.Add ? applicationName == ApplicationName.PuTTY : profileInfo.PuTTY_Enabled; |
@@ -2850,7 +2821,7 @@ public ProfileViewModel(Action<ProfileViewModel> saveCommand, Action<ProfileView |
2850 | 2821 | TigerVNC_InheritHost = profileInfo.TigerVNC_InheritHost; |
2851 | 2822 | TigerVNC_Host = profileInfo.TigerVNC_Host; |
2852 | 2823 | TigerVNC_OverridePort = profileInfo.TigerVNC_OverridePort; |
2853 | | - TigerVNC_Port = profileInfo.TigerVNC_OverridePort ? profileInfo.TigerVNC_Port : SettingsManager.Current.TigerVNC_Port; |
| 2824 | + TigerVNC_Port = profileInfo.TigerVNC_Port; |
2854 | 2825 |
|
2855 | 2826 | // Web Console |
2856 | 2827 | WebConsole_Enabled = editMode == ProfileEditMode.Add ? applicationName == ApplicationName.WebConsole : profileInfo.WebConsole_Enabled; |
@@ -2881,9 +2852,7 @@ public ProfileViewModel(Action<ProfileViewModel> saveCommand, Action<ProfileView |
2881 | 2852 | // Wake on LAN |
2882 | 2853 | WakeOnLAN_Enabled = editMode == ProfileEditMode.Add ? applicationName == ApplicationName.WakeOnLAN : profileInfo.WakeOnLAN_Enabled; |
2883 | 2854 | WakeOnLAN_MACAddress = profileInfo.WakeOnLAN_MACAddress; |
2884 | | - WakeOnLAN_Broadcast = profileInfo.WakeOnLAN_Broadcast; |
2885 | | - WakeOnLAN_OverridePort = profileInfo.WakeOnLAN_OverridePort; |
2886 | | - WakeOnLAN_Port = profileInfo.WakeOnLAN_OverridePort ? profileInfo.WakeOnLAN_Port : SettingsManager.Current.WakeOnLAN_Port; |
| 2855 | + WakeOnLAN_Broadcast = profileInfo.WakeOnLAN_Broadcast; |
2887 | 2856 |
|
2888 | 2857 | // Whois |
2889 | 2858 | Whois_Enabled = editMode == ProfileEditMode.Add ? applicationName == ApplicationName.Whois : profileInfo.Whois_Enabled; |
|
0 commit comments