Skip to content

Commit

Permalink
1.0.6.3 CONSUMER EDITION
Browse files Browse the repository at this point in the history
A lot of bug fixes, redesign and better performance
  • Loading branch information
Erruar committed Feb 5, 2024
1 parent f03a4d7 commit 1093632
Show file tree
Hide file tree
Showing 765 changed files with 14,824 additions and 3,664 deletions.
1 change: 1 addition & 0 deletions Saku Overclock/FastWPF.DesignerSettings
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"DesignerProperties":true,"RelativeApplicationResourcePath":"App.xaml","Platform":"x64","IsEnabled":true}
1 change: 0 additions & 1 deletion Saku Overclock/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:windowex="using:WinUIEx"
xmlns:tb="using:H.NotifyIcon"
MinWidth="967"
MinHeight="500"
PersistenceId="MainWindow"
Expand Down
105 changes: 28 additions & 77 deletions Saku Overclock/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public MainWindow()
ConfigLoad();
AppWindow.SetIcon(Path.Combine(AppContext.BaseDirectory, "Assets/WindowIcon.ico"));
Content = null;
Title = "AppDisplayName".GetLocalized();
Title = "AppDisplayName".GetLocalized();
NotifyIcon ni = new NotifyIcon();
ni.Icon = new System.Drawing.Icon(GetType(),"WindowIcon.ico");
ni.Visible = true;
Expand Down Expand Up @@ -94,6 +94,22 @@ public MainWindow()
DeviceLoad();
ProfileLoad();
Tray_Start();
Set_Blue();
}
private async void Set_Blue()
{
await Task.Delay(120);
if (config.bluetheme == true)
{
if (App.MainWindow.Content is FrameworkElement rootElement)
{
rootElement.RequestedTheme = ElementTheme.Dark;
TitleBarHelper.UpdateTitleBar(ElementTheme.Dark);
}
Microsoft.UI.Xaml.Media.MicaBackdrop micaBackdrop = new Microsoft.UI.Xaml.Media.MicaBackdrop();
micaBackdrop.Kind = Microsoft.UI.Composition.SystemBackdrops.MicaKind.BaseAlt;
App.MainWindow.SystemBackdrop = micaBackdrop;
}
}
private async void Tray_Start()
{
Expand Down Expand Up @@ -163,7 +179,7 @@ void ConfigSave()

if (mc.config.reapplytime == true)
{
DispatcherTimer timer = new DispatcherTimer();
var timer = new DispatcherTimer();
try
{
timer.Interval = TimeSpan.FromMilliseconds(mc.config.reapplytimer * 1000);
Expand Down Expand Up @@ -191,8 +207,15 @@ void ConfigSave()
else
{
timer.Stop();
mc.config.execute = false;
ConfigSave();
timer.Tick += (sender, e) =>
{
if (mc.config.reapplytime == true)
{
// Запустите ryzenadj снова
Process();
}
};
timer.Start();
}

}
Expand All @@ -202,6 +225,7 @@ void ConfigSave()
}
void Process()
{
ConfigLoad();
Process p = new Process();
p.StartInfo.UseShellExecute = false;
p.StartInfo.FileName = @"ryzenadj.exe";
Expand Down Expand Up @@ -303,79 +327,6 @@ void Process()
line = null;
}
}

/*public static void GetInfo()
{
var mc = new Applyer();
void ConfigLoad()
{
mc.config = JsonConvert.DeserializeObject<Config>(File.ReadAllText(Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "\\SakuOverclock\\config.json"));
}
void ConfigSave()
{
Directory.CreateDirectory(System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), "SakuOverclock"));
File.WriteAllText(Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "\\SakuOverclock\\config.json", JsonConvert.SerializeObject(mc.config));
}
ConfigLoad();
ConfigLoad();
if (mc.config.fanex == true)
{
mc.config.fan1v = "";
mc.config.fan2v = "";
ConfigSave();
Process p = new Process();
p.StartInfo.UseShellExecute = false;
p.StartInfo.FileName = @"nbfc/nbfc.exe";
p.StartInfo.Arguments = " status --fan 0";
p.StartInfo.CreateNoWindow = true;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput = true;
p.Start();
StreamReader outputWriter = p.StandardOutput;
var line = outputWriter.ReadLine();
while (line != null)
{
if (line != "")
{
mc.config.fan1v += line;
ConfigSave();
}
line = outputWriter.ReadLine();
}
line = null;
//p.WaitForExit();
//fan 2
Process p1 = new Process();
p1.StartInfo.UseShellExecute = false;
p1.StartInfo.FileName = @"nbfc/nbfc.exe";
p1.StartInfo.Arguments = " status --fan 1";
p1.StartInfo.CreateNoWindow = true;
p1.StartInfo.RedirectStandardError = true;
p1.StartInfo.RedirectStandardInput = true;
p1.StartInfo.RedirectStandardOutput = true;
p1.Start();
StreamReader outputWriter1 = p1.StandardOutput;
var line1 = outputWriter1.ReadLine();
while (line1 != null)
{
if (line1 != "")
{
mc.config.fan2v += line1;
ConfigSave();
}
line1 = outputWriter1.ReadLine();
}
line1 = null;
//p1.WaitForExit();
}
}*/
}

// this handles updating the caption button colors correctly when indows system theme is changed
Expand Down
6 changes: 3 additions & 3 deletions Saku Overclock/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<Identity
Name="129fe03a-4520-4c47-b74c-ba9210dc2f62"
Publisher="CN=Sakura"
Version="1.0.5.0" />
Version="1.0.6.0" />

<mp:PhoneIdentity PhoneProductId="129fe03a-4520-4c47-b74c-ba9210dc2f62" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

Expand All @@ -37,8 +37,8 @@
Executable="$targetnametoken$.exe"
EntryPoint="$targetentrypoint$">
<uap:VisualElements
DisplayName="ms-resource:AppDisplayName"
Description="ms-resource:AppDescription"
DisplayName="Saku Overclock"
Description="An awesome utility to overclock Ryzen mobile laptops"
BackgroundColor="transparent"
Square150x150Logo="Assets\Square150x150Logo.png"
Square44x44Logo="Assets\Square44x44Logo.png">
Expand Down
5 changes: 5 additions & 0 deletions Saku Overclock/Saku Overclock.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<EnableMsixTooling>true</EnableMsixTooling>
<AssemblyVersion></AssemblyVersion>
<FileVersion></FileVersion>
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
<Version></Version>
<Title>org.sakuoverclock.app</Title>
<SignAssembly>False</SignAssembly>
Expand Down Expand Up @@ -80,6 +81,7 @@
<PackageReference Include="Microsoft.Xaml.Behaviors.WinUI.Managed" Version="2.0.9" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="OpenHardwareMonitor" Version="0.9.6" />
<PackageReference Include="System.Management" Version="8.0.0" />
<PackageReference Include="TaskScheduler" Version="2.10.1" />
<PackageReference Include="WinUIEx" Version="2.3.2" />
</ItemGroup>
Expand Down Expand Up @@ -742,6 +744,9 @@
<None Update="ryzenadj.exe">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="ryzenps.exe">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="temp.ps1">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Expand Down
5 changes: 5 additions & 0 deletions Saku Overclock/Services/ThemeSelectorService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ public class ThemeSelectorService : IThemeSelectorService
private const string SettingsKey = "AppBackgroundRequestedTheme";

public ElementTheme Theme { get; set; } = ElementTheme.Default;
public ElementTheme Blue
{
get;
set;
}

private readonly ILocalSettingsService _localSettingsService;

Expand Down
Loading

0 comments on commit 1093632

Please sign in to comment.