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("2026.5.24.0")]
[assembly: AssemblyFileVersion("2026.5.24.0")]
[assembly: AssemblyVersion("2026.5.30.0")]
[assembly: AssemblyFileVersion("2026.5.30.0")]
22 changes: 20 additions & 2 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.

6 changes: 6 additions & 0 deletions Source/NETworkManager.Localization/Resources/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,9 @@
<data name="CapsLockIsEnabled" xml:space="preserve">
<value>Caps lock is enabled!</value>
</data>
<data name="ChartTimeInSeconds" xml:space="preserve">
<value>Chart time (seconds)</value>
</data>
<data name="CheckForUpdatesAtStartup" xml:space="preserve">
<value>Check for updates at startup</value>
</data>
Expand Down Expand Up @@ -1513,6 +1516,9 @@ Profile files are not affected!</value>
<data name="Lime" xml:space="preserve">
<value>Lime</value>
</data>
<data name="Live" xml:space="preserve">
<value>Live</value>
</data>
<data name="Magenta" xml:space="preserve">
<value>Magenta</value>
</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ public static class GlobalStaticConfiguration
public static int PingMonitor_TTL => 64;
public static int PingMonitor_WaitTime => 1000;
public static bool PingMonitor_ExpandHostView => false;
public static int PingMonitor_ChartTime => 120;
public static ExportFileType PingMonitor_ExportFileType => ExportFileType.Csv;

// Application: Traceroute
Expand Down
13 changes: 13 additions & 0 deletions Source/NETworkManager.Settings/SettingsInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1508,6 +1508,19 @@ public bool PingMonitor_ExpandHostView
}
} = GlobalStaticConfiguration.PingMonitor_ExpandHostView;

public int PingMonitor_ChartTime
{
get;
set
{
if (value == field)
return;

field = value;
OnPropertyChanged();
}
} = GlobalStaticConfiguration.PingMonitor_ChartTime;

public string PingMonitor_ExportFilePath
{
get;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
</Style>
</Rectangle.Style>
<Rectangle.OpacityMask>
<VisualBrush Stretch="Uniform" Visual="{iconPacks:Material Kind=Export}" />
<VisualBrush Stretch="Uniform" Visual="{iconPacks:Material Kind=FileMoveOutline}" />
</Rectangle.OpacityMask>
</Rectangle>
</MenuItem.Icon>
Expand Down
68 changes: 68 additions & 0 deletions Source/NETworkManager/Resources/Styles/ExpanderStyles.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,74 @@
Value="{DynamicResource ResourceKey=ExpanderDownHeader}" />
</Style>

<!-- Header style for bordered expanders (e.g. the ping monitor host): adds a small
left margin so the chevron does not sit flush against the visible border. -->
<Style x:Key="PingMonitorExpanderDownHeader"
BasedOn="{StaticResource ResourceKey=MahApps.Styles.ToggleButton.ExpanderHeader.Down}"
TargetType="{x:Type TypeName=ToggleButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TypeName=ToggleButton}">
<Border Padding="{TemplateBinding Property=Padding}"
Background="{TemplateBinding Property=Background}"
BorderBrush="{TemplateBinding Property=BorderBrush}"
BorderThickness="{TemplateBinding Property=BorderThickness}">
<Grid Background="Transparent" SnapsToDevicePixels="False">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Rectangle Grid.Column="0" Grid.Row="0"
x:Name="Chevron"
Width="16" Height="16"
Margin="10,0,0,0"
Fill="{DynamicResource ResourceKey=MahApps.Brushes.Gray3}"
VerticalAlignment="Center">
<Rectangle.OpacityMask>
<VisualBrush Stretch="Uniform" Visual="{iconPacks:Material Kind=ChevronUp}" />
</Rectangle.OpacityMask>
</Rectangle>
<mahAppsControls:ContentControlEx Grid.Column="1"
Margin="10,0,0,0"
HorizontalAlignment="Stretch"
Padding="{TemplateBinding Property=Padding}"
HorizontalContentAlignment="{TemplateBinding Property=HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding Property=VerticalContentAlignment}"
Content="{TemplateBinding Property=Content}"
ContentCharacterCasing="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=(mahAppsControls:ControlsHelper.ContentCharacterCasing)}"
ContentStringFormat="{TemplateBinding Property=ContentStringFormat}"
ContentTemplate="{TemplateBinding Property=ContentTemplate}"
ContentTemplateSelector="{TemplateBinding Property=ContentTemplateSelector}"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding Property=SnapsToDevicePixels}" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="Chevron" Property="OpacityMask">
<Setter.Value>
<VisualBrush Stretch="Uniform" Visual="{iconPacks:Material Kind=ChevronDown}" />
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Chevron" Property="Fill"
Value="{DynamicResource ResourceKey=MahApps.Brushes.Gray5}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

<!-- Expander variant for the ping monitor host (bordered) using the indented header. -->
<Style x:Key="PingMonitorExpander"
TargetType="{x:Type TypeName=Expander}"
BasedOn="{StaticResource ResourceKey=DefaultExpander}">
<Setter Property="mahAppsControls:ExpanderHelper.HeaderDownStyle"
Value="{DynamicResource ResourceKey=PingMonitorExpanderDownHeader}" />
</Style>

<Style x:Key="ProfileExpanderOpen"
BasedOn="{StaticResource ResourceKey=MahApps.Styles.ToggleButton.ExpanderHeader.Down}"
TargetType="{x:Type TypeName=ToggleButton}">
Expand Down
28 changes: 2 additions & 26 deletions Source/NETworkManager/ViewModels/PingMonitorHostViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,22 +144,6 @@ public ObservableCollection<PingMonitorView> Hosts
/// </summary>
public ICollectionView HostsView { get; }

/// <summary>
/// Gets or sets the selected host.
/// </summary>
public PingMonitorView SelectedHost
{
get;
set
{
if (value == field)
return;

field = value;
OnPropertyChanged();
}
}

#region Profiles

/// <summary>
Expand Down Expand Up @@ -461,16 +445,6 @@ private void CloseGroupAction(object group)
RemoveGroup(group.ToString());
}

/// <summary>
/// Gets the command to export the selected host's data.
/// </summary>
public ICommand ExportCommand => new RelayCommand(_ => ExportAction());

private void ExportAction()
{
SelectedHost?.Export();
}

/// <summary>
/// Gets the command to add a new profile.
/// </summary>
Expand Down Expand Up @@ -698,6 +672,7 @@ private void RemoveGroup(string group)
continue;

Hosts[i].Stop();
Hosts[i].Cleanup();
Hosts.RemoveAt(i);
}
}
Expand All @@ -714,6 +689,7 @@ private void RemoveHostByGuid(Guid hostId)
return;

Hosts[i].Stop();
Hosts[i].Cleanup();
Hosts.RemoveAt(i);
}

Expand Down
20 changes: 20 additions & 0 deletions Source/NETworkManager/ViewModels/PingMonitorSettingsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,25 @@ public bool ExpandHostView
}
}

/// <summary>
/// Gets or sets the chart time window in seconds.
/// </summary>
public int ChartTime
{
get;
set
{
if (value == field)
return;

if (!_isLoading)
SettingsManager.Current.PingMonitor_ChartTime = value;

field = value;
OnPropertyChanged();
}
}

#endregion

#region Contructor, load settings
Expand All @@ -149,6 +168,7 @@ private void LoadSettings()
DontFragment = SettingsManager.Current.PingMonitor_DontFragment;
WaitTime = SettingsManager.Current.PingMonitor_WaitTime;
ExpandHostView = SettingsManager.Current.PingMonitor_ExpandHostView;
ChartTime = SettingsManager.Current.PingMonitor_ChartTime;
}

#endregion
Expand Down
Loading
Loading