Projects STRLCPY NETworkManager Commits 8476652e
🤬
  • Docs: Settings & Fix: Close status window (#2105)

    * Docs: Settings added
    
    * Feature: Auto close status window & fix some strings / improve messages
    
    * Docs: Add #2105
  • Loading...
  • BornToBeRoot committed with GitHub 1 year ago
    8476652e
    1 parent 3b4a1791
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/MainWindow.xaml.cs
    skipped 1591 lines
    1592 1592   #endregion
    1593 1593   
    1594 1594   #region Status window
    1595  - private void OpenStatusWindow(bool activate)
     1595 + private void OpenStatusWindow(bool fromNetworkChangeEvent)
    1596 1596   {
    1597  - _statusWindow.ShowWindow(activate);
     1597 + _statusWindow.ShowWindow(fromNetworkChangeEvent);
    1598 1598   }
    1599 1599   
    1600 1600   private async void OnNetworkHasChanged()
    skipped 3 lines
    1604 1604   
    1605 1605   _isNetworkChanging = true;
    1606 1606   
    1607  - // Wait 5 seconds, because the event may be triggered several times.
    1608  - await Task.Delay(5000);
     1607 + // Wait, because the event may be triggered several times.
     1608 + await Task.Delay(GlobalStaticConfiguration.StatusWindowDelayBeforeOpen);
    1609 1609   
    1610 1610   _log.Info("Network availability or address has changed!");
    1611 1611   
    skipped 109 lines
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/StatusWindow.xaml
    1  -<mahAppsControls:MetroWindow x:Class="NETworkManager.StatusWindow"
     1 +<mah:MetroWindow x:Class="NETworkManager.StatusWindow"
    2 2   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    3 3   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    4 4   xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    5 5   xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    6  - xmlns:mahAppsControls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
    7  - xmlns:loadingIndicators="clr-namespace:LoadingIndicators.WPF;assembly=LoadingIndicators.WPF"
     6 + xmlns:mah="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
    8 7   xmlns:localization="clr-namespace:NETworkManager.Localization.Resources;assembly=NETworkManager.Localization"
    9 8   xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
    10 9   xmlns:resources="clr-namespace:NETworkManager.Properties"
    skipped 1 lines
    12 11   xmlns:converters="clr-namespace:NETworkManager.Converters;assembly=NETworkManager.Converters"
    13 12   mc:Ignorable="d" d:DataContext="{d:DesignInstance networkManager:StatusWindow}"
    14 13   Title="{x:Static resources:Resources.NETworkManager_ProjectName}" Style="{DynamicResource DefaultWindow}" Deactivated="MetroWindow_Deactivated" Height="280" Width="950" ShowInTaskbar="False" ResizeMode="NoResize" IsWindowDraggable="False" ShowMinButton="False" ShowMaxRestoreButton="False" ShowCloseButton="False" ShowTitleBar="False" Closing="MetroWindow_Closing" >
    15  - <mahAppsControls:MetroWindow.Resources>
     14 + <mah:MetroWindow.Resources>
    16 15   <converters:Bytes1000ToSpeedConverter x:Key="Bytes1000ToSpeedConverter" />
    17 16   <converters:IPAddressArrayToStringConverter x:Key="IPAddressArrayToStringConverter" />
    18 17   <converters:BooleanToVisibilityCollapsedConverter x:Key="BooleanToVisibilityCollapsedConverter" />
    19 18   <converters:BooleanReverseToVisibilityCollapsedConverter x:Key="BooleanReverseToVisibilityCollapsedConverter" />
    20  - </mahAppsControls:MetroWindow.Resources>
     19 + </mah:MetroWindow.Resources>
    21 20   <Grid Margin="10">
    22 21   <Grid>
    23 22   <Grid.RowDefinitions>
    skipped 2 lines
    26 25   <RowDefinition Height="Auto" />
    27 26   </Grid.RowDefinitions>
    28 27   <ContentControl x:Name="ContentControlNetworkConnection" Grid.Row="0" />
    29  - <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right">
    30  - <Button Content="{x:Static localization:Strings.Reload}" Command="{Binding ReloadCommand}" Style="{StaticResource DefaultButton}" Margin="0,0,10,0" />
    31  - <Button Content="{x:Static localization:Strings.Show}" Command="{Binding ShowMainWindowCommand}" Style="{StaticResource DefaultButton}" Margin="0,0,10,0" />
    32  - <Button Content="{x:Static localization:Strings.Close}" Command="{Binding CloseCommand}" Style="{StaticResource DefaultButton}" />
    33  - </StackPanel>
     28 + <Grid Grid.Row="2">
     29 + <Grid.ColumnDefinitions>
     30 + <ColumnDefinition Width="*" />
     31 + <ColumnDefinition Width="10" />
     32 + <ColumnDefinition Width="Auto" />
     33 + </Grid.ColumnDefinitions>
     34 + <mah:MetroProgressBar Grid.Column="0" Minimum="0" Maximum="{Binding TimeMax}" Value="{Binding Time}" Visibility="{Binding ShowTime, Converter={StaticResource BooleanToVisibilityCollapsedConverter}}" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="150" />
     35 + <StackPanel Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Right">
     36 + <Button Content="{x:Static localization:Strings.Reload}" Command="{Binding ReloadCommand}" Style="{StaticResource DefaultButton}" Margin="0,0,10,0" />
     37 + <Button Content="{x:Static localization:Strings.Show}" Command="{Binding ShowMainWindowCommand}" Style="{StaticResource DefaultButton}" Margin="0,0,10,0" />
     38 + <Button Content="{x:Static localization:Strings.Close}" Command="{Binding CloseCommand}" Style="{StaticResource DefaultButton}" />
     39 + </StackPanel>
     40 + </Grid>
    34 41   </Grid>
    35 42   </Grid>
    36  -</mahAppsControls:MetroWindow>
     43 +</mah:MetroWindow>
    37 44   
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/StatusWindow.xaml.cs
    1 1  using MahApps.Metro.Controls;
     2 +using NETworkManager.Settings;
    2 3  using NETworkManager.Utilities;
    3 4  using NETworkManager.Views;
    4 5  using System.ComponentModel;
    5 6  using System.Runtime.CompilerServices;
    6 7  using System.Windows.Forms;
    7 8  using System.Windows.Input;
     9 +using System.Windows.Threading;
    8 10   
    9 11  namespace NETworkManager;
    10 12   
    skipped 9 lines
    20 22   #endregion
    21 23   
    22 24   #region Variables
    23  - private MainWindow _mainWindow;
    24  - private NetworkConnectionView _networkConnectionView;
     25 + // Set prio to make the ui smoother
     26 + private readonly DispatcherTimer _dispatcherTimerClose = new(DispatcherPriority.Normal);
     27 + 
     28 + private readonly MainWindow _mainWindow;
     29 + private readonly NetworkConnectionView _networkConnectionView;
     30 + 
     31 + private bool _showTime;
     32 + public bool ShowTime
     33 + {
     34 + get => _showTime;
     35 + set
     36 + {
     37 + if (value == _showTime)
     38 + return;
     39 + 
     40 + _showTime = value;
     41 + OnPropertyChanged();
     42 + }
     43 + }
     44 + 
     45 + private int _timeMax;
     46 + public int TimeMax
     47 + {
     48 + get => _timeMax;
     49 + set
     50 + {
     51 + if (value == _timeMax)
     52 + return;
     53 + 
     54 + _timeMax = value;
     55 + OnPropertyChanged();
     56 + }
     57 + }
     58 + 
     59 + private int _time;
     60 + public int Time
     61 + {
     62 + get => _time;
     63 + set
     64 + {
     65 + if (value == _time)
     66 + return;
     67 + 
     68 + _time = value;
     69 + OnPropertyChanged();
     70 + }
     71 + }
    25 72   #endregion
    26 73   
    27 74   #region Constructor
    skipped 3 lines
    31 78   DataContext = this;
    32 79   
    33 80   _mainWindow = mainWindow;
     81 + 
     82 + _dispatcherTimerClose.Interval = new System.TimeSpan(0, 0, 0, 0, 250);
     83 + _dispatcherTimerClose.Tick += DispatcherTimerTime_Tick;
    34 84   
    35 85   _networkConnectionView = new NetworkConnectionView();
    36 86   ContentControlNetworkConnection.Content = _networkConnectionView;
    skipped 36 lines
    73 123   /// <summary>
    74 124   /// Show the window on the screen.
    75 125   /// </summary>
    76  - /// <param name="activate">Focus the window (will automatically hide if the focus is lost).</param>
    77  - public void ShowWindow(bool activate)
     126 + /// <param name="fromNetworkChangeEvent">Focus the window (will automatically hide if the focus is lost).</param>
     127 + public void ShowWindow(bool fromNetworkChangeEvent)
    78 128   {
    79 129   // Show on primary screen in left/bottom corner
    80 130   // ToDo: User setting...
    skipped 2 lines
    83 133   
    84 134   Show();
    85 135   
    86  - if (activate)
     136 + if (fromNetworkChangeEvent)
    87 137   Activate();
     138 + else
     139 + SetupCloseTimer();
    88 140   
    89 141   Topmost = true;
    90 142   }
     143 + 
     144 + private void SetupCloseTimer()
     145 + {
     146 + Time = SettingsManager.Current.Status_WindowCloseTime * 4;
     147 + TimeMax = Time;
     148 + 
     149 + ShowTime = true;
     150 + _dispatcherTimerClose.Start();
     151 + }
    91 152   #endregion
    92 153   
    93 154   #region Events
    skipped 9 lines
    103 164   Hide();
    104 165   }
    105 166   
    106  - #endregion
     167 + private void DispatcherTimerTime_Tick(object sender, System.EventArgs e)
     168 + {
     169 + Time--;
    107 170   
     171 + if (Time > 0)
     172 + return;
    108 173   
     174 + _dispatcherTimerClose.Stop();
     175 + ShowTime = false;
     176 + 
     177 + Hide();
     178 + }
     179 + #endregion
    109 180  }
    110 181   
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/SettingsStatusViewModel.cs
    skipped 23 lines
    24 24   }
    25 25   }
    26 26   
    27  - private string _ipAddressToDetectLocalIPAddressBasedOnRouting;
    28  - public string IPAddressToDetectLocalIPAddressBasedOnRouting
    29  - {
    30  - get => _ipAddressToDetectLocalIPAddressBasedOnRouting;
    31  - set
    32  - {
    33  - if (value == _ipAddressToDetectLocalIPAddressBasedOnRouting)
    34  - return;
    35  - 
    36  - if (!_isLoading)
    37  - SettingsManager.Current.Status_IPAddressToDetectLocalIPAddressBasedOnRouting = value;
    38  - 
    39  - _ipAddressToDetectLocalIPAddressBasedOnRouting = value;
    40  - OnPropertyChanged();
    41  - }
    42  - }
    43  - 
    44 27   private int _windowCloseTime;
    45 28   public int WindowCloseTime
    46 29   {
    skipped 26 lines
    73 56   private void LoadSettings()
    74 57   {
    75 58   ShowWindowOnNetworkChange = SettingsManager.Current.Status_ShowWindowOnNetworkChange;
    76  - IPAddressToDetectLocalIPAddressBasedOnRouting = SettingsManager.Current.Status_IPAddressToDetectLocalIPAddressBasedOnRouting;
    77 59   WindowCloseTime = SettingsManager.Current.Status_WindowCloseTime;
    78 60   }
    79 61   #endregion
    skipped 2 lines
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/SettingsViewModel.cs
    skipped 104 lines
    105 105   private SettingsLanguageView _settingsLanguageView;
    106 106   private SettingsNetworkView _settingsNetworkView;
    107 107   private SettingsStatusView _settingsStatusView;
    108  - private SettingsHotKeysView _settingsHotKeysView;
     108 + private SettingsHotkeysView _settingsHotKeysView;
    109 109   private SettingsAutostartView _settingsAutostartView;
    110 110   private SettingsUpdateView _settingsUpdateView;
    111 111   private SettingsSettingsView _settingsSettingsView;
    skipped 102 lines
    214 214   SettingsContent = _settingsStatusView;
    215 215   break;
    216 216   case SettingsViewName.HotKeys:
    217  - _settingsHotKeysView ??= new SettingsHotKeysView();
     217 + _settingsHotKeysView ??= new SettingsHotkeysView();
    218 218   
    219 219   SettingsContent = _settingsHotKeysView;
    220 220   break;
    skipped 114 lines
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/Views/SettingsHotKeysView.xaml
    1  -<UserControl x:Class="NETworkManager.Views.SettingsHotKeysView"
     1 +<UserControl x:Class="NETworkManager.Views.SettingsHotkeysView"
    2 2   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    3 3   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    4 4   xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    skipped 4 lines
    9 9   mc:Ignorable="d" d:DataContext="{d:DesignInstance viewModels:SettingsHotKeysViewModel}">
    10 10   <StackPanel>
    11 11   <TextBlock Style="{StaticResource HeaderTextBlock}" Text="{x:Static localization:Strings.HotKeys}" />
    12  - <mahAppsControls:ToggleSwitch Header="{x:Static localization:Strings.UntrayBringWindowToFront}" IsOn="{Binding HotKeyShowWindowEnabled}" Margin="0,0,0,10"/>
     12 + <mahAppsControls:ToggleSwitch Header="{x:Static localization:Strings.UntrayBringWindowToForeground}" IsOn="{Binding HotKeyShowWindowEnabled}" Margin="0,0,0,10"/>
    13 13   <mahAppsControls:HotKeyBox AreModifierKeysRequired="True" HotKey="{Binding HotKeyShowWindow}" Width="250" HorizontalAlignment="Left" />
    14 14   </StackPanel>
    15 15  </UserControl>
    skipped 1 lines
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/Views/SettingsHotKeysView.xaml.cs
    skipped 1 lines
    2 2   
    3 3  namespace NETworkManager.Views;
    4 4   
    5  -public partial class SettingsHotKeysView
     5 +public partial class SettingsHotkeysView
    6 6  {
    7  - private readonly SettingsHotKeysViewModel _viewModel = new SettingsHotKeysViewModel();
     7 + private readonly SettingsHotKeysViewModel _viewModel = new();
    8 8   
    9  - public SettingsHotKeysView()
     9 + public SettingsHotkeysView()
    10 10   {
    11 11   InitializeComponent();
    12 12   DataContext = _viewModel;
    skipped 3 lines
  • ■ ■ ■ ■ ■
    Source/NETworkManager/Views/SettingsSettingsView.xaml
    skipped 34 lines
    35 35   </Button.Content>
    36 36   </Button>
    37 37   <TextBlock Style="{StaticResource HeaderTextBlock}" Text="{x:Static localization:Strings.Reset}" />
    38  - <TextBlock Style="{StaticResource DefaultTextBlock}" Text="{x:Static localization:Strings.ThisWillResetAllSettings}" Margin="0,0,0,10" />
    39 38   <Button Content="{x:Static localization:Strings.Reset}" Command="{Binding ResetSettingsCommand}" IsEnabled="{Binding SettingsExists}" Style="{StaticResource DefaultButton}" HorizontalAlignment="Left" />
    40 39   </StackPanel>
    41 40  </UserControl>
    skipped 2 lines
  • ■ ■ ■ ■ ■
    Source/NETworkManager/Views/SettingsStatusView.xaml
    skipped 6 lines
    7 7   xmlns:viewModels="clr-namespace:NETworkManager.ViewModels"
    8 8   xmlns:mahAppsControls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
    9 9   xmlns:localization="clr-namespace:NETworkManager.Localization.Resources;assembly=NETworkManager.Localization"
    10  - xmlns:validators="clr-namespace:NETworkManager.Validators;assembly=NETworkManager.Validators"
    11 10   mc:Ignorable="d" d:DataContext="{d:DesignInstance viewModels:SettingsStatusViewModel}">
    12 11   <StackPanel>
    13 12   <TextBlock Style="{StaticResource HeaderTextBlock}" Text="{x:Static localization:Strings.StatusWindow}" />
    14 13   <mahAppsControls:ToggleSwitch Header="{x:Static localization:Strings.ShowStatusWindowOnNetworkChange}" IsOn="{Binding ShowWindowOnNetworkChange}" Margin="0,0,0,10"/>
    15  - <TextBlock Text="{x:Static localization:Strings.IPAddressToDetectLocalIPAddressBasedOnRouting}" Style="{DynamicResource DefaultTextBlock}" Margin="0,0,0,10" />
    16  - <TextBox Width="250" HorizontalAlignment="Left" Margin="0,0,0,10" mahAppsControls:TextBoxHelper.Watermark="{x:Static localization:StaticStrings.ExampleIPv4DNSServer}" Style="{StaticResource DefaultTextBox}">
    17  - <TextBox.Text>
    18  - <Binding Path="IPAddressToDetectLocalIPAddressBasedOnRouting" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged">
    19  - <Binding.ValidationRules>
    20  - <validators:EmptyValidator ValidatesOnTargetUpdated="True" />
    21  - <validators:IPv4AddressValidator ValidatesOnTargetUpdated="True" />
    22  - </Binding.ValidationRules>
    23  - </Binding>
    24  - </TextBox.Text>
    25  - </TextBox>
    26  - <TextBlock Text="{x:Static localization:Strings.TimeInSecondsHowLongTheWindowShouldBeDisplayed}" Style="{DynamicResource DefaultTextBlock}" Margin="0,0,0,10" />
     14 + <TextBlock Text="{x:Static localization:Strings.TimeInSecondsHowLongTheStatusWindowIsShown}" Style="{DynamicResource DefaultTextBlock}" Margin="0,0,0,10" />
    27 15   <mah:NumericUpDown Value="{Binding WindowCloseTime}" Maximum="120" Minimum="3" Interval="1" />
    28 16   </StackPanel>
    29 17  </UserControl>
  • ■ ■ ■ ■ ■
    Source/NETworkManager/Views/SettingsWindowView.xaml
    skipped 11 lines
    12 12   <controls:ToggleSwitch Header="{x:Static localization:Strings.MinimizeInsteadOfTerminating}" IsOn="{Binding MinimizeInsteadOfTerminating}" Margin="0,0,0,10" />
    13 13   <controls:ToggleSwitch Header="{x:Static localization:Strings.MinimizeToTrayInsteadOfTaskbar}" IsOn="{Binding MinimizeToTrayInsteadOfTaskbar}" Margin="0,0,0,10" />
    14 14   <controls:ToggleSwitch Header="{x:Static localization:Strings.ConfirmClose}" IsOn="{Binding ConfirmClose}" Margin="0,0,0,10"/>
    15  - <controls:ToggleSwitch Header="{x:Static localization:Strings.MultipleInstances}" IsOn="{Binding MultipleInstances}" Margin="0,0,0,20"/>
     15 + <StackPanel Orientation="Horizontal" Margin="0,0,0,20">
     16 + <controls:ToggleSwitch Header="{x:Static localization:Strings.MultipleInstances}" IsOn="{Binding MultipleInstances}"/>
     17 + <Rectangle Width="24" Height="24" ToolTip="{x:Static localization:Strings.WarnMessage_MultipleInstances}" Style="{StaticResource WarnImageRectangle}" VerticalAlignment="Top" Margin="10,0,0,0">
     18 + <Rectangle.Resources>
     19 + <Style TargetType="{x:Type ToolTip}" BasedOn="{StaticResource WarnToolTip}" />
     20 + </Rectangle.Resources>
     21 + </Rectangle>
     22 + </StackPanel>
    16 23   <TextBlock Style="{StaticResource HeaderTextBlock}" Text="{x:Static localization:Strings.Tray}" />
    17 24   <controls:ToggleSwitch Header="{x:Static localization:Strings.AlwaysShowIconInTray}" IsOn="{Binding AlwaysShowIconInTray}" Margin="0,0,0,20" />
    18 25   <TextBlock Style="{StaticResource HeaderTextBlock}" Text="{x:Static localization:Strings.SplashScreen}" />
    skipped 4 lines
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager.Localization/Resources/Strings.Designer.cs
    skipped 8733 lines
    8734 8734   }
    8735 8735  
    8736 8736   /// <summary>
    8737  - /// Sucht eine lokalisierte Zeichenfolge, die Time in seconds how long the window should be displayed ähnelt.
     8737 + /// Sucht eine lokalisierte Zeichenfolge, die Time in seconds how long the status window is shown ähnelt.
    8738 8738   /// </summary>
    8739  - public static string TimeInSecondsHowLongTheWindowShouldBeDisplayed {
     8739 + public static string TimeInSecondsHowLongTheStatusWindowIsShown {
    8740 8740   get {
    8741  - return ResourceManager.GetString("TimeInSecondsHowLongTheWindowShouldBeDisplayed", resourceCulture);
     8741 + return ResourceManager.GetString("TimeInSecondsHowLongTheStatusWindowIsShown", resourceCulture);
    8742 8742   }
    8743 8743   }
    8744 8744  
    skipped 277 lines
    9022 9022   }
    9023 9023  
    9024 9024   /// <summary>
    9025  - /// Sucht eine lokalisierte Zeichenfolge, die Untray / Bring window to front ähnelt.
     9025 + /// Sucht eine lokalisierte Zeichenfolge, die Untray / Bring window to foreground ähnelt.
    9026 9026   /// </summary>
    9027  - public static string UntrayBringWindowToFront {
     9027 + public static string UntrayBringWindowToForeground {
    9028 9028   get {
    9029  - return ResourceManager.GetString("UntrayBringWindowToFront", resourceCulture);
     9029 + return ResourceManager.GetString("UntrayBringWindowToForeground", resourceCulture);
    9030 9030   }
    9031 9031   }
    9032 9032  
    skipped 338 lines
    9371 9371   public static string WarningMessage_ProfileFileNotEncryptedStoringPasswords {
    9372 9372   get {
    9373 9373   return ResourceManager.GetString("WarningMessage_ProfileFileNotEncryptedStoringPasswords", resourceCulture);
     9374 + }
     9375 + }
     9376 +
     9377 + /// <summary>
     9378 + /// Sucht eine lokalisierte Zeichenfolge, die Enabling this setting is not recommended. Multiple instances of the application share the same settings and profile files. The last instance to be closed may overwrite changes made by other instances. ähnelt.
     9379 + /// </summary>
     9380 + public static string WarnMessage_MultipleInstances {
     9381 + get {
     9382 + return ResourceManager.GetString("WarnMessage_MultipleInstances", resourceCulture);
    9374 9383   }
    9375 9384   }
    9376 9385  
    skipped 218 lines
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager.Localization/Resources/Strings.resx
    skipped 1173 lines
    1174 1174   <data name="UnkownError" xml:space="preserve">
    1175 1175   <value>Unkown error!</value>
    1176 1176   </data>
    1177  - <data name="UntrayBringWindowToFront" xml:space="preserve">
    1178  - <value>Untray / Bring window to front</value>
     1177 + <data name="UntrayBringWindowToForeground" xml:space="preserve">
     1178 + <value>Untray / Bring window to foreground</value>
    1179 1179   </data>
    1180 1180   <data name="URL" xml:space="preserve">
    1181 1181   <value>URL</value>
    skipped 1047 lines
    2229 2229   <data name="ShowStatusWindowOnNetworkChange" xml:space="preserve">
    2230 2230   <value>Show status window on network change</value>
    2231 2231   </data>
    2232  - <data name="TimeInSecondsHowLongTheWindowShouldBeDisplayed" xml:space="preserve">
    2233  - <value>Time in seconds how long the window should be displayed</value>
     2232 + <data name="TimeInSecondsHowLongTheStatusWindowIsShown" xml:space="preserve">
     2233 + <value>Time in seconds how long the status window is shown</value>
    2234 2234   </data>
    2235 2235   <data name="WiFi" xml:space="preserve">
    2236 2236   <value>WiFi</value>
    skipped 1087 lines
    3324 3324   </data>
    3325 3325   <data name="ShowAddressBar" xml:space="preserve">
    3326 3326   <value>Show address bar</value>
     3327 + </data>
     3328 + <data name="WarnMessage_MultipleInstances" xml:space="preserve">
     3329 + <value>Enabling this setting is not recommended. Multiple instances of the application share the same settings and profile files. The last instance to be closed may overwrite changes made by other instances.</value>
    3327 3330   </data>
    3328 3331  </root>
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager.Settings/GlobalStaticConfiguration.cs
    skipped 17 lines
    18 18   // Type to search (average type speed --> 187 chars/min)
    19 19   public static TimeSpan SearchDispatcherTimerTimeSpan => new(0, 0, 0, 0, 750);
    20 20   
     21 + // Status window delay in ms
     22 + public static int StatusWindowDelayBeforeOpen => 5000;
     23 + 
     24 + 
    21 25   // Filter
    22 26   public static string ApplicationFileExtensionFilter => "Application (*.exe)|*.exe";
    23 27   public static string PuTTYPrivateKeyFileExtensionFilter => "PuTTY Private Key Files (*.ppk)|*.ppk";
    skipped 176 lines
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager.Settings/SettingsInfo.cs
    skipped 392 lines
    393 393   }
    394 394   }
    395 395   
    396  - private string _status_IPAddressToDetectLocalIPAddressBasedOnRouting = GlobalStaticConfiguration.Status_IPAddressToDetectLocalIPAddressBasedOnRouting;
    397  - public string Status_IPAddressToDetectLocalIPAddressBasedOnRouting
    398  - {
    399  - get => _status_IPAddressToDetectLocalIPAddressBasedOnRouting;
    400  - set
    401  - {
    402  - if (value == _status_IPAddressToDetectLocalIPAddressBasedOnRouting)
    403  - return;
    404  - 
    405  - _status_IPAddressToDetectLocalIPAddressBasedOnRouting = value;
    406  - OnPropertyChanged();
    407  - SettingsChanged = true;
    408  - }
    409  - }
    410  - 
    411 396   // Autostart
    412 397   private bool _autostart_StartMinimizedInTray;
    413 398   public bool Autostart_StartMinimizedInTray
    skipped 3713 lines
  • ■ ■ ■ ■ ■ ■
    docs/07_FAQ.md
    skipped 9 lines
    10 10   
    11 11  The documentation and the FAQ are not complete yet! Feel free to ask questions on [GitHub Discussions](https://github.com/BornToBeRoot/NETworkManager/discussions).
    12 12   
    13  -## How to contribute or report an issue?
     13 +## Contributing
     14 + 
     15 +### How to contribute or report an issue?
    14 16   
    15 17  Read the [README](https://github.com/BornToBeRoot/NETworkManager/blob/main/README.md#-contributing){:target="\_blank"} and follow the instructions there.
    16 18   
    17  -## Where are files stored?
     19 +### How to build the project?
     20 + 
     21 +The project can be build with Visual Studio or with a PowerShell script. More details and the requirements can be found in the [README](https://github.com/BornToBeRoot/NETworkManager/blob/main/README.md#-build){:target="\_blank"}.
     22 + 
     23 +## General
     24 + 
     25 +### Where are files stored?
    18 26   
    19 27  The setup installs the application in the following path: `%ProgramFiles%\NETworkManager`
    20 28  You can run the archive and portable version from anywhere.
    skipped 32 lines
    53 61  | PuTTY profile | `HKCU:\Software\SimonTatham\PuTTY\Sessions\NETworkManager` |
    54 62  | WebConsole cache | `%LocalAppData%\NETworkManager\WebConsole_Cache\*` |
    55 63   
    56  -## How to build the project?
    57  - 
    58  -The project can be build with Visual Studio or with a PowerShell script. More details and the requirements can be found in the [README](https://github.com/BornToBeRoot/NETworkManager/blob/main/README.md#-build){:target="\_blank"}.
    59  - 
    60  -## Profile, groups and settings priority
     64 +### Profile, groups and settings priority
    61 65   
    62 66  Settings in profiles overwrite group settings. Group settings overwrite global settings.
    63 67   
    64 68  Inheritance is: `General Settings > Group settings > Profile settings`
    65 69   
    66  -## How does the profile encryption work?
     70 +## Profile encryption
     71 + 
     72 +### How does the profile encryption work?
    67 73   
    68 74  Profile files are encrypted on disk using [AES](https://docs.microsoft.com/de-de/dotnet/api/system.security.cryptography.aes?view=net-6.0){:target="\_blank"} with a key size of 256 bits and a block size of 128 bits in CBC mode. The encryption key is derived from a master password using [Rfc2898DeriveBytes](https://docs.microsoft.com/en-US/dotnet/api/system.security.cryptography.rfc2898derivebytes?view=net-5.0){:target="\_blank"} (PBKDF2) with 1,000,000 iterations. At runtime, passwords are stored as [SecureString](https://docs.microsoft.com/en-US/dotnet/api/system.security.securestring?view=net-5.0){:target="\_blank"} once the profile file is loaded. For some functions, the password must be converted to a normal string and remains unencrypted in memory until the garbage collector cleans them up. If you found a security issue, you can report it [here](https://github.com/BornToBeRoot/NETworkManager/security/policy){:target="\_blank"}!
    69 75   
    70  -## How to enable profile file encryption?
     76 +### How to enable profile file encryption?
    71 77   
    72 78  Open the settings and go to the profile section. Right click on the profile file you want to encrypt. Select `Encryption...` > `Enable encryption...` and set your master password.
    73 79   
    74 80  ![ProfileFile_EnableEncryption](ProfileFile_EnableEncryption.gif)
    75 81   
    76  -## How to change the master password of an encrypted profile file?
     82 +### How to change the master password of an encrypted profile file?
    77 83   
    78 84  Open the settings and go to the profile section. Right click on an encrypted profile file. Select `Encryption...` > `Change Master Password...` and enter the current master password and a new master password.
    79 85   
    80 86  ![ProfileFile_EnableEncryption](ProfileFile_ChangeMasterPassword.gif)
    81 87   
    82  -## How to disable profile file encryption?
     88 +### How to disable profile file encryption?
    83 89   
    84 90  Open the settings and go to the profile section. Right click on an encrypted profile file. Select `Encryption...` > `Disable encryption...` and enter your master password.
    85 91   
    skipped 2 lines
  • ■ ■ ■ ■ ■ ■
    docs/Changelog/next-release.md
    skipped 19 lines
    20 20  ## Improvements
    21 21   
    22 22  ## Bugfixes
     23 +- Status window is now automatically closed again if it was opened by a network change event [#2105](https://github.com/BornToBeRoot/NETworkManager/pull/2105){:target="\_blank"}
    23 24   
    24 25  ## Other
    25 26  - Code cleanup [#2100](https://github.com/BornToBeRoot/NETworkManager/pull/2100){:target="\_blank"}
    26 27  - Language files updated [#transifex](https://github.com/BornToBeRoot/NETworkManager/pulls?q=author%3Aapp%2Ftransifex-integration){:target="\_blank"}
    27 28  - Dependencies updated [#dependencies](https://github.com/BornToBeRoot/NETworkManager/pulls?q=author%3Aapp%2Fdependabot){:target="\_blank"}
     29 +- Add documentation for:
     30 + - Settings > Window [#2105](https://github.com/BornToBeRoot/NETworkManager/pull/2105){:target="\_blank"}
     31 + - Settings > Status [#2105](https://github.com/BornToBeRoot/NETworkManager/pull/2105){:target="\_blank"}
     32 + - Settings > HotKeys [#2105](https://github.com/BornToBeRoot/NETworkManager/pull/2105){:target="\_blank"}
     33 + - Settings > Autostart [#2105](https://github.com/BornToBeRoot/NETworkManager/pull/2105){:target="\_blank"}
     34 + - Settings > Profiles [#2105](https://github.com/BornToBeRoot/NETworkManager/pull/2105){:target="\_blank"}
    28 35   
  • ■ ■ ■ ■
    docs/Documentation/01_Application/01_Dashboard.md
    skipped 11 lines
    12 12   
    13 13  The **Dashboard** shows the status of your computer's current network connection to get a quick overview of the most important information.
    14 14   
    15  -As soon as the status of the local network adapter changes (Ethernet cable is plugged in, WLAN or VPN is connected, etc.), the connection to the router and Internet is checked.
     15 +As soon as the status of the local network adapter changes (e.g. Ethernet cable is plugged in, WLAN or VPN is connected, etc.), the connection to the router and Internet is checked.
    16 16   
    17 17  ![Dashboard](01_Dashboard.png)
    18 18   
    skipped 52 lines
  • ■ ■ ■ ■ ■ ■
    docs/Documentation/03_Settings/01_General.md
    skipped 9 lines
    10 10   
    11 11  # General
    12 12   
    13  -## Default application
    14  - 
    15 13  ### Show the following application on startup:
    16 14   
    17 15  Default application that is displayed when the application is launched.
    skipped 1 lines
    19 17  Type: `NETworkManager.Models.ApplicationName`
    20 18   
    21 19  Default: `Dashboard`
    22  - 
    23  -## Visible applications in the bar:
    24 20   
    25 21  ### Visible applications
    26 22   
    skipped 11 lines
    38 34   
    39 35  Default: `None`
    40 36   
    41  -## Background job
    42  - 
    43 37  ### Run background job every x-minutes
    44 38   
    45 39  Run a background job every x-minutes to save profiles and settings.
    skipped 4 lines
    50 44   
    51 45  {: .note }
    52 46  The value 0 will disable the background job. Changes to this value will take effect after restarting the application.
    53  - 
    54  -## History
    55 47   
    56 48  ### Number of stored entries
    57 49   
    skipped 2 lines
    60 52  Type: `Integer`
    61 53   
    62 54  Default: `5` [Min `0`, Max `25`]
    63  - 
    64  -## Multithreading
    65 55   
    66 56  ### ThreadPool additional min. threads
    67 57   
    skipped 9 lines
  • ■ ■ ■ ■ ■ ■
    docs/Documentation/03_Settings/02_Window.md
    skipped 9 lines
    10 10   
    11 11  # Window
    12 12   
     13 +### Minimize main window instead of terminating the application
     14 + 
     15 +Minimize the main window instead of terminating the application when the close button is clicked.
     16 + 
     17 +**Type:** `Boolean`
     18 + 
     19 +**Default:** `Disabled`
     20 + 
     21 +### Minimize to tray instead of taskbar
     22 + 
     23 +Minimize the main window to the tray instead of the taskbar when the minimize (or close) button is clicked.
     24 + 
     25 +**Type:** `Boolean`
     26 + 
     27 +**Default:** `Disabled`
     28 + 
     29 +### Confirm close
     30 + 
     31 +Show a confirmation dialog when the close button is clicked.
     32 + 
     33 +**Type:** `Boolean`
     34 + 
     35 +**Default:** `Disabled`
     36 + 
     37 +### Multiple instances
     38 + 
     39 +Allow multiple instances of the application to be opened.
     40 + 
     41 +**Type:** `Boolean`
     42 + 
     43 +**Default:** `Disabled`
     44 + 
     45 +{. .warning}
     46 +Enabling this setting is not recommended. Multiple instances of the application share the same settings and profile files. The last instance to be closed may overwrite changes made by other instances.
     47 + 
     48 +### Always show tray icon
     49 + 
     50 +Always show the tray icon, even if the main window is visible.
     51 + 
     52 +**Type:** `Boolean`
     53 + 
     54 +**Default:** `Disabled`
     55 + 
     56 +### Show splash screen
     57 + 
     58 +Show the splash screen when the application is started.
     59 + 
     60 +**Type:** `Boolean`
     61 + 
     62 +**Default:** `Enabled`
     63 + 
  • ■ ■ ■ ■ ■ ■
    docs/Documentation/03_Settings/03_Appearance.md
    skipped 9 lines
    10 10   
    11 11  # Appearance
    12 12   
    13  -## Theme
    14  - 
    15 13  ### Theme
    16 14   
    17 15  Theme of the application which is based on [`MahApps.Metro themes`](https://mahapps.com/docs/themes/usage){:target="\_blank"}
    skipped 6 lines
    24 22   
    25 23  - `Dark`
    26 24  - `Light`
    27  - 
    28  -## Accent
    29 25   
    30 26  ### Accent
    31 27   
    skipped 32 lines
    64 60  {: .note }
    65 61  If you add, change or delete a theme in the folder, you must restart the application for the changes to be applied.
    66 62   
    67  -## Custom themes
    68  - 
    69 63  ### Use custom themes
    70 64   
    71 65  Enables or disables the custom themes.
    skipped 6 lines
    78 72   
    79 73  {: .note }
    80 74  Custom themes override the [`Accent`](#accent) and [`Theme`](#theme) settings.
    81  - 
    82  -## PowerShell
    83 75   
    84 76  ### Apply theme to PowerShell console
    85 77   
    skipped 36 lines
  • ■ ■ ■ ■ ■ ■
    docs/Documentation/03_Settings/04_Language.md
    skipped 9 lines
    10 10   
    11 11  # Language
    12 12   
     13 +### Language
     14 + 
    13 15  Language for the user interface of the application.
    14 16   
    15 17  **Type:** `NETworkManager.Localization.LocalizationInfo`
    skipped 9 lines
  • ■ ■ ■ ■ ■ ■
    docs/Documentation/03_Settings/05_Network.md
    skipped 9 lines
    10 10   
    11 11  # Network
    12 12   
    13  -## DNS
    14  - 
    15 13  ### Use custom DNS server
    16 14   
    17 15  Enables or disables the custom DNS server(s) for all DNS queries. If disabled, the DNS servers configured in Windows are used. If enabled, the servers configured under [DNS server(s)](#dns-servers) will be used.
    skipped 28 lines
  • ■ ■ ■ ■ ■ ■
    docs/Documentation/03_Settings/06_Status.md
    skipped 9 lines
    10 10   
    11 11  # Status
    12 12   
     13 +### Show status window on network change
     14 + 
     15 +Show the status window when the network changes (e.g. Ethernet cable is plugged in, WLAN or VPN is connected, etc.).
     16 + 
     17 +**Type:** `Boolean`
     18 + 
     19 +**Default:** `Enabled`
     20 + 
     21 +### Time in seconds how long the status window is shown
     22 + 
     23 +Time in seconds how long the status window is shown after the network has changed. The status window will be closed automatically after the specified time.
     24 + 
     25 +**Type:** `Integer`
     26 + 
     27 +**Default:** `10`
     28 + 
     29 +{: .note}
     30 +This will only work if [Show status window on network change](#show-status-window-on-network-change) is enabled and the status window is opened due to a network change event.
     31 + 
  • ■ ■ ■ ■ ■ ■
    docs/Documentation/03_Settings/07_HotKeys.md
    skipped 9 lines
    10 10   
    11 11  # HotKeys
    12 12   
     13 +### Untray / Bring to foreground
     14 + 
     15 +Untray the application and bring it to the foreground.
     16 + 
     17 +**Type:** `Boolean`
     18 + 
     19 +**Default:** `Disabled`
     20 + 
     21 +**Default Hotkey:** `ALT + STRG + O`
     22 + 
  • ■ ■ ■ ■ ■ ■
    docs/Documentation/03_Settings/08_Autostart.md
    skipped 9 lines
    10 10   
    11 11  # Autostart
    12 12   
     13 +### Start with Windows (current user)
     14 + 
     15 +Start the application automatically when the user logs in.
     16 + 
     17 +**Type:** `Boolean`
     18 + 
     19 +**Default:** `Disabled`
     20 + 
     21 +### Start minimized in tray
     22 + 
     23 +Start the application minimized in the tray when the user logs in.
     24 + 
     25 +**Type:** `Boolean`
     26 + 
     27 +**Default:** `Disabled`
     28 + 
     29 +{: .note}
     30 +Requires [Start with Windows (current user)](#start-with-windows-current-user) to be enabled.
     31 + 
  • ■ ■ ■ ■ ■ ■
    docs/Documentation/03_Settings/09_Update.md
    skipped 9 lines
    10 10   
    11 11  # Update
    12 12   
    13  -## Update
    14  - 
    15 13  ### Check for updates at startup
    16 14   
    17 15  Check for new program versions on GitHub when the application is launched.
    skipped 16 lines
  • ■ ■ ■ ■ ■ ■
    docs/Documentation/03_Settings/10_Profiles.md
    skipped 9 lines
    10 10   
    11 11  # Profiles
    12 12   
     13 +### Location
     14 + 
     15 +Folder where the application profiles are stored.
     16 + 
     17 +**Type**: `String`
     18 + 
     19 +**Default**:
     20 + 
     21 +| Version | Path |
     22 +| -------------- | ------------------------------------------------- |
     23 +| Setup / Archiv | `%UserProfile%\Documents\NETworkManager\Profiles` |
     24 +| Portable | `<APP_FOLDER>\Profiles` |
     25 + 
     26 +{: .note}
     27 +It is recommended to backup the above files on a regular basis.
     28 + 
     29 +{: .note}
     30 +To restore the profiles, close the application and copy the files from the backup to the above location.
     31 + 
     32 +### Profiles
     33 + 
     34 +List of profile files.
     35 + 
     36 +**Type**: `List<NETworkManager.Profiles.ProfileFileInfo>`
     37 + 
     38 +**Default**: `[Default]`
     39 + 
     40 +{: .information}
     41 +Profile files can be encrypted with a master password. Right click on a profile and select `Encryption... > Enable encryption...`. See [FAQ > Profile encryption](NETworkManager/FAQ#profile-encryption) for more details.
     42 + 
     43 +{: .note}
     44 +At least one profile is required and must exist.
     45 + 
  • ■ ■ ■ ■ ■ ■
    docs/Documentation/03_Settings/11_Settings.md
    skipped 9 lines
    10 10   
    11 11  # Settings
    12 12   
    13  -## Location
     13 +### Location
    14 14   
    15 15  Folder where the application settings are stored.
    16 16   
    skipped 12 lines
    29 29  {: .note}
    30 30  To restore the settings, close the application and copy the files from the backup to the above location.
    31 31   
    32  -## Reset
     32 +### Reset
    33 33   
    34 34  Button to reset all application settings to their default values.
    35 35   
    skipped 6 lines
Please wait...
Page is in error, reload to recover