Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
irusanov committed Nov 14, 2024
2 parents 82fa83c + a81cee6 commit 8ecdcad
Show file tree
Hide file tree
Showing 22 changed files with 368 additions and 213 deletions.
Binary file modified Common/ZenStates-Core.dll
Binary file not shown.
4 changes: 2 additions & 2 deletions WPF-no-themes/Properties/BuildNumberTemplate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@

using System.Reflection;

[assembly: AssemblyVersion("1.30.1436")]
[assembly: AssemblyFileVersion("1.30.1436")]
[assembly: AssemblyVersion("1.30.1535")]
[assembly: AssemblyFileVersion("1.30.1535")]
7 changes: 7 additions & 0 deletions WPF/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using System;
using System.Globalization;
using System.Threading;
using System.Windows;
using System.Windows.Markup;
using ZenStates.Core;
using ZenTimings.Windows;

Expand Down Expand Up @@ -30,6 +32,11 @@ protected override void OnStartup(StartupEventArgs e)
Environment.Exit(0);
}

Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
FrameworkElement.LanguageProperty.OverrideMetadata(typeof(FrameworkElement), new FrameworkPropertyMetadata(
XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag)));

updater = new Updater();

GC.KeepAlive(instanceMutex);
Expand Down
6 changes: 4 additions & 2 deletions WPF/AppSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public enum Theme : int
Light,
Dark,
DarkMint,
DarkMintGradient,
DarkRed,
Dracula,
RetroWave,
Expand All @@ -34,7 +35,7 @@ public enum ScreenshotType : int
public AppSettings Create(bool save = true)
{
Version = $"{VersionMajor}.{VersionMinor}";
AppTheme = Theme.Light;
AppTheme = Theme.DarkMintGradient;
ScreenshotMode = ScreenshotType.Window;
AutoRefresh = true;
AutoRefreshInterval = 2000;
Expand Down Expand Up @@ -112,6 +113,7 @@ public void ChangeTheme()
new Uri("pack://application:,,,/ZenTimings;component/Themes/Light.xaml", UriKind.Absolute),
new Uri("pack://application:,,,/ZenTimings;component/Themes/Dark.xaml", UriKind.Absolute),
new Uri("pack://application:,,,/ZenTimings;component/Themes/DarkMint.xaml", UriKind.Absolute),
new Uri("pack://application:,,,/ZenTimings;component/Themes/DarkMintGradient.xaml", UriKind.Absolute),
new Uri("pack://application:,,,/ZenTimings;component/Themes/DarkRed.xaml", UriKind.Absolute),
new Uri("pack://application:,,,/ZenTimings;component/Themes/Dracula.xaml", UriKind.Absolute),
new Uri("pack://application:,,,/ZenTimings;component/Themes/RetroWave.xaml", UriKind.Absolute),
Expand All @@ -125,7 +127,7 @@ public void ChangeTheme()
public bool AutoRefresh { get; set; } = true;
public int AutoRefreshInterval { get; set; } = 2000;
public bool AdvancedMode { get; set; } = true;
public Theme AppTheme { get; set; } = Theme.Light;
public Theme AppTheme { get; set; } = Theme.DarkMintGradient;
public ScreenshotType ScreenshotMode { get; set; } = ScreenshotType.Window;
public bool CheckForUpdates { get; set; } = true;
public string UpdaterSkippedVersion { get; set; } = "";
Expand Down
26 changes: 26 additions & 0 deletions WPF/CpuSingleton.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZenStates.Core;

namespace ZenTimings
{
internal sealed class CpuSingleton
{
private static Cpu instance = null;
private CpuSingleton() { }

public static Cpu Instance
{
get
{
if (instance == null)
instance = new Cpu();

return instance;
}
}
}
}
23 changes: 22 additions & 1 deletion WPF/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@
Loaded="AdonisWindow_Loaded"
BorderThickness="1"
UseLayoutRounding="True"
BorderBrush="{DynamicResource WindowBorderColor}" Closing="AdonisWindow_Closing" Height="538" SizeToContent="WidthAndHeight">
BorderBrush="{DynamicResource WindowBorderColor}"
Style="{DynamicResource WindowStyles}"
Closing="AdonisWindow_Closing"
Height="538"
SizeToContent="WidthAndHeight"
Language="en-US">

<!--Window.Style>
<Style TargetType="Window" BasedOn="{StaticResource {x:Type Window}}"/>
Expand Down Expand Up @@ -343,6 +348,9 @@
<TextBlock x:Name="labelVddMisc" Text="VDD MISC" IsEnabled="{Binding powerTable.VDD_MISC}" TextAlignment="Right" Visibility="{Binding timings.Type, Mode=OneWay, Converter={StaticResource DDR5ToBool}}" />

<TextBlock Text="" TextAlignment="Right" />

<TextBlock x:Name="labelProcOdtPullUp" ToolTip="Processor Odt Impedance Pull Up" Text="ProcOdt Pu" IsEnabled="False" TextAlignment="Right" Visibility="Collapsed" />
<TextBlock x:Name="labelProcOdtPullDown" Text="ProcOdt Pd" ToolTip="Processor Odt Impedance Pull Down" IsEnabled="False" TextAlignment="Right" Visibility="Collapsed" />
<TextBlock
x:Name="labelProcODT"
Text="ProcOdt"
Expand Down Expand Up @@ -384,6 +392,7 @@
<TextBlock x:Name="labelDramDqDs" Text="DramDqDs" IsEnabled="False" TextAlignment="Right" Visibility="{Binding timings.Type, Mode=OneWay, Converter={StaticResource DDR5ToBool}}" />

<TextBlock
x:Name="procOdtDivider1"
Text=""
TextAlignment="Right"
Visibility="{Binding codeName, Mode=OneWay, Converter={StaticResource PhoenixToBool}, ConverterParameter=Invisible}" />
Expand Down Expand Up @@ -449,7 +458,18 @@
<TextBlock x:Name="textBoxVddMisc" Text="{Binding powerTable.VDD_MISC, FallbackValue='N/A', Mode=OneWay, Converter={StaticResource FloatToVoltage}}" Style="{DynamicResource ValueStyles}" Visibility="{Binding timings.Type, Mode=OneWay, Converter={StaticResource DDR5ToBool}}" />

<TextBlock Text="" />

<!-- DDR4 + DDR5 -->
<TextBlock
x:Name="textBoxProcOdtPullUp"
Text="N/A"
Style="{DynamicResource ValueStyles}"
Visibility="Collapsed" />
<TextBlock
x:Name="textBoxProcOdtPullDown"
Text="N/A"
Style="{DynamicResource ValueStyles}"
Visibility="Collapsed" />
<TextBlock
x:Name="textBoxProcODT"
Text="N/A"
Expand Down Expand Up @@ -486,6 +506,7 @@
<TextBlock x:Name="textBoxDramDataDrvStren" Text="N/A" Style="{DynamicResource ValueStyles}" Visibility="{Binding timings.Type, Mode=OneWay, Converter={StaticResource DDR5ToBool}}" />

<TextBlock
x:Name="procOdtDivider2"
Text=""
Visibility="{Binding codeName, Mode=OneWay, Converter={StaticResource PhoenixToBool}, ConverterParameter=Invisible}" />
<!-- DDR4 -->
Expand Down
Loading

0 comments on commit 8ecdcad

Please sign in to comment.