Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Source/GlobalAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

[assembly: AssemblyVersion("2025.8.11.0")]
[assembly: AssemblyFileVersion("2025.8.11.0")]
[assembly: AssemblyVersion("2025.10.18.0")]
[assembly: AssemblyFileVersion("2025.10.18.0")]
10 changes: 10 additions & 0 deletions Source/NETworkManager.Localization/Resources/Strings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Source/NETworkManager.Localization/Resources/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -3996,4 +3996,7 @@ Right-click for more options.</value>
<data name="HelpMessage_UseCustomThemes" xml:space="preserve">
<value>Use custom themes to personalize the appearance of the application. You can edit or add theme in the "Program Folder &gt; Themes" directory. For more details, refer to the documentation.</value>
</data>
<data name="AdminConsoleSession" xml:space="preserve">
<value>Admin (console) session</value>
</data>
</root>
16 changes: 8 additions & 8 deletions Source/NETworkManager.Models/RemoteDesktop/RemoteDesktop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ namespace NETworkManager.Models.RemoteDesktop;

public static class RemoteDesktop
{
public static List<string> ScreenResolutions => new()
{
public static List<string> ScreenResolutions =>
[
"640x480",
"800x600",
"1024x768",
Expand All @@ -18,15 +18,15 @@ public static class RemoteDesktop
"1400x1050",
"1680x1050",
"1920x1080"
};
];

public static List<int> ColorDepths => new()
{
public static List<int> ColorDepths =>
[
15,
16,
24,
32
};
];

public static RemoteDesktopKeystrokeInfo GetKeystroke(Keystroke keystroke)
{
Expand All @@ -35,8 +35,8 @@ public static RemoteDesktopKeystrokeInfo GetKeystroke(Keystroke keystroke)
switch (keystroke)
{
case Keystroke.CtrlAltDel:
info.ArrayKeyUp = new[] { false, false, false, true, true, true };
info.KeyData = new[] { 0x1d, 0x38, 0x53, 0x53, 0x38, 0x1d };
info.ArrayKeyUp = [false, false, false, true, true, true];
info.KeyData = [0x1d, 0x38, 0x53, 0x53, 0x38, 0x1d];
break;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public class RemoteDesktopSessionInfo
public string Username { get; set; }
public string Domain { get; set; }
public SecureString Password { get; set; }
public bool AdminSession { get; set; }
public int Port { get; set; }
public bool AdjustScreenAutomatically { get; set; }
public bool UseCurrentViewSize { get; set; }
Expand Down
15 changes: 9 additions & 6 deletions Source/NETworkManager.Profiles/GroupInfo.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using System.Collections.Generic;
using System.Security;
using System.Xml.Serialization;
using NETworkManager.Models.Network;
using NETworkManager.Models.Network;
using NETworkManager.Models.PowerShell;
using NETworkManager.Models.PuTTY;
using NETworkManager.Models.RemoteDesktop;
using NETworkManager.Settings;
using System.Collections.Generic;
using System.Security;
using System.Xml.Serialization;

namespace NETworkManager.Profiles;

Expand Down Expand Up @@ -37,7 +37,7 @@ public GroupInfo(GroupInfo group) : this(group.Name)
{
// General
Description = group.Description;

// Profiles
Profiles = group.Profiles;

Expand All @@ -46,6 +46,7 @@ public GroupInfo(GroupInfo group) : this(group.Name)
RemoteDesktop_Username = group.RemoteDesktop_Username;
RemoteDesktop_Domain = group.RemoteDesktop_Domain;
RemoteDesktop_Password = group.RemoteDesktop_Password;
RemoteDesktop_AdminSession = group.RemoteDesktop_AdminSession;
RemoteDesktop_OverrideDisplay = group.RemoteDesktop_OverrideDisplay;
RemoteDesktop_AdjustScreenAutomatically = group.RemoteDesktop_AdjustScreenAutomatically;
RemoteDesktop_UseCurrentViewSize = group.RemoteDesktop_UseCurrentViewSize;
Expand Down Expand Up @@ -168,7 +169,7 @@ public GroupInfo(GroupInfo group) : this(group.Name)
/// Name of the group.
/// </summary>
public string Name { get; set; }

/// <summary>
/// Description of the group.
/// </summary>
Expand All @@ -183,6 +184,8 @@ public GroupInfo(GroupInfo group) : this(group.Name)
public string RemoteDesktop_Domain { get; set; }

[XmlIgnore] public SecureString RemoteDesktop_Password { get; set; }

public bool RemoteDesktop_AdminSession { get; set; }
public bool RemoteDesktop_OverrideDisplay { get; set; }
public bool RemoteDesktop_AdjustScreenAutomatically { get; set; }

Expand Down
3 changes: 3 additions & 0 deletions Source/NETworkManager.Profiles/ProfileInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public ProfileInfo(ProfileInfo profile)
RemoteDesktop_Username = profile.RemoteDesktop_Username;
RemoteDesktop_Domain = profile.RemoteDesktop_Domain;
RemoteDesktop_Password = profile.RemoteDesktop_Password;
RemoteDesktop_AdminSession = profile.RemoteDesktop_AdminSession;
RemoteDesktop_OverrideDisplay = profile.RemoteDesktop_OverrideDisplay;
RemoteDesktop_AdjustScreenAutomatically = profile.RemoteDesktop_AdjustScreenAutomatically;
RemoteDesktop_UseCurrentViewSize = profile.RemoteDesktop_UseCurrentViewSize;
Expand Down Expand Up @@ -314,6 +315,8 @@ public ProfileInfo(ProfileInfo profile)
public string RemoteDesktop_Domain { get; set; }

[XmlIgnore] public SecureString RemoteDesktop_Password { get; set; }

public bool RemoteDesktop_AdminSession { get; set; }
public bool RemoteDesktop_OverrideDisplay { get; set; }
public bool RemoteDesktop_AdjustScreenAutomatically { get; set; }

Expand Down
1 change: 1 addition & 0 deletions Source/NETworkManager/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<!-- Styles -->
<ResourceDictionary Source="/Resources/Styles/ButtonStyles.xaml" />
<ResourceDictionary Source="/Resources/Styles/CheckBoxStyles.xaml" />
<ResourceDictionary Source="/Resources/Styles/ChildWindowStyles.xaml" />
<ResourceDictionary Source="/Resources/Styles/ContextMenuStyles.xaml" />
<ResourceDictionary Source="/Resources/Styles/DataGridStyles.xaml" />
<ResourceDictionary Source="/Resources/Styles/DropDownButtonStyles.xaml" />
Expand Down
7 changes: 3 additions & 4 deletions Source/NETworkManager/Controls/RemoteDesktopControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ private void Connect()
RdpClient.AdvancedSettings9.ClearTextPassword = SecureStringHelper.ConvertToString(_sessionInfo.Password);
}

// Admin (console) session
RdpClient.AdvancedSettings9.ConnectToAdministerServer = _sessionInfo.AdminSession;

// Network
RdpClient.AdvancedSettings9.RDPPort = _sessionInfo.Port;

Expand Down Expand Up @@ -716,8 +719,4 @@ private void WindowsFormsHost_DpiChanged(object sender, DpiChangedEventArgs e)
AdjustScreen(force: true);
}
#endregion




}
12 changes: 4 additions & 8 deletions Source/NETworkManager/ProfileDialogManager.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Controls;
using NETworkManager.Localization.Resources;
using NETworkManager.Models;
using NETworkManager.Models.Network;
Expand All @@ -9,11 +10,9 @@
using NETworkManager.Views;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Security;
using System.Threading.Tasks;
using System.Windows;
using NETworkManager.Controls;

namespace NETworkManager;

Expand All @@ -23,18 +22,13 @@ public static class ProfileDialogManager

private static ProfileInfo ParseProfileInfo(ProfileViewModel instance)
{
foreach (var tag in instance.TagsCollection)
{
Debug.WriteLine(tag);
}

return new ProfileInfo
{
Name = instance.Name.Trim(),
Host = instance.Host.Trim(),
Description = instance.Description?.Trim(),
Group = instance.Group.Trim(),
TagsCollection = new ObservableSetCollection<string> (instance.TagsCollection),
TagsCollection = new ObservableSetCollection<string>(instance.TagsCollection),

// Network Interface
NetworkInterface_Enabled = instance.NetworkInterface_Enabled,
Expand Down Expand Up @@ -97,6 +91,7 @@ private static ProfileInfo ParseProfileInfo(ProfileViewModel instance)
RemoteDesktop_Password = instance.RemoteDesktop_UseCredentials
? instance.RemoteDesktop_Password
: new SecureString(), // Remove sensitive info on disable
RemoteDesktop_AdminSession = instance.RemoteDesktop_AdminSession,
RemoteDesktop_OverrideDisplay = instance.RemoteDesktop_OverrideDisplay,
RemoteDesktop_AdjustScreenAutomatically = instance.RemoteDesktop_AdjustScreenAutomatically,
RemoteDesktop_UseCurrentViewSize = instance.RemoteDesktop_UseCurrentViewSize,
Expand Down Expand Up @@ -323,6 +318,7 @@ private static GroupInfo ParseGroupInfo(GroupViewModel instance)
RemoteDesktop_Password = instance.RemoteDesktop_UseCredentials
? instance.RemoteDesktop_Password
: new SecureString(), // Remove sensitive info on disable
RemoteDesktop_AdminSession = instance.RemoteDesktop_AdminSession,
RemoteDesktop_OverrideDisplay = instance.RemoteDesktop_OverrideDisplay,
RemoteDesktop_AdjustScreenAutomatically = instance.RemoteDesktop_AdjustScreenAutomatically,
RemoteDesktop_UseCurrentViewSize = instance.RemoteDesktop_UseCurrentViewSize,
Expand Down
16 changes: 16 additions & 0 deletions Source/NETworkManager/Resources/Styles/ChildWindowStyles.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:simpleChildWindow="clr-namespace:MahApps.Metro.SimpleChildWindow;assembly=MahApps.Metro.SimpleChildWindow">
<Style x:Key="DefaultChildWindow" TargetType="{x:Type simpleChildWindow:ChildWindow}">
<Setter Property="ShowTitleBar" Value="True" />
<Setter Property="ShowCloseButton" Value="True" />
<Setter Property="CloseByEscape" Value="False" />
<Setter Property="AllowMove" Value="True" />
<Setter Property="TitleBarBackground" Value="Transparent" />
<Setter Property="TitleBarNonActiveBackground" Value="Transparent" />
<Setter Property="OverlayBrush" Value="{DynamicResource ResourceKey=MahApps.Brushes.Gray.SemiTransparent}" />
<Setter Property="TitleForeground" Value="{DynamicResource ResourceKey=MahApps.Brushes.Gray3}" />
<Setter Property="ChildWindowWidth" Value="450" />
<Setter Property="ChildWindowMaxHeight" Value="500" />
</Style>
</ResourceDictionary>
2 changes: 1 addition & 1 deletion Source/NETworkManager/Resources/Styles/ToolTipStyles.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<Setter Property="Background" Value="{DynamicResource ResourceKey=MahApps.Brushes.Window.Background}" />
</Style>

<Style TargetType="{x:Type TypeName=ToolTip}" BasedOn="{StaticResource ResourceKey=DefaultToolTip}" />
<Style TargetType="{x:Type TypeName=ToolTip}" BasedOn="{StaticResource ResourceKey=DefaultToolTip}" />

<Style x:Key="HelpToolTip" TargetType="{x:Type TypeName=ToolTip}" BasedOn="{StaticResource ResourceKey=DefaultToolTip}">
<Setter Property="Template">
Expand Down
38 changes: 26 additions & 12 deletions Source/NETworkManager/ViewModels/GroupViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
using System;
using NETworkManager.Models.Network;
using NETworkManager.Models.PowerShell;
using NETworkManager.Models.PuTTY;
using NETworkManager.Models.RemoteDesktop;
using NETworkManager.Profiles;
using NETworkManager.Utilities;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Security;
using System.Windows.Data;
using System.Windows.Input;
using NETworkManager.Models.Network;
using NETworkManager.Models.PowerShell;
using NETworkManager.Models.PuTTY;
using NETworkManager.Models.RemoteDesktop;
using NETworkManager.Profiles;
using NETworkManager.Utilities;

// ReSharper disable InconsistentNaming

Expand Down Expand Up @@ -166,6 +166,21 @@ public SecureString RemoteDesktop_Password
}
}

private bool _remoteDesktop_AdminSession;

public bool RemoteDesktop_AdminSession
{
get => _remoteDesktop_AdminSession;
set
{
if (value == _remoteDesktop_AdminSession)
return;

_remoteDesktop_AdminSession = value;
OnPropertyChanged();
}
}

private bool _remoteDesktop_OverrideDisplay;

public bool RemoteDesktop_OverrideDisplay
Expand Down Expand Up @@ -1793,6 +1808,7 @@ public GroupViewModel(Action<GroupViewModel> saveCommand, Action<GroupViewModel>
RemoteDesktop_Username = groupInfo.RemoteDesktop_Username;
RemoteDesktop_Domain = groupInfo.RemoteDesktop_Domain;
RemoteDesktop_Password = groupInfo.RemoteDesktop_Password;
RemoteDesktop_AdminSession = groupInfo.RemoteDesktop_AdminSession;
RemoteDesktop_OverrideDisplay = groupInfo.RemoteDesktop_OverrideDisplay;
RemoteDesktop_AdjustScreenAutomatically = groupInfo.RemoteDesktop_AdjustScreenAutomatically;
RemoteDesktop_UseCurrentViewSize = groupInfo.RemoteDesktop_UseCurrentViewSize;
Expand Down Expand Up @@ -1900,18 +1916,16 @@ public GroupViewModel(Action<GroupViewModel> saveCommand, Action<GroupViewModel>
// SNMP
SNMP_OverrideOIDAndMode = groupInfo.SNMP_OverrideOIDAndMode;
SNMP_OID = groupInfo.SNMP_OID;
SNMP_Modes = new List<SNMPMode> { SNMPMode.Get, SNMPMode.Walk, SNMPMode.Set };
SNMP_Modes = [SNMPMode.Get, SNMPMode.Walk, SNMPMode.Set];
SNMP_Mode = SNMP_Modes.FirstOrDefault(x => x == groupInfo.SNMP_Mode);
SNMP_OverrideVersionAndAuth = groupInfo.SNMP_OverrideVersionAndAuth;
SNMP_Versions = Enum.GetValues(typeof(SNMPVersion)).Cast<SNMPVersion>().ToList();
SNMP_Version = SNMP_Versions.FirstOrDefault(x => x == groupInfo.SNMP_Version);
SNMP_Community = groupInfo.SNMP_Community;
SNMP_Securities = new List<SNMPV3Security>
{ SNMPV3Security.NoAuthNoPriv, SNMPV3Security.AuthNoPriv, SNMPV3Security.AuthPriv };
SNMP_Securities = [SNMPV3Security.NoAuthNoPriv, SNMPV3Security.AuthNoPriv, SNMPV3Security.AuthPriv];
SNMP_Security = SNMP_Securities.FirstOrDefault(x => x == groupInfo.SNMP_Security);
SNMP_Username = groupInfo.SNMP_Username;
SNMP_AuthenticationProviders = Enum.GetValues(typeof(SNMPV3AuthenticationProvider))
.Cast<SNMPV3AuthenticationProvider>().ToList();
SNMP_AuthenticationProviders = [.. Enum.GetValues(typeof(SNMPV3AuthenticationProvider)).Cast<SNMPV3AuthenticationProvider>()];
SNMP_AuthenticationProvider =
SNMP_AuthenticationProviders.FirstOrDefault(x => x == groupInfo.SNMP_AuthenticationProvider);
SNMP_Auth = groupInfo.SNMP_Auth;
Expand Down
18 changes: 17 additions & 1 deletion Source/NETworkManager/ViewModels/ProfileViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public ProfileViewModel(Action<ProfileViewModel> saveCommand, Action<ProfileView
Groups.SortDescriptions.Add(new SortDescription());

TagsCollection = new ObservableSetCollection<string>(profileInfo.TagsCollection);

Tags = CollectionViewSource.GetDefaultView(TagsCollection);
Tags.SortDescriptions.Add(new SortDescription("", ListSortDirection.Ascending));

Expand Down Expand Up @@ -121,6 +121,7 @@ public ProfileViewModel(Action<ProfileViewModel> saveCommand, Action<ProfileView
RemoteDesktop_Username = profileInfo.RemoteDesktop_Username;
RemoteDesktop_Domain = profileInfo.RemoteDesktop_Domain;
RemoteDesktop_Password = profileInfo.RemoteDesktop_Password;
RemoteDesktop_AdminSession = profileInfo.RemoteDesktop_AdminSession;
RemoteDesktop_OverrideDisplay = profileInfo.RemoteDesktop_OverrideDisplay;
RemoteDesktop_AdjustScreenAutomatically = profileInfo.RemoteDesktop_AdjustScreenAutomatically;
RemoteDesktop_UseCurrentViewSize = profileInfo.RemoteDesktop_UseCurrentViewSize;
Expand Down Expand Up @@ -1076,6 +1077,21 @@ public SecureString RemoteDesktop_Password
}
}

private bool _remoteDesktop_AdminSession;

public bool RemoteDesktop_AdminSession
{
get => _remoteDesktop_AdminSession;
set
{
if (value == _remoteDesktop_AdminSession)
return;

_remoteDesktop_AdminSession = value;
OnPropertyChanged();
}
}

private bool _remoteDesktop_OverrideDisplay;

public bool RemoteDesktop_OverrideDisplay
Expand Down
Loading