Projects STRLCPY NETworkManager Commits 06c69a41
🤬
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/Controls/WebConsoleControl.xaml
    skipped 23 lines
    24 24   <RowDefinition Height="Auto" />
    25 25   <RowDefinition Height="*" />
    26 26   </Grid.RowDefinitions>
    27  - <Grid Grid.Row="0" Margin="10,10,10,5">
     27 + <Grid Grid.Row="0" Margin="10" Visibility="{Binding ShowAddressBar, Converter={StaticResource BooleanToVisibilityCollapsedConverter}}">
    28 28   <Grid.ColumnDefinitions>
    29 29   <ColumnDefinition Width="Auto" />
    30 30   <ColumnDefinition Width="10" />
    skipped 56 lines
    87 87   </Rectangle.Style>
    88 88   </Rectangle>
    89 89   </Button>
    90  - <TextBox x:Name="TextBoxUrl" Grid.Column="6" Style="{StaticResource DefaultTextBox}">
     90 + <TextBox x:Name="TextBoxUrl" Grid.Column="6" Style="{StaticResource DefaultTextBox}" IsReadOnly="{Binding IsLoading}">
    91 91   <TextBox.Text>
    92 92   <Binding Path="Url" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged">
    93 93   <Binding.ValidationRules>
    skipped 3 lines
    97 97   </Binding>
    98 98   </TextBox.Text>
    99 99   </TextBox>
     100 + <mah:ProgressRing Grid.Column="6" Width="20" Height="20" HorizontalAlignment="Right" Visibility="{Binding IsLoading, Converter={StaticResource BooleanToVisibilityHiddenConverter}}" Margin="0,0,4,0" />
    100 101   <Button Command="{Binding NavigateCommand}" IsDefault="{Binding IsLoading, Converter={StaticResource BooleanReverseConverter}}" Visibility="{Binding IsLoading,Converter={StaticResource BooleanReverseToVisibilityCollapsedConverter}}" Grid.Column="8">
    101 102   <Button.Style>
    102 103   <Style TargetType="{x:Type Button}" BasedOn="{StaticResource CleanButton}">
    skipped 41 lines
    144 145   </Rectangle>
    145 146   </Button>
    146 147   </Grid>
    147  - <mah:MetroProgressBar Grid.Row="1" IsIndeterminate="True" Visibility="{Binding IsLoading, Converter={StaticResource BooleanToVisibilityHiddenConverter}}" Margin="0,0,0,5" />
    148 148   <webview:WebView2 Grid.Row="2" x:Name="Browser2">
    149 149   <webview:WebView2.Style>
    150 150   <Style TargetType="{x:Type webview:WebView2}">
    skipped 11 lines
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/Controls/WebConsoleControl.xaml.cs
    skipped 67 lines
    68 68   OnPropertyChanged();
    69 69   }
    70 70   }
     71 + 
     72 + public bool ShowAddressBar => SettingsManager.Current.WebConsole_ShowAddressBar;
    71 73   #endregion
    72 74   
    73 75   #region Constructor, load
    skipped 7 lines
    81 83   Browser2.NavigationStarting += Browser2_NavigationStarting;
    82 84   Browser2.NavigationCompleted += Browser2_NavigationCompleted;
    83 85   Browser2.SourceChanged += Browser2_SourceChanged;
     86 + 
     87 + SettingsManager.Current.PropertyChanged += Current_PropertyChanged;
    84 88   
    85 89   Dispatcher.ShutdownStarted += Dispatcher_ShutdownStarted;
    86 90   }
    skipped 97 lines
    184 188   FirstLoad = false;
    185 189   
    186 190   IsLoading = false;
     191 + }
     192 + 
     193 + private void Current_PropertyChanged(object sender, PropertyChangedEventArgs e)
     194 + {
     195 + switch (e.PropertyName)
     196 + {
     197 + case nameof(SettingsInfo.WebConsole_ShowAddressBar):
     198 + OnPropertyChanged(nameof(ShowAddressBar));
     199 + break;
     200 + }
    187 201   }
    188 202   
    189 203   private void Dispatcher_ShutdownStarted(object sender, EventArgs e)
    skipped 6 lines
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/SettingsViewModel.cs
    skipped 120 lines
    121 121   private PuTTYSettingsView _puTTYSettingsView;
    122 122   private AWSSessionManagerSettingsView _awsSessionManagerSettingsView;
    123 123   private TigerVNCSettingsView _tigerVNCSettingsView;
     124 + private WebConsoleSettingsView _webConsoleSettingsView;
    124 125   private SNMPSettingsView _snmpSettingsView;
    125 126   private SNTPLookupSettingsView _sntpLookupSettingsView;
    126 127   private WakeOnLANSettingsView _wakeOnLANSettingsView;
    127  - //private WhoisSettingsView _whoisSettingsView;
    128 128   private BitCalculatorSettingsView _bitCalculatorSettingsView;
    129 129   #endregion
    130 130   
    skipped 162 lines
    293 293   
    294 294   SettingsContent = _tigerVNCSettingsView;
    295 295   break;
     296 + case SettingsViewName.WebConsole:
     297 + _webConsoleSettingsView ??= new WebConsoleSettingsView();
     298 +
     299 + SettingsContent = _webConsoleSettingsView;
     300 + break;
    296 301   case SettingsViewName.SNMP:
    297 302   _snmpSettingsView ??= new SNMPSettingsView();
    298 303   
    skipped 9 lines
    308 313   
    309 314   SettingsContent = _wakeOnLANSettingsView;
    310 315   break;
    311  - /*
    312  - case SettingsViewName.Whois:
    313  - _whoisSettingsView ??= new WhoisSettingsView();
    314  - 
    315  - SettingsContent = _whoisSettingsView;
    316  - break;
    317  - */
    318 316   case SettingsViewName.BitCalculator:
    319 317   _bitCalculatorSettingsView ??= new BitCalculatorSettingsView();
    320 318   
    skipped 16 lines
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/WebConsoleSettingsViewModel.cs
     1 +using NETworkManager.Settings;
     2 + 
     3 +namespace NETworkManager.ViewModels;
     4 + 
     5 +public class WebConsoleSettingsViewModel : ViewModelBase
     6 +{
     7 + #region Variables
     8 + private readonly bool _isLoading;
     9 + 
     10 + private bool _showAddressBar;
     11 + public bool ShowAddressBar
     12 + {
     13 + get => _showAddressBar;
     14 + set
     15 + {
     16 + if (value == _showAddressBar)
     17 + return;
     18 + 
     19 + if (!_isLoading)
     20 + SettingsManager.Current.WebConsole_ShowAddressBar = value;
     21 + 
     22 + _showAddressBar = value;
     23 + OnPropertyChanged();
     24 + }
     25 + }
     26 + #endregion
     27 + 
     28 + #region Constructor, load settings
     29 + public WebConsoleSettingsViewModel()
     30 + {
     31 + _isLoading = true;
     32 + 
     33 + LoadSettings();
     34 + 
     35 + _isLoading = false;
     36 + }
     37 + 
     38 + private void LoadSettings()
     39 + {
     40 + ShowAddressBar = SettingsManager.Current.WebConsole_ShowAddressBar;
     41 + }
     42 + #endregion
     43 +}
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/WhoisSettingsViewModel.cs
    1  -using NETworkManager.Settings;
    2  -using NETworkManager.Utilities;
    3  - 
    4  -namespace NETworkManager.ViewModels;
    5  - 
    6  -public class WhoisSettingsViewModel : ViewModelBase
    7  -{
    8  - #region Variables
    9  - private readonly bool _isLoading;
    10  -
    11  -
    12  - #endregion
    13  - 
    14  - #region Contructor, load settings
    15  - public WhoisSettingsViewModel()
    16  - {
    17  - _isLoading = true;
    18  - 
    19  - LoadSettings();
    20  - 
    21  - _isLoading = false;
    22  - }
    23  - 
    24  - private void LoadSettings()
    25  - {
    26  - 
    27  - }
    28  - #endregion
    29  -}
  • ■ ■ ■ ■
    Source/NETworkManager/Views/WebConsoleHostView.xaml
    skipped 265 lines
    266 266   <MenuItem.Icon>
    267 267   <Rectangle Width="16" Height="16" Fill="{DynamicResource MahApps.Brushes.Gray3}">
    268 268   <Rectangle.OpacityMask>
    269  - <VisualBrush Stretch="Uniform" Visual="{iconPacks:Material Kind=EyeOutline}" />
     269 + <VisualBrush Stretch="Uniform" Visual="{iconPacks:Material Kind=Play}" />
    270 270   </Rectangle.OpacityMask>
    271 271   </Rectangle>
    272 272   </MenuItem.Icon>
    skipped 223 lines
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/Views/WebConsoleSettingsView.xaml
     1 +<UserControl x:Class="NETworkManager.Views.WebConsoleSettingsView"
     2 + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
     3 + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     4 + xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
     5 + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
     6 + xmlns:validators="clr-namespace:NETworkManager.Validators;assembly=NETworkManager.Validators"
     7 + xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
     8 + xmlns:viewModels="clr-namespace:NETworkManager.ViewModels"
     9 + xmlns:localization="clr-namespace:NETworkManager.Localization.Resources;assembly=NETworkManager.Localization"
     10 + mc:Ignorable="d" d:DataContext="{d:DesignInstance viewModels:WebConsoleSettingsViewModel}">
     11 + <StackPanel>
     12 + <TextBlock Text="{x:Static localization:Strings.WebConsole}" Style="{StaticResource HeaderTextBlock}" />
     13 + <mah:ToggleSwitch Header="{x:Static localization:Strings.ShowAddressBar}" IsOn="{Binding ShowAddressBar}" />
     14 + </StackPanel>
     15 +</UserControl>
     16 + 
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/Views/WebConsoleSettingsView.xaml.cs
     1 +using NETworkManager.ViewModels;
     2 + 
     3 +namespace NETworkManager.Views;
     4 + 
     5 +public partial class WebConsoleSettingsView
     6 +{
     7 + private readonly WebConsoleSettingsViewModel _viewModel = new();
     8 + 
     9 + public WebConsoleSettingsView()
     10 + {
     11 + InitializeComponent();
     12 + DataContext = _viewModel;
     13 + }
     14 +}
     15 + 
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/Views/WhoisSettingsView.xaml
    1  -<UserControl x:Class="NETworkManager.Views.WhoisSettingsView"
    2  - xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    3  - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    4  - xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    5  - xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    6  - xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
    7  - xmlns:viewModels="clr-namespace:NETworkManager.ViewModels"
    8  - xmlns:localization="clr-namespace:NETworkManager.Localization.Resources;assembly=NETworkManager.Localization"
    9  - mc:Ignorable="d" d:DataContext="{d:DesignInstance viewModels:WhoisSettingsViewModel}">
    10  - <StackPanel>
    11  -
    12  - </StackPanel>
    13  -</UserControl>
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/Views/WhoisSettingsView.xaml.cs
    1  -using NETworkManager.ViewModels;
    2  - 
    3  -namespace NETworkManager.Views;
    4  - 
    5  -public partial class WhoisSettingsView
    6  -{
    7  - private readonly WhoisSettingsViewModel _viewModel = new WhoisSettingsViewModel();
    8  - 
    9  - public WhoisSettingsView()
    10  - {
    11  - InitializeComponent();
    12  - DataContext = _viewModel;
    13  - }
    14  -}
    15  - 
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager.Localization/Resources/Strings.Designer.cs
    skipped 7887 lines
    7888 7888   }
    7889 7889  
    7890 7890   /// <summary>
     7891 + /// Sucht eine lokalisierte Zeichenfolge, die Show address bar ähnelt.
     7892 + /// </summary>
     7893 + public static string ShowAddressBar {
     7894 + get {
     7895 + return ResourceManager.GetString("ShowAddressBar", resourceCulture);
     7896 + }
     7897 + }
     7898 +
     7899 + /// <summary>
    7891 7900   /// Sucht eine lokalisierte Zeichenfolge, die Show closed ports ähnelt.
    7892 7901   /// </summary>
    7893 7902   public static string ShowClosedPorts {
    skipped 1692 lines
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager.Localization/Resources/Strings.resx
    skipped 3321 lines
    3322 3322   <data name="StatusWindow" xml:space="preserve">
    3323 3323   <value>Status window</value>
    3324 3324   </data>
     3325 + <data name="ShowAddressBar" xml:space="preserve">
     3326 + <value>Show address bar</value>
     3327 + </data>
    3325 3328  </root>
  • ■ ■ ■ ■ ■
    Source/NETworkManager.Settings/GlobalStaticConfiguration.cs
    skipped 142 lines
    143 143   public static int TigerVNC_DefaultVNCPort => 5900;
    144 144   
    145 145   // WebConsole
     146 + public static bool WebConsole_ShowAddressBar => true;
    146 147   public static string WebConsole_Cache => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), AssemblyManager.Current.Name, "WebConsole_Cache");
    147 148   
    148 149   // Application: SNMP
    skipped 50 lines
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager.Settings/SettingsInfo.cs
    skipped 3077 lines
    3078 3078   }
    3079 3079   #endregion
    3080 3080   
    3081  - #region WebConsole
     3081 + #region Web Console
    3082 3082   private ObservableCollection<string> _webConsole_UrlHistory = new();
    3083 3083   public ObservableCollection<string> WebConsole_UrlHistory
    3084 3084   {
    skipped 34 lines
    3119 3119   return;
    3120 3120   
    3121 3121   _webConsole_ProfileWidth = value;
     3122 + OnPropertyChanged();
     3123 + SettingsChanged = true;
     3124 + }
     3125 + }
     3126 +
     3127 + 
     3128 + private bool _webConsole_ShowAddressBar = GlobalStaticConfiguration.WebConsole_ShowAddressBar;
     3129 + public bool WebConsole_ShowAddressBar
     3130 + {
     3131 + get => _webConsole_ShowAddressBar;
     3132 + set
     3133 + {
     3134 + if (value == _webConsole_ShowAddressBar)
     3135 + return;
     3136 + 
     3137 + _webConsole_ShowAddressBar = value;
    3122 3138   OnPropertyChanged();
    3123 3139   SettingsChanged = true;
    3124 3140   }
    skipped 995 lines
  • ■ ■ ■ ■
    Source/NETworkManager.Settings/SettingsViewManager.cs
    skipped 33 lines
    34 34   new SettingsViewInfo(SettingsViewName.PuTTY, ApplicationManager.GetIcon(ApplicationName.PuTTY), SettingsViewGroup.Applications),
    35 35   new SettingsViewInfo(SettingsViewName.AWSSessionManager, ApplicationManager.GetIcon(ApplicationName.AWSSessionManager), SettingsViewGroup.Applications),
    36 36   new SettingsViewInfo(SettingsViewName.TigerVNC, ApplicationManager.GetIcon(ApplicationName.TigerVNC), SettingsViewGroup.Applications),
     37 + new SettingsViewInfo(SettingsViewName.WebConsole, ApplicationManager.GetIcon(ApplicationName.WebConsole), SettingsViewGroup.Applications),
    37 38   new SettingsViewInfo(SettingsViewName.SNMP, ApplicationManager.GetIcon(ApplicationName.SNMP), SettingsViewGroup.Applications),
    38 39   new SettingsViewInfo(SettingsViewName.SNTPLookup, ApplicationManager.GetIcon(ApplicationName.SNTPLookup), SettingsViewGroup.Applications),
    39 40   new SettingsViewInfo(SettingsViewName.WakeOnLAN, ApplicationManager.GetIcon(ApplicationName.WakeOnLAN), SettingsViewGroup.Applications),
    40  - // new SettingsViewInfo(SettingsViewName.Whois, ApplicationManager.GetIcon(ApplicationName.Whois), SettingsViewGroup.Applications)
    41 41   new SettingsViewInfo(SettingsViewName.BitCalculator, ApplicationManager.GetIcon(ApplicationName.BitCalculator), SettingsViewGroup.Applications),
    42 42   };
    43 43  }
    skipped 2 lines
  • ■ ■ ■ ■
    Source/NETworkManager.Settings/SettingsViewName.cs
    skipped 23 lines
    24 24   PuTTY,
    25 25   AWSSessionManager,
    26 26   TigerVNC,
     27 + WebConsole,
    27 28   SNMP,
    28 29   SNTPLookup,
    29 30   WakeOnLAN,
    30  - //Whois,
    31 31   BitCalculator
    32 32  }
    33 33   
  • ■ ■ ■ ■ ■
    docs/Changelog/next-release.md
    skipped 32 lines
    33 33  - **Port Scanner**
    34 34   - Option added to limit the number of concurrent threads per host scan (5) & port scan (256). Increasing the values can speed up the scan, but can also lead to resource problems. [#2026](https://github.com/BornToBeRoot/NETworkManager/pull/2026){:target="\_blank"}
    35 35  - **Web Console**
     36 + - Address bar can be hidden in the settings (default: visible) [#2070](https://github.com/BornToBeRoot/NETworkManager/pull/2070){:target="\_blank"}
    36 37   - Add cancel button (and `Esc` key) to stop navigation to a website [#2069](https://github.com/BornToBeRoot/NETworkManager/pull/2069){:target="\_blank"}
    37 38   
    38 39  ## Bugfixes
    skipped 33 lines
Please wait...
Page is in error, reload to recover