diff --git a/app/AnimeMatrix/AniMatrixControl.cs b/app/AnimeMatrix/AniMatrixControl.cs index c9402a82..7c826411 100644 --- a/app/AnimeMatrix/AniMatrixControl.cs +++ b/app/AnimeMatrix/AniMatrixControl.cs @@ -88,6 +88,7 @@ namespace GHelper.AnimeMatrix { deviceSlash.Init(); deviceSlash.SetOptions(false, 0, 0); + deviceSlash.SetSleepActive(false); } else { @@ -98,12 +99,11 @@ namespace GHelper.AnimeMatrix } deviceSlash.Init(); - + switch ((SlashMode)running) { case SlashMode.Static: - deviceSlash.SetStatic(); - deviceSlash.Save(); + deviceSlash.SetStatic(brightness); break; default: deviceSlash.SetMode((SlashMode)running); @@ -111,6 +111,8 @@ namespace GHelper.AnimeMatrix deviceSlash.Save(); break; } + + deviceSlash.SetSleepActive(true); } }); } @@ -118,7 +120,11 @@ namespace GHelper.AnimeMatrix public void SetLidMode(bool force = false) { bool matrixLid = AppConfig.Is("matrix_lid"); - if (deviceSlash is not null) deviceSlash.SetLidMode(matrixLid); + + if (deviceSlash is not null) + { + deviceSlash.SetLidMode(matrixLid); + } if (matrixLid || force) { diff --git a/app/AnimeMatrix/SlashDevice.cs b/app/AnimeMatrix/SlashDevice.cs index 4cc9bf1a..f2027260 100644 --- a/app/AnimeMatrix/SlashDevice.cs +++ b/app/AnimeMatrix/SlashDevice.cs @@ -117,10 +117,15 @@ namespace GHelper.AnimeMatrix Set(Packet(0xD3, 0x04, 0x00, 0x0C, 0x01, modeByte, 0x02, 0x19, 0x03, 0x13, 0x04, 0x11, 0x05, 0x12, 0x06, 0x13), "SlashMode"); } - public void SetStatic() + public void SetStatic(int brightness = 0) { - Set(Packet(0xD3, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), "StaticWhite"); - Set(Packet(0xD3, 0x00, 0x00, 0x01, 0xAC), "Static"); + byte brightnessByte = (byte)(brightness * 85.333); + + Set(Packet(0xD2, 0x02, 0x01, 0x08, 0xAC), "Static"); + Set(Packet(0xD3, 0x03, 0x01, 0x08, 0xAC, 0xFF, 0xFF, 0x01, 0x05, 0xFF, 0xFF), "StaticSettings"); + Set(Packet(0xD4, 0x00, 0x00, 0x01, 0xAC), "StaticSave"); + + Set(Packet(0xD3, 0x00, 0x00, 0x07, brightnessByte, brightnessByte, brightnessByte, brightnessByte, brightnessByte, brightnessByte, brightnessByte), "Static White"); } public void SetOptions(bool status, int brightness = 0, int interval = 0) @@ -132,12 +137,18 @@ namespace GHelper.AnimeMatrix public void SetBatterySaver(bool status) { - Set(Packet(0xD8, 0x01, 0x00, 0x01, status ? (byte)0x80 : (byte)0x00), "SlashBatterySaver"); + Set(Packet(0xD8, 0x01, 0x00, 0x01, status ? (byte)0x80 : (byte)0x00), $"SlashBatterySaver {status}"); } public void SetLidMode(bool status) { - Set(Packet(0xD8, 0x00, 0x00, 0x02, 0xA5, status ? (byte)0x80 : (byte)0x00)); + Set(Packet(0xD8, 0x00, 0x00, 0x02, 0xA5, status ? (byte)0x80 : (byte)0x00), $"DisableLidClose {status}"); + } + + public void SetSleepActive(bool status) + { + Set(Packet(0xD2, 0x02, 0x01, 0x08, 0xA1), "SleepInit"); + Set(Packet(0xD3, 0x03, 0x01, 0x08, 0xA1, 0x00, 0xFF, status ? (byte)0x01 : (byte)0x00, 0x02, 0xFF, 0xFF), $"Sleep {status}"); } public void Set(Packet packet, string? log = null) diff --git a/app/AppConfig.cs b/app/AppConfig.cs index 03af8cf4..f785ceed 100644 --- a/app/AppConfig.cs +++ b/app/AppConfig.cs @@ -411,7 +411,7 @@ public static class AppConfig public static bool IsOLED() { - return ContainsModel("OLED") || IsSlash() || ContainsModel("M7600") || ContainsModel("UX64") || ContainsModel("UX34") || ContainsModel("UX53") || ContainsModel("K360") || ContainsModel("X150") || ContainsModel("M350") || ContainsModel("K650") || ContainsModel("UM53") || ContainsModel("K660") || ContainsModel("UX84") || ContainsModel("M650") || ContainsModel("K340") || ContainsModel("K350") || ContainsModel("M140"); + return ContainsModel("OLED") || IsSlash() || ContainsModel("M7600") || ContainsModel("UX64") || ContainsModel("UX34") || ContainsModel("UX53") || ContainsModel("K360") || ContainsModel("X150") || ContainsModel("M350") || ContainsModel("K650") || ContainsModel("UM53") || ContainsModel("K660") || ContainsModel("UX84") || ContainsModel("M650") || ContainsModel("K340") || ContainsModel("K350") || ContainsModel("M140") || ContainsModel("UM340"); } public static bool IsNoOverdrive() diff --git a/app/AsusMouseSettings.cs b/app/AsusMouseSettings.cs index c1803c88..220270f8 100644 --- a/app/AsusMouseSettings.cs +++ b/app/AsusMouseSettings.cs @@ -866,14 +866,23 @@ namespace GHelper private void VisualizeCurrentDPIProfile() { - if (mouse.DpiProfile > mouse.DpiSettings.Count()) + if (mouse.DpiProfile > mouse.DpiSettings.Length) { Logger.WriteLine($"Wrong mouse DPI: {mouse.DpiProfile}"); return; } - AsusMouseDPI dpi = mouse.DpiSettings[mouse.DpiProfile - 1]; - + AsusMouseDPI dpi; + + try + { + dpi = mouse.DpiSettings[mouse.DpiProfile - 1]; + } catch (Exception ex) + { + Logger.WriteLine($"Wrong mouse DPI: {mouse.DpiProfile} {mouse.DpiSettings.Length} {ex.Message}"); + return; + } + if (dpi is null) { return; diff --git a/app/Display/VisualControl.cs b/app/Display/VisualControl.cs index a6f7b955..93947297 100644 --- a/app/Display/VisualControl.cs +++ b/app/Display/VisualControl.cs @@ -66,6 +66,11 @@ namespace GHelper.Display return Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\ASUS\\ASUS System Control Interface\\ASUSOptimization\\Splendid"; } + public static SplendidGamut GetDefaultGamut() + { + return AppConfig.IsVivoZenbook() ? SplendidGamut.VivoNative : SplendidGamut.Native; + } + public static Dictionary GetGamutModes() { @@ -104,6 +109,11 @@ namespace GHelper.Display } + public static SplendidCommand GetDefaultVisualMode() + { + return AppConfig.IsVivoZenbook() ? SplendidCommand.VivoNormal : SplendidCommand.Default; + } + public static Dictionary GetVisualModes() { diff --git a/app/Fan/FanSensorControl.cs b/app/Fan/FanSensorControl.cs index 4dde6533..08b8cb09 100644 --- a/app/Fan/FanSensorControl.cs +++ b/app/Fan/FanSensorControl.cs @@ -58,6 +58,8 @@ namespace GHelper.Fan if (AppConfig.ContainsModel("FA507R")) return new int[3] { 63, 57, DEFAULT_FAN_MAX }; if (AppConfig.ContainsModel("FA507X")) return new int[3] { 63, 68, DEFAULT_FAN_MAX }; + if (AppConfig.ContainsModel("FX607J")) return new int[3] { 74, 72, DEFAULT_FAN_MAX }; + if (AppConfig.ContainsModel("GX650")) return new int[3] { 62, 62, DEFAULT_FAN_MAX }; if (AppConfig.ContainsModel("G732")) return new int[3] { 61, 60, DEFAULT_FAN_MAX }; diff --git a/app/Fans.cs b/app/Fans.cs index f6125ba2..97de0283 100644 --- a/app/Fans.cs +++ b/app/Fans.cs @@ -162,13 +162,14 @@ namespace GHelper trackGPUTemp.Scroll += trackGPUPower_Scroll; trackGPUPower.Scroll += trackGPUPower_Scroll; - trackGPUCore.MouseUp += TrackGPU_MouseUp; - trackGPUMemory.MouseUp += TrackGPU_MouseUp; + trackGPUCore.MouseUp += TrackGPUClocks_MouseUp; + trackGPUMemory.MouseUp += TrackGPUClocks_MouseUp; + trackGPUClockLimit.MouseUp += TrackGPUClocks_MouseUp; + trackGPUBoost.MouseUp += TrackGPU_MouseUp; trackGPUTemp.MouseUp += TrackGPU_MouseUp; trackGPUPower.MouseUp += TrackGPU_MouseUp; - trackGPUClockLimit.MouseUp += TrackGPU_MouseUp; //labelInfo.MaximumSize = new Size(280, 0); labelFansResult.Visible = false; @@ -526,13 +527,17 @@ namespace GHelper private void TrackGPU_MouseUp(object? sender, MouseEventArgs e) { modeControl.SetGPUPower(); + } + + private void TrackGPUClocks_MouseUp(object? sender, MouseEventArgs e) + { modeControl.SetGPUClocks(true); } private void InitGPUPower() { gpuPowerBase = Program.acpi.DeviceGet(AsusACPI.GPU_BASE); - Logger.WriteLine($"ReadGPUPowerBase: {gpuPowerBase}"); + if (gpuPowerBase >= 0) Logger.WriteLine($"ReadGPUPowerBase: {gpuPowerBase}"); panelGPUPower.Visible = isGPUPower; if (!isGPUPower) return; diff --git a/app/Helpers/RestrictedProcessHelper.cs b/app/Helpers/RestrictedProcessHelper.cs new file mode 100644 index 00000000..af45a2f2 --- /dev/null +++ b/app/Helpers/RestrictedProcessHelper.cs @@ -0,0 +1,376 @@ +using System.Diagnostics; +using System.Runtime.InteropServices; +using System.Text; + +public static class RestrictedProcessHelper +{ + /// Runs a process as a non-elevated version of the current user. + public static Process? RunAsRestrictedUser(string fileName, string? args = null) + { + if (string.IsNullOrWhiteSpace(fileName)) + throw new ArgumentException("Value cannot be null or whitespace.", nameof(fileName)); + + if (!GetRestrictedSessionUserToken(out var hRestrictedToken)) + { + return null; + } + + try + { + var si = new STARTUPINFO(); + si.cb = Marshal.SizeOf(si); + si.dwFlags = 0x1; + si.wShowWindow = 0x00; // Set the window to be hidden + + var pi = new PROCESS_INFORMATION(); + var cmd = new StringBuilder(); + cmd.Append('"').Append(fileName).Append('"'); + if (!string.IsNullOrWhiteSpace(args)) + { + cmd.Append(' ').Append(args); + } + + Logger.WriteLine($"Launching {cmd}"); + + if (!CreateProcessAsUser( + hRestrictedToken, + null, + cmd, + IntPtr.Zero, + IntPtr.Zero, + true, // inherit handle + 0, + IntPtr.Zero, + Path.GetDirectoryName(fileName), + ref si, + out pi)) + { + return null; + } + + return Process.GetProcessById(pi.dwProcessId); + } + finally + { + CloseHandle(hRestrictedToken); + } + } + + private static bool GetRestrictedSessionUserToken(out IntPtr token) + { + token = IntPtr.Zero; + if (!SaferCreateLevel(SaferScope.User, SaferLevel.NormalUser, SaferOpenFlags.Open, out var hLevel, IntPtr.Zero)) + { + return false; + } + + IntPtr hRestrictedToken = IntPtr.Zero; + TOKEN_MANDATORY_LABEL tml = default; + tml.Label.Sid = IntPtr.Zero; + IntPtr tmlPtr = IntPtr.Zero; + + try + { + if (!SaferComputeTokenFromLevel(hLevel, IntPtr.Zero, out hRestrictedToken, 0, IntPtr.Zero)) + { + return false; + } + + // Set the token to medium integrity. + tml.Label.Attributes = SE_GROUP_INTEGRITY; + tml.Label.Sid = IntPtr.Zero; + if (!ConvertStringSidToSid("S-1-16-8192", out tml.Label.Sid)) + { + return false; + } + + tmlPtr = Marshal.AllocHGlobal(Marshal.SizeOf(tml)); + Marshal.StructureToPtr(tml, tmlPtr, false); + if (!SetTokenInformation(hRestrictedToken, + TOKEN_INFORMATION_CLASS.TokenIntegrityLevel, + tmlPtr, (uint)Marshal.SizeOf(tml))) + { + return false; + } + + token = hRestrictedToken; + hRestrictedToken = IntPtr.Zero; // make sure finally() doesn't close the handle + } + finally + { + SaferCloseLevel(hLevel); + SafeCloseHandle(hRestrictedToken); + if (tml.Label.Sid != IntPtr.Zero) + { + LocalFree(tml.Label.Sid); + } + if (tmlPtr != IntPtr.Zero) + { + Marshal.FreeHGlobal(tmlPtr); + } + } + + return true; + } + + [StructLayout(LayoutKind.Sequential)] + private struct PROCESS_INFORMATION + { + public IntPtr hProcess; + public IntPtr hThread; + public int dwProcessId; + public int dwThreadId; + } + + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] + private struct STARTUPINFO + { + public Int32 cb; + public string lpReserved; + public string lpDesktop; + public string lpTitle; + public Int32 dwX; + public Int32 dwY; + public Int32 dwXSize; + public Int32 dwYSize; + public Int32 dwXCountChars; + public Int32 dwYCountChars; + public Int32 dwFillAttribute; + public Int32 dwFlags; + public Int16 wShowWindow; + public Int16 cbReserved2; + public IntPtr lpReserved2; + public IntPtr hStdInput; + public IntPtr hStdOutput; + public IntPtr hStdError; + } + + [StructLayout(LayoutKind.Sequential)] + private struct SID_AND_ATTRIBUTES + { + public IntPtr Sid; + public uint Attributes; + } + + [StructLayout(LayoutKind.Sequential)] + private struct TOKEN_MANDATORY_LABEL + { + public SID_AND_ATTRIBUTES Label; + } + + public enum SaferLevel : uint + { + Disallowed = 0, + Untrusted = 0x1000, + Constrained = 0x10000, + NormalUser = 0x20000, + FullyTrusted = 0x40000 + } + + public enum SaferScope : uint + { + Machine = 1, + User = 2 + } + + [Flags] + public enum SaferOpenFlags : uint + { + Open = 1 + } + + [DllImport("advapi32", SetLastError = true, CallingConvention = CallingConvention.StdCall)] + private static extern bool SaferCreateLevel(SaferScope scope, SaferLevel level, SaferOpenFlags openFlags, out IntPtr pLevelHandle, IntPtr lpReserved); + + [DllImport("advapi32", SetLastError = true, CallingConvention = CallingConvention.StdCall)] + private static extern bool SaferComputeTokenFromLevel(IntPtr LevelHandle, IntPtr InAccessToken, out IntPtr OutAccessToken, int dwFlags, IntPtr lpReserved); + + [DllImport("advapi32", SetLastError = true)] + private static extern bool SaferCloseLevel(IntPtr hLevelHandle); + + [DllImport("advapi32.dll", SetLastError = true, CharSet = CharSet.Unicode)] + private static extern bool ConvertStringSidToSid(string StringSid, out IntPtr ptrSid); + + [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] + [return: MarshalAs(UnmanagedType.Bool)] + private static extern bool CloseHandle(IntPtr hObject); + + private static bool SafeCloseHandle(IntPtr hObject) + { + return (hObject == IntPtr.Zero) ? true : CloseHandle(hObject); + } + + [DllImport("kernel32.dll", SetLastError = true)] + static extern IntPtr LocalFree(IntPtr hMem); + + enum TOKEN_INFORMATION_CLASS + { + /// + /// The buffer receives a TOKEN_USER structure that contains the user account of the token. + /// + TokenUser = 1, + + /// + /// The buffer receives a TOKEN_GROUPS structure that contains the group accounts associated with the token. + /// + TokenGroups, + + /// + /// The buffer receives a TOKEN_PRIVILEGES structure that contains the privileges of the token. + /// + TokenPrivileges, + + /// + /// The buffer receives a TOKEN_OWNER structure that contains the default owner security identifier (SID) for newly created objects. + /// + TokenOwner, + + /// + /// The buffer receives a TOKEN_PRIMARY_GROUP structure that contains the default primary group SID for newly created objects. + /// + TokenPrimaryGroup, + + /// + /// The buffer receives a TOKEN_DEFAULT_DACL structure that contains the default DACL for newly created objects. + /// + TokenDefaultDacl, + + /// + /// The buffer receives a TOKEN_SOURCE structure that contains the source of the token. TOKEN_QUERY_SOURCE access is needed to retrieve this information. + /// + TokenSource, + + /// + /// The buffer receives a TOKEN_TYPE value that indicates whether the token is a primary or impersonation token. + /// + TokenType, + + /// + /// The buffer receives a SECURITY_IMPERSONATION_LEVEL value that indicates the impersonation level of the token. If the access token is not an impersonation token, the function fails. + /// + TokenImpersonationLevel, + + /// + /// The buffer receives a TOKEN_STATISTICS structure that contains various token statistics. + /// + TokenStatistics, + + /// + /// The buffer receives a TOKEN_GROUPS structure that contains the list of restricting SIDs in a restricted token. + /// + TokenRestrictedSids, + + /// + /// The buffer receives a DWORD value that indicates the Terminal Services session identifier that is associated with the token. + /// + TokenSessionId, + + /// + /// The buffer receives a TOKEN_GROUPS_AND_PRIVILEGES structure that contains the user SID, the group accounts, the restricted SIDs, and the authentication ID associated with the token. + /// + TokenGroupsAndPrivileges, + + /// + /// Reserved. + /// + TokenSessionReference, + + /// + /// The buffer receives a DWORD value that is nonzero if the token includes the SANDBOX_INERT flag. + /// + TokenSandBoxInert, + + /// + /// Reserved. + /// + TokenAuditPolicy, + + /// + /// The buffer receives a TOKEN_ORIGIN value. + /// + TokenOrigin, + + /// + /// The buffer receives a TOKEN_ELEVATION_TYPE value that specifies the elevation level of the token. + /// + TokenElevationType, + + /// + /// The buffer receives a TOKEN_LINKED_TOKEN structure that contains a handle to another token that is linked to this token. + /// + TokenLinkedToken, + + /// + /// The buffer receives a TOKEN_ELEVATION structure that specifies whether the token is elevated. + /// + TokenElevation, + + /// + /// The buffer receives a DWORD value that is nonzero if the token has ever been filtered. + /// + TokenHasRestrictions, + + /// + /// The buffer receives a TOKEN_ACCESS_INFORMATION structure that specifies security information contained in the token. + /// + TokenAccessInformation, + + /// + /// The buffer receives a DWORD value that is nonzero if virtualization is allowed for the token. + /// + TokenVirtualizationAllowed, + + /// + /// The buffer receives a DWORD value that is nonzero if virtualization is enabled for the token. + /// + TokenVirtualizationEnabled, + + /// + /// The buffer receives a TOKEN_MANDATORY_LABEL structure that specifies the token's integrity level. + /// + TokenIntegrityLevel, + + /// + /// The buffer receives a DWORD value that is nonzero if the token has the UIAccess flag set. + /// + TokenUIAccess, + + /// + /// The buffer receives a TOKEN_MANDATORY_POLICY structure that specifies the token's mandatory integrity policy. + /// + TokenMandatoryPolicy, + + /// + /// The buffer receives the token's logon security identifier (SID). + /// + TokenLogonSid, + + /// + /// The maximum value for this enumeration + /// + MaxTokenInfoClass + } + + [DllImport("advapi32.dll", SetLastError = true)] + static extern Boolean SetTokenInformation( + IntPtr TokenHandle, + TOKEN_INFORMATION_CLASS TokenInformationClass, + IntPtr TokenInformation, + UInt32 TokenInformationLength); + + const uint SE_GROUP_INTEGRITY = 0x00000020; + + [DllImport("advapi32.dll", SetLastError = true, CharSet = CharSet.Unicode)] + static extern bool CreateProcessAsUser( + IntPtr hToken, + string? lpApplicationName, + StringBuilder? lpCommandLine, + IntPtr lpProcessAttributes, + IntPtr lpThreadAttributes, + bool bInheritHandles, + uint dwCreationFlags, + IntPtr lpEnvironment, + string? lpCurrentDirectory, + ref STARTUPINFO lpStartupInfo, + out PROCESS_INFORMATION lpProcessInformation); +} \ No newline at end of file diff --git a/app/Input/InputDispatcher.cs b/app/Input/InputDispatcher.cs index a9003a95..b106aecd 100644 --- a/app/Input/InputDispatcher.cs +++ b/app/Input/InputDispatcher.cs @@ -941,33 +941,17 @@ namespace GHelper.Input static void LaunchProcess(string command = "") { - + if (string.IsNullOrEmpty(command)) return; try { - - //string executable = command.Split(' ')[0]; - //string arguments = command.Substring(executable.Length).Trim(); - ProcessStartInfo startInfo = new ProcessStartInfo("cmd", "/C " + command); - - startInfo.RedirectStandardOutput = true; - startInfo.RedirectStandardError = true; - startInfo.UseShellExecute = false; - startInfo.CreateNoWindow = true; - - startInfo.WorkingDirectory = Environment.CurrentDirectory; - //startInfo.Arguments = arguments; - Process proc = Process.Start(startInfo); + RestrictedProcessHelper.RunAsRestrictedUser(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "cmd.exe"), "/C " + command); } - catch + catch (Exception ex) { - Logger.WriteLine("Failed to run " + command); + Logger.WriteLine($"Failed to run: {command} {ex.Message}"); } - - } - - static void WatcherEventArrived(object sender, EventArrivedEventArgs e) { if (e.NewEvent is null) return; diff --git a/app/Properties/Resources.resx b/app/Properties/Resources.resx index 49e11148..d6f024b0 100644 --- a/app/Properties/Resources.resx +++ b/app/Properties/Resources.resx @@ -139,12 +139,6 @@ ..\Resources\icons8-bicycle-48 (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\standard.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\eco.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\icons8-mute-unmute-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -226,9 +220,6 @@ ..\Resources\icons8-hibernate-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\ultimate.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\icons8-keyboard-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -349,10 +340,19 @@ ..\Resources\dark-standard.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\eco.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\light-eco.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\light-standard.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\standard.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\ultimate.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/app/Properties/Strings.de.resx b/app/Properties/Strings.de.resx index b7046ace..c60bb0d5 100644 --- a/app/Properties/Strings.de.resx +++ b/app/Properties/Strings.de.resx @@ -507,7 +507,7 @@ Trotzdem fortfahren? Beleuchtung - Lock Screen + Bildschirm sperren Logo diff --git a/app/Properties/Strings.tr.resx b/app/Properties/Strings.tr.resx index 579521ef..7720c749 100644 --- a/app/Properties/Strings.tr.resx +++ b/app/Properties/Strings.tr.resx @@ -247,7 +247,7 @@ Pil tasarrufu için 60Hz kullanılır, şarja takıldığında eski haline gelir - Uyanırken + Uyanış Düşük @@ -298,10 +298,10 @@ BIOS ve Sürücü Güncellemeleri - Açılışta + Açılış - Önyükleme Sesi + Açılış sesi Parlaklık @@ -729,7 +729,7 @@ Yine de devam etmek istiyor musunuz? Aura'yı Kullan - Otomatik Clamshell Modunu Aç + Kapaklı modu otmatik değiştir Fn-Lock'u Aç diff --git a/app/Resources/dark-eco.ico b/app/Resources/dark-eco.ico index b0cedba8..b7498650 100644 Binary files a/app/Resources/dark-eco.ico and b/app/Resources/dark-eco.ico differ diff --git a/app/Resources/dark-standard.ico b/app/Resources/dark-standard.ico index f5249b9f..40c3c065 100644 Binary files a/app/Resources/dark-standard.ico and b/app/Resources/dark-standard.ico differ diff --git a/app/Resources/eco.ico b/app/Resources/eco.ico index 30e965da..ac28d58c 100644 Binary files a/app/Resources/eco.ico and b/app/Resources/eco.ico differ diff --git a/app/Resources/light-eco.ico b/app/Resources/light-eco.ico index d2a3ce34..55b3fc25 100644 Binary files a/app/Resources/light-eco.ico and b/app/Resources/light-eco.ico differ diff --git a/app/Resources/light-standard.ico b/app/Resources/light-standard.ico index 69e08630..f470c3a1 100644 Binary files a/app/Resources/light-standard.ico and b/app/Resources/light-standard.ico differ diff --git a/app/Resources/standard.ico b/app/Resources/standard.ico index 8f8018a8..ade19522 100644 Binary files a/app/Resources/standard.ico and b/app/Resources/standard.ico differ diff --git a/app/Resources/ultimate.ico b/app/Resources/ultimate.ico index 941dec72..7b583e8c 100644 Binary files a/app/Resources/ultimate.ico and b/app/Resources/ultimate.ico differ diff --git a/app/Settings.cs b/app/Settings.cs index cb425f35..2b4c5762 100644 --- a/app/Settings.cs +++ b/app/Settings.cs @@ -343,7 +343,7 @@ namespace GHelper panelGamma.Visible = true; tableVisual.Visible = true; - var visualValue = (SplendidCommand)AppConfig.Get("visual", (int)SplendidCommand.Default); + var visualValue = (SplendidCommand)AppConfig.Get("visual", (int)VisualControl.GetDefaultVisualMode()); var colorTempValue = AppConfig.Get("color_temp", VisualControl.DefaultColorTemp); comboVisual.DropDownStyle = ComboBoxStyle.DropDownList; @@ -372,7 +372,7 @@ namespace GHelper comboGamut.DataSource = new BindingSource(gamuts, null); comboGamut.DisplayMember = "Value"; comboGamut.ValueMember = "Key"; - comboGamut.SelectedValue = (SplendidGamut)AppConfig.Get("gamut", (int)SplendidGamut.Native); + comboGamut.SelectedValue = (SplendidGamut)AppConfig.Get("gamut", (int)VisualControl.GetDefaultGamut()); comboGamut.SelectedValueChanged += ComboGamut_SelectedValueChanged; comboGamut.Visible = true;