Skip to content

Commit

Permalink
Update version number.
Browse files Browse the repository at this point in the history
minor feature #52 implementation amendment.
  • Loading branch information
Ashfaaq18 committed Jul 10, 2022
1 parent f7a3736 commit c8dde5d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
13 changes: 10 additions & 3 deletions OpenNetMeter/Models/NetworkProcess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,16 @@ private async Task CaptureNetworkSpeed()
{
Stopwatch sw1 = Stopwatch.StartNew();

UploadSpeed = (CurrentSessionUploadData - tempUpload) * 8;
DownloadSpeed = (CurrentSessionDownloadData - tempDownload) * 8;
if(Properties.Settings.Default.NetworkSpeedFormat == 0)
{
UploadSpeed = (CurrentSessionUploadData - tempUpload) * 8;
DownloadSpeed = (CurrentSessionDownloadData - tempDownload) * 8;
}
else
{
UploadSpeed = (CurrentSessionUploadData - tempUpload);
DownloadSpeed = (CurrentSessionDownloadData - tempDownload);
}

tempUpload = CurrentSessionUploadData;
tempDownload = CurrentSessionDownloadData;
Expand All @@ -300,7 +308,6 @@ private async Task CaptureNetworkSpeed()
//Debug.WriteLine($"current thread (CaptureNetworkSpeed): {Thread.CurrentThread.ManagedThreadId}");
//Debug.WriteLine($"networkProcess {DownloadSpeed}");
}
Debug.WriteLine("WOah woah boi slow down there");
}
catch (OperationCanceledException ex)
{
Expand Down
2 changes: 1 addition & 1 deletion OpenNetMeter/OpenNetMeter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<UseWindowsForms>true</UseWindowsForms>
<UseWPF>true</UseWPF>
<ApplicationIcon>Resources\AppIcon.ico</ApplicationIcon>
<Version>0.11.2</Version>
<Version>0.12.0</Version>
<AssemblyName>OpenNetMeter</AssemblyName>
<StartupObject>OpenNetMeter.App</StartupObject>
<Win32Resource />
Expand Down
1 change: 1 addition & 0 deletions OpenNetMeter/ViewModels/MainWindowVM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ private void Svm_PropertyChanged(object? sender, PropertyChangedEventArgs e)
break;
case "NetworkSpeedFormat":
dusvm.Graph.ChangeYLabel();
dusvm.Graph.DrawClear();
break;
default:
break;
Expand Down
2 changes: 1 addition & 1 deletion OpenNetMeter/Views/Converters/NetSpeedFormatConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public object Convert(object value, Type targetType, object parameter, CultureIn
if(Properties.Settings.Default.NetworkSpeedFormat == 0)
return DataSizeSuffix.InStr((long)value, 1, false);
else
return DataSizeSuffix.InStr((long)value/8, 1, true);
return DataSizeSuffix.InStr((long)value, 1, true);
}

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
Expand Down
6 changes: 3 additions & 3 deletions OpenNetMeter/Views/ResourceDictionaries/DarkModeRD.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@
<Style TargetType="{x:Type TextBlock}" x:Key="FooterTextStyle">
<Setter Property="Foreground" Value="Black"/>
<Setter Property="TextAlignment" Value="Right"/>
<Setter Property="Padding" Value="8,2"/>
<Setter Property="Padding" Value="4,2"/>
<Style.Triggers>
<DataTrigger Binding="{Binding Source={x:Static res:Settings.Default}, Path = DarkMode}" Value="True">
<Setter Property="Foreground" Value="White"/>
Expand All @@ -469,7 +469,7 @@
<Setter Property="Height" Value="30"/>
<Setter Property="FontFamily" Value="Segoe UI" />
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Padding" Value="8,2"/>
<Setter Property="Padding" Value="4,2"/>
<Setter Property="Background" Value="#c0e3da" />
<Setter Property="Foreground" Value="Black"/>
<Setter Property="BorderBrush" Value="#999999"/>
Expand Down Expand Up @@ -548,7 +548,7 @@
</Style>

<Style x:Key="DGCellStyle" TargetType="DataGridCell">
<Setter Property="Padding" Value="8,2" />
<Setter Property="Padding" Value="4,2" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridCell}">
Expand Down

0 comments on commit c8dde5d

Please sign in to comment.