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
7 changes: 4 additions & 3 deletions Source/NETworkManager.Controls/NETworkManager.Controls.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{95EA884C-E498-4A47-A316-DC890BF7F0D2}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>NETworkManager.Controls</RootNamespace>
<AssemblyName>NETworkManager.Controls</AssemblyName>
<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>
<TargetFramework>net10.0-windows10.0.22621.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PlatformTarget>x64</PlatformTarget>
<SelfContained>false</SelfContained>
Expand All @@ -15,4 +15,5 @@
<ItemGroup>
<Compile Include="..\GlobalAssemblyInfo.cs" Link="Properties\GlobalAssemblyInfo.cs"/>
</ItemGroup>
</Project>
</Project>

Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{BD4DDC21-7B64-41B2-BAC7-8173E0FE84BE}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>NETworkManager.Converters</RootNamespace>
<AssemblyName>NETworkManager.Converters</AssemblyName>
<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>
<TargetFramework>net10.0-windows10.0.22621.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PlatformTarget>x64</PlatformTarget>
<SelfContained>false</SelfContained>
Expand All @@ -30,4 +30,5 @@
<PackageReference Include="LiveCharts.Wpf" Version="0.9.7" />
<PackageReference Include="MahApps.Metro" Version="2.4.11" />
</ItemGroup>
</Project>
</Project>

Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{95CE4AD5-14C0-4486-9C11-5D6A5EC48176}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>NETworkManager.Documentation</RootNamespace>
<AssemblyName>NETworkManager.Documentation</AssemblyName>
<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>
<TargetFramework>net10.0-windows10.0.22621.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PlatformTarget>x64</PlatformTarget>
<SelfContained>false</SelfContained>
Expand Down Expand Up @@ -113,4 +113,5 @@
<ProjectReference Include="..\NETworkManager.Models\NETworkManager.Models.csproj"/>
<ProjectReference Include="..\NETworkManager.Utilities\NETworkManager.Utilities.csproj"/>
</ItemGroup>
</Project>
</Project>

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{FF225C2E-AA67-4B10-939A-6C046CEF8697}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>NETworkManager.Localization</RootNamespace>
<AssemblyName>NETworkManager.Localization</AssemblyName>
<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>
<TargetFramework>net10.0-windows10.0.22621.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PlatformTarget>x64</PlatformTarget>
<SelfContained>false</SelfContained>
Expand Down Expand Up @@ -86,4 +86,5 @@
<LastGenOutput>Strings.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
</Project>
</Project>

7 changes: 4 additions & 3 deletions Source/NETworkManager.Models/NETworkManager.Models.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{8A2859DC-38B6-4E9D-A6B2-1828DC6641B3}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>NETworkManager.Models</RootNamespace>
<AssemblyName>NETworkManager.Models</AssemblyName>
<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>
<TargetFramework>net10.0-windows10.0.22621.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PlatformTarget>x64</PlatformTarget>
<SelfContained>false</SelfContained>
Expand Down Expand Up @@ -61,4 +61,5 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>
</Project>

7 changes: 4 additions & 3 deletions Source/NETworkManager.Profiles/NETworkManager.Profiles.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{D3B37F13-E8E6-4218-9E8E-96D52432A9CF}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>NETworkManager.Profiles</RootNamespace>
<AssemblyName>NETworkManager.Profiles</AssemblyName>
<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>
<TargetFramework>net10.0-windows10.0.22621.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PlatformTarget>x64</PlatformTarget>
<SelfContained>false</SelfContained>
Expand All @@ -27,4 +27,5 @@
<ProjectReference Include="..\NETworkManager.Models\NETworkManager.Models.csproj" />
<ProjectReference Include="..\NETworkManager.Settings\NETworkManager.Settings.csproj" />
</ItemGroup>
</Project>
</Project>

7 changes: 4 additions & 3 deletions Source/NETworkManager.Settings/NETworkManager.Settings.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{954E8703-3E6E-42BF-BD28-F0B19BE10E0C}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>NETworkManager.Settings</RootNamespace>
<AssemblyName>NETworkManager.Settings</AssemblyName>
<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>
<TargetFramework>net10.0-windows10.0.22621.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PlatformTarget>x64</PlatformTarget>
<SelfContained>false</SelfContained>
Expand Down Expand Up @@ -59,4 +59,5 @@
<ProjectReference Include="..\NETworkManager.Models\NETworkManager.Models.csproj" />
<ProjectReference Include="..\NETworkManager.Utilities\NETworkManager.Utilities.csproj" />
</ItemGroup>
</Project>
</Project>

7 changes: 4 additions & 3 deletions Source/NETworkManager.Update/NETworkManager.Update.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{008467AF-D83F-4B1E-8733-B65136F595F2}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>NETworkManager.Update</RootNamespace>
<AssemblyName>NETworkManager.Update</AssemblyName>
<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>
<TargetFramework>net10.0-windows10.0.22621.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PlatformTarget>x64</PlatformTarget>
<SelfContained>false</SelfContained>
Expand All @@ -20,4 +20,5 @@
<PackageReference Include="log4net" Version="3.2.0" />
<PackageReference Include="Octokit" Version="14.0.0" />
</ItemGroup>
</Project>
</Project>

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{93733008-7269-460D-8390-AB281C75DB91}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>NETworkManager.Utilities.WPF</RootNamespace>
<AssemblyName>NETworkManager.Utilities.WPF</AssemblyName>
<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>
<TargetFramework>net10.0-windows10.0.22621.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PlatformTarget>x64</PlatformTarget>
<SelfContained>false</SelfContained>
Expand All @@ -18,4 +18,5 @@
<ItemGroup>
<PackageReference Include="MahApps.Metro" Version="2.4.11" />
</ItemGroup>
</Project>
</Project>

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{5C3D1749-D260-4566-B448-B94B3AD9EEFF}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>NETworkManager.Utilities</RootNamespace>
<AssemblyName>NETworkManager.Utilities</AssemblyName>
<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>
<TargetFramework>net10.0-windows10.0.22621.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PlatformTarget>x64</PlatformTarget>
<SelfContained>false</SelfContained>
Expand All @@ -20,4 +20,5 @@
<PackageReference Include="DnsClient" Version="1.8.0" />
<PackageReference Include="log4net" Version="3.2.0" />
</ItemGroup>
</Project>
</Project>

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{29172E71-52AF-4E64-9683-30C5F4D0C746}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>NETworkManager.Validators</RootNamespace>
<AssemblyName>NETworkManager.Validators</AssemblyName>
<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>
<TargetFramework>net10.0-windows10.0.22621.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PlatformTarget>x64</PlatformTarget>
<SelfContained>false</SelfContained>
Expand All @@ -22,4 +22,5 @@
<ProjectReference Include="..\NETworkManager.Localization\NETworkManager.Localization.csproj" />
<ProjectReference Include="..\NETworkManager.Utilities\NETworkManager.Utilities.csproj" />
</ItemGroup>
</Project>
</Project>

7 changes: 4 additions & 3 deletions Source/NETworkManager/NETworkManager.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>
<TargetFramework>net10.0-windows10.0.22621.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PlatformTarget>x64</PlatformTarget>
<SelfContained>false</SelfContained>
Expand Down Expand Up @@ -150,4 +150,5 @@
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Exec Command="PowerShell.exe -ExecutionPolicy Bypass -NoProfile -File &quot;$(ProjectDir)..\..\Scripts\PreBuildEventCommandLine.ps1&quot; &quot;$(TargetDir)&quot;" />
</Target>
</Project>
</Project>

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<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="ChildWindowWidth" Value="500" />
<Setter Property="ChildWindowMaxHeight" Value="500" />
</Style>
</ResourceDictionary>
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class PowerShellConnectViewModel : ViewModelBase

private bool _enableRemoteConsole;

private List<ExecutionPolicy> _executionPolicies = new();
private List<ExecutionPolicy> _executionPolicies = [];

private ExecutionPolicy _executionPolicy;

Expand Down
33 changes: 18 additions & 15 deletions Source/NETworkManager/ViewModels/PowerShellHostViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Dragablz;
using log4net;
using MahApps.Metro.Controls.Dialogs;
using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Controls;
using NETworkManager.Localization.Resources;
using NETworkManager.Models;
Expand Down Expand Up @@ -579,16 +580,15 @@ private void TryFindExecutable()
Log.Warn("Install PowerShell or configure the path in the settings.");
}

private async Task Connect(string host = null)
private Task Connect(string host = null)
{
var customDialog = new CustomDialog
{
Title = Strings.Connect
};
var childWindow = new PowerShellConnectChildWindow();

var connectViewModel = new PowerShellConnectViewModel(async instance =>
var childWindowViewModel = new PowerShellConnectViewModel(instance =>
{
await _dialogCoordinator.HideMetroDialogAsync(this, customDialog);
childWindow.IsOpen = false;
ConfigurationManager.Current.IsChildWindowOpen = false;

ConfigurationManager.OnDialogClose();

// Create profile info
Expand All @@ -606,21 +606,24 @@ private async Task Connect(string host = null)
// Otherwise, in some cases, incorrect values are taken over.
AddHostToHistory(instance.Host);

// Connect
Connect(sessionInfo);
}, async _ =>
}, _ =>
{
await _dialogCoordinator.HideMetroDialogAsync(this, customDialog);
childWindow.IsOpen = false;
ConfigurationManager.Current.IsChildWindowOpen = false;

ConfigurationManager.OnDialogClose();
}, host);

customDialog.Content = new PowerShellConnectDialog
{
DataContext = connectViewModel
};
childWindow.Title = Strings.Connect;

childWindow.DataContext = childWindowViewModel;

ConfigurationManager.Current.IsChildWindowOpen = true;

ConfigurationManager.OnDialogOpen();
await _dialogCoordinator.ShowMetroDialogAsync(this, customDialog);

return (Application.Current.MainWindow as MainWindow).ShowChildWindowAsync(childWindow);
}

private void ConnectProfile()
Expand Down
Loading