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("2024.8.1.0")]
[assembly: AssemblyFileVersion("2024.8.1.0")]
[assembly: AssemblyVersion("2024.11.18.0")]
[assembly: AssemblyFileVersion("2024.11.18.0")]
3 changes: 1 addition & 2 deletions Source/NETworkManager/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
</MenuItem>
</ContextMenu>
</mah:MetroWindow.Resources>

<mah:MetroWindow.InputBindings>
<KeyBinding Command="{Binding OpenRunCommand}" Modifiers="Control+Shift" Key="P" />
</mah:MetroWindow.InputBindings>
Expand All @@ -89,7 +88,7 @@
</mah:WindowCommands>
</mah:MetroWindow.LeftWindowCommands>
<mah:MetroWindow.RightWindowCommands>
<mah:WindowCommands ShowSeparators="False">
<mah:WindowCommands ShowSeparators="False" Visibility="{Binding IsWelcomeWindowOpen, Converter={StaticResource BooleanReverseToVisibilityCollapsedConverter}}">
<Button Command="{Binding OpenRunCommand}"
Visibility="{Binding Path=FlyoutRunCommandIsOpen, Converter={StaticResource ResourceKey=BooleanReverseToVisibilityCollapsedConverter}}"
ToolTip="{x:Static localization:Strings.ToolTip_RunCommandWithHotKey}"
Expand Down
43 changes: 29 additions & 14 deletions Source/NETworkManager/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using log4net;
using MahApps.Metro.Controls.Dialogs;
using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Controls;
using NETworkManager.Documentation;
using NETworkManager.Localization;
Expand Down Expand Up @@ -127,6 +128,21 @@ private void OnPropertyChanged([CallerMemberName] string propertyName = null)
private bool _isInTray;
private bool _isClosing;

private bool _isWelcomeWindowOpen;

public bool IsWelcomeWindowOpen
{
get => _isWelcomeWindowOpen;
set
{
if (value == _isWelcomeWindowOpen)
return;

_isWelcomeWindowOpen = value;
OnPropertyChanged();
}
}

private bool _applicationViewIsExpanded;

public bool ApplicationViewIsExpanded
Expand Down Expand Up @@ -487,14 +503,14 @@ await this.ShowMessageAsync(Strings.SettingsHaveBeenReset,
// Show welcome dialog
if (SettingsManager.Current.WelcomeDialog_Show)
{
var customDialog = new CustomDialog
{
Title = Strings.Welcome
};

var x = new WelcomeChildWindow();

var welcomeViewModel = new WelcomeViewModel(async instance =>
{
await this.HideMetroDialogAsync(customDialog);
IsWelcomeWindowOpen = false;

x.IsOpen = false;

// Set settings based on user choice
SettingsManager.Current.Update_CheckForUpdatesAtStartup = instance.CheckForUpdatesAtStartup;
Expand Down Expand Up @@ -546,12 +562,11 @@ await this.ShowMessageAsync(Strings.SettingsHaveBeenReset,
Load();
});

customDialog.Content = new WelcomeDialog
{
DataContext = welcomeViewModel
};
x.DataContext = welcomeViewModel;

await this.ShowMetroDialogAsync(customDialog).ConfigureAwait(true);
IsWelcomeWindowOpen = true;

await this.ShowChildWindowAsync(x);
}
else
{
Expand Down Expand Up @@ -1315,7 +1330,7 @@ private void RunCommandFlyoutClose(bool clearSearch = false)
{
if (!FlyoutRunCommandIsOpen)
return;

FlyoutRunCommandIsOpen = false;

ConfigurationManager.OnDialogClose();
Expand Down Expand Up @@ -1522,9 +1537,9 @@ private void ProfileManager_OnLoadedProfileFileChangedEvent(object sender, Profi
private void CheckForUpdates()
{
var updater = new Updater();

updater.UpdateAvailable += Updater_UpdateAvailable;

updater.CheckOnGitHub(Properties.Resources.NETworkManager_GitHub_User,
Properties.Resources.NETworkManager_GitHub_Repo, AssemblyManager.Current.Version,
SettingsManager.Current.Update_CheckForPreReleases);
Expand Down Expand Up @@ -1945,7 +1960,7 @@ private async void OnNetworkHasChanged()
OpenStatusWindow(true);
}));
}

_isNetworkChanging = false;
}

Expand Down
83 changes: 42 additions & 41 deletions Source/NETworkManager/NETworkManager.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
<BeautyLogLevel>Info</BeautyLogLevel>
</PropertyGroup>
<ItemGroup>
<None Remove="log4net.config"/>
<None Remove="NETworkManager.ico"/>
<None Remove="SplashScreen.png"/>
<None Include="..\.editorconfig" Link=".editorconfig"/>
<None Remove="log4net.config" />
<None Remove="NETworkManager.ico" />
<None Remove="SplashScreen.png" />
<None Include="..\.editorconfig" Link=".editorconfig" />
<None Include="NETworkManager.ico">
<Pack>True</Pack>
</None>
Expand All @@ -57,53 +57,54 @@
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="AirspaceFixer" Version="1.0.6"/>
<PackageReference Include="AWSSDK.EC2" Version="3.7.414.4"/>
<PackageReference Include="DnsClient" Version="1.8.0"/>
<PackageReference Include="gong-wpf-dragdrop" Version="3.2.1"/>
<PackageReference Include="IPNetwork2" Version="3.0.667"/>
<PackageReference Include="Lextm.SharpSnmpLib" Version="12.5.5"/>
<PackageReference Include="LiveCharts.Wpf" Version="0.9.7"/>
<PackageReference Include="LoadingIndicators.WPF" Version="0.0.1"/>
<PackageReference Include="log4net" Version="3.0.3"/>
<PackageReference Include="MahApps.Metro" Version="2.4.10"/>
<PackageReference Include="MahApps.Metro.IconPacks.FontAwesome" Version="5.1.0"/>
<PackageReference Include="MahApps.Metro.IconPacks.Material" Version="5.1.0"/>
<PackageReference Include="MahApps.Metro.IconPacks.MaterialLight" Version="5.1.0"/>
<PackageReference Include="MahApps.Metro.IconPacks.Modern" Version="5.1.0"/>
<PackageReference Include="MahApps.Metro.IconPacks.Octicons" Version="5.1.0"/>
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2849.39"/>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.1.6"/>
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.135"/>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3"/>
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.4.6"/>
<PackageReference Include="nulastudio.NetBeauty" Version="2.1.4.3"/>
<PackageReference Include="AirspaceFixer" Version="1.0.6" />
<PackageReference Include="AWSSDK.EC2" Version="3.7.414.4" />
<PackageReference Include="DnsClient" Version="1.8.0" />
<PackageReference Include="gong-wpf-dragdrop" Version="3.2.1" />
<PackageReference Include="IPNetwork2" Version="3.0.667" />
<PackageReference Include="Lextm.SharpSnmpLib" Version="12.5.5" />
<PackageReference Include="LiveCharts.Wpf" Version="0.9.7" />
<PackageReference Include="LoadingIndicators.WPF" Version="0.0.1" />
<PackageReference Include="log4net" Version="3.0.3" />
<PackageReference Include="MahApps.Metro" Version="2.4.10" />
<PackageReference Include="MahApps.Metro.IconPacks.FontAwesome" Version="5.1.0" />
<PackageReference Include="MahApps.Metro.IconPacks.Material" Version="5.1.0" />
<PackageReference Include="MahApps.Metro.IconPacks.MaterialLight" Version="5.1.0" />
<PackageReference Include="MahApps.Metro.IconPacks.Modern" Version="5.1.0" />
<PackageReference Include="MahApps.Metro.IconPacks.Octicons" Version="5.1.0" />
<PackageReference Include="MahApps.Metro.SimpleChildWindow" Version="2.2.1" />
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2849.39" />
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.1.6" />
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.135" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.4.6" />
<PackageReference Include="nulastudio.NetBeauty" Version="2.1.4.3" />
<Reference Include="AxMSTSCLib">
<HintPath>$(TargetDir)\lib\AxMSTSCLib.dll</HintPath>
</Reference>
<Reference Include="MSTSCLib">
<HintPath>$(TargetDir)\lib\MSTSCLib.dll</HintPath>
</Reference>
<Compile Include="..\GlobalAssemblyInfo.cs" Link="Properties\GlobalAssemblyInfo.cs"/>
<Compile Include="..\GlobalAssemblyInfo.cs" Link="Properties\GlobalAssemblyInfo.cs" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\3rdparty\Dragablz\Dragablz\Dragablz.csproj"/>
<ProjectReference Include="..\NETworkManager.Controls\NETworkManager.Controls.csproj"/>
<ProjectReference Include="..\NETworkManager.Converters\NETworkManager.Converters.csproj"/>
<ProjectReference Include="..\NETworkManager.Documentation\NETworkManager.Documentation.csproj"/>
<ProjectReference Include="..\NETworkManager.Localization\NETworkManager.Localization.csproj"/>
<ProjectReference Include="..\NETworkManager.Models\NETworkManager.Models.csproj"/>
<ProjectReference Include="..\NETworkManager.Profiles\NETworkManager.Profiles.csproj"/>
<ProjectReference Include="..\NETworkManager.Settings\NETworkManager.Settings.csproj"/>
<ProjectReference Include="..\NETworkManager.Update\NETworkManager.Update.csproj"/>
<ProjectReference Include="..\NETworkManager.Utilities.WPF\NETworkManager.Utilities.WPF.csproj"/>
<ProjectReference Include="..\NETworkManager.Utilities\NETworkManager.Utilities.csproj"/>
<ProjectReference Include="..\NETworkManager.Validators\NETworkManager.Validators.csproj"/>
<ProjectReference Include="..\3rdparty\Dragablz\Dragablz\Dragablz.csproj" />
<ProjectReference Include="..\NETworkManager.Controls\NETworkManager.Controls.csproj" />
<ProjectReference Include="..\NETworkManager.Converters\NETworkManager.Converters.csproj" />
<ProjectReference Include="..\NETworkManager.Documentation\NETworkManager.Documentation.csproj" />
<ProjectReference Include="..\NETworkManager.Localization\NETworkManager.Localization.csproj" />
<ProjectReference Include="..\NETworkManager.Models\NETworkManager.Models.csproj" />
<ProjectReference Include="..\NETworkManager.Profiles\NETworkManager.Profiles.csproj" />
<ProjectReference Include="..\NETworkManager.Settings\NETworkManager.Settings.csproj" />
<ProjectReference Include="..\NETworkManager.Update\NETworkManager.Update.csproj" />
<ProjectReference Include="..\NETworkManager.Utilities.WPF\NETworkManager.Utilities.WPF.csproj" />
<ProjectReference Include="..\NETworkManager.Utilities\NETworkManager.Utilities.csproj" />
<ProjectReference Include="..\NETworkManager.Validators\NETworkManager.Validators.csproj" />
</ItemGroup>
<ItemGroup>
<Resource Include="NETworkManager.ico"/>
<Resource Include="SplashScreen.png"/>
<Resource Include="NETworkManager.ico" />
<Resource Include="SplashScreen.png" />
</ItemGroup>
<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
Expand Down Expand Up @@ -136,6 +137,6 @@
</Page>
</ItemGroup>
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Exec Command="PowerShell.exe -ExecutionPolicy Bypass -NoProfile -File &quot;$(ProjectDir)..\..\Scripts\PreBuildEventCommandLine.ps1&quot; &quot;$(TargetDir)&quot;"/>
<Exec Command="PowerShell.exe -ExecutionPolicy Bypass -NoProfile -File &quot;$(ProjectDir)..\..\Scripts\PreBuildEventCommandLine.ps1&quot; &quot;$(TargetDir)&quot;" />
</Target>
</Project>
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
<UserControl x:Class="NETworkManager.Views.WelcomeDialog"
<simpleChildWindow:ChildWindow x:Class="NETworkManager.Views.WelcomeChildWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
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"
ShowTitleBar="False"
ChildWindowMaxWidth="650"
ChildWindowMaxHeight="800"
CloseByEscape="False"
Padding="20"
OverlayBrush="{DynamicResource MahApps.Brushes.Gray8}"
mc:Ignorable="d" d:DataContext="{d:DesignInstance viewModels:WelcomeViewModel}">
<Grid Margin="0,20">
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="10" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<ScrollViewer Grid.Row="0" HorizontalScrollBarVisibility="Disabled">
<StackPanel>
<TextBlock Text="{x:Static Member=localization:Strings.Welcome}" Style="{StaticResource HeaderTextBlock}" />
<TextBlock Text="{x:Static Member=localization:Strings.WelcomeMessage}"
Style="{StaticResource ResourceKey=DefaultTextBlock}" Margin="0,0,0,20" TextWrapping="Wrap" />
<TextBlock Text="{x:Static Member=localization:Strings.Privacy}"
Expand Down Expand Up @@ -96,4 +104,4 @@
Command="{Binding ContinueCommand}" IsDefault="True"
Style="{StaticResource ResourceKey=HighlightedButton}" />
</Grid>
</UserControl>
</simpleChildWindow:ChildWindow>
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
namespace NETworkManager.Views;

public partial class WelcomeDialog
public partial class WelcomeChildWindow
{
public WelcomeDialog()
public WelcomeChildWindow()
{
InitializeComponent();
}
Expand Down
2 changes: 2 additions & 0 deletions Website/docs/changelog/next-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Release date: **xx.xx.2024**

## Bugfixes

- Changed the Welcome dialog from `MahApps.Metro.Controls.Dialogs` to `MahApps.Metro.SimpleChildWindow`, so the main window can be dragged and resized on the first start. [#2914](https://github.com/BornToBeRoot/NETworkManager/pull/2914)

## Dependencies, Refactoring & Documentation

- Code cleanup & refactoring
Expand Down