diff --git a/app/Fans.cs b/app/Fans.cs index ebb70a52..60dddfdc 100644 --- a/app/Fans.cs +++ b/app/Fans.cs @@ -390,56 +390,62 @@ namespace GHelper { if (sender is null) return; - Chart chart = (Chart)sender; - if (e.Button.HasFlag(MouseButtons.Left)) + ChartArea ca = chart.ChartAreas[0]; + Axis ax = ca.AxisX; + Axis ay = ca.AxisY; + + HitTestResult hit = chart.HitTest(e.X, e.Y); + if (hit.Series is not null && hit.PointIndex >= 0) + curPoint = hit.Series.Points[hit.PointIndex]; + else + curPoint = null; + + + if (curPoint != null) { - ChartArea ca = chart.ChartAreas[0]; - Axis ax = ca.AxisX; - Axis ay = ca.AxisY; - HitTestResult hit = chart.HitTest(e.X, e.Y); - if (hit.Series is not null && hit.PointIndex >= 0) - curPoint = hit.Series.Points[hit.PointIndex]; + Series s = hit.Series; + double dx, dy, dymin; - - if (curPoint != null) + try { + dx = ax.PixelPositionToValue(e.X); + dy = ay.PixelPositionToValue(e.Y); - Series s = hit.Series; - double dx, dy, dymin; + if (dx < 20) dx = 20; + if (dx > 100) dx = 100; - try + if (dy < 0) dy = 0; + if (dy > 100) dy = 100; + + dymin = (dx - 65) * 1.2; + + if (dy < dymin) dy = dymin; + + if (e.Button.HasFlag(MouseButtons.Left)) { - dx = ax.PixelPositionToValue(e.X); - dy = ay.PixelPositionToValue(e.Y); - - if (dx < 20) dx = 20; - if (dx > 100) dx = 100; - - if (dy < 0) dy = 0; - if (dy > 100) dy = 100; - - dymin = (dx - 65) * 1.2; - - if (dy < dymin) dy = dymin; - curPoint.XValue = dx; curPoint.YValues[0] = dy; - - labelTip.Visible = true; - labelTip.Text = Math.Round(dx) + "C, " + ChartPercToRPM((int)dy, " " + Properties.Strings.RPM); - labelTip.Top = e.Y + ((Control)sender).Top; - labelTip.Left = e.X; - - } - catch - { - Debug.WriteLine(e.Y); } + + labelTip.Visible = true; + labelTip.Text = Math.Round(curPoint.XValue) + "C, " + ChartPercToRPM((int)curPoint.YValues[0], " " + Properties.Strings.RPM); + labelTip.Top = e.Y + ((Control)sender).Top; + labelTip.Left = e.X; } + catch + { + Debug.WriteLine(e.Y); + labelTip.Visible = false; + } + + } else + { + labelTip.Visible = false; } + } } diff --git a/app/Program.cs b/app/Program.cs index bcdb83f6..069c5eb3 100644 --- a/app/Program.cs +++ b/app/Program.cs @@ -31,10 +31,7 @@ namespace GHelper public static void Main() { - if (CultureInfo.CurrentUICulture.ToString().Contains("zh-")) - Thread.CurrentThread.CurrentUICulture = CultureInfo.CreateSpecificCulture("zh"); - else - Thread.CurrentThread.CurrentUICulture = CultureInfo.CurrentUICulture; + Thread.CurrentThread.CurrentUICulture = CultureInfo.CurrentUICulture; Debug.WriteLine(CultureInfo.CurrentUICulture); diff --git a/app/Properties/Strings.zh-TW.resx b/app/Properties/Strings.zh-TW.resx new file mode 100644 index 00000000..6d6e09a1 --- /dev/null +++ b/app/Properties/Strings.zh-TW.resx @@ -0,0 +1,408 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 無法連結到華碩 ACPI。 没有它,應用程式將無法執行。 嘗試安裝Asus System Control Interface + + + 看起来 GPU 正在大量使用,是否禁用它? + + + 節能模式 + + + 關閉獨顯需要重新啟動 + + + 獨顯直連需要重啟 + + + 現在重新啟動嗎? + + + 動畫速度 + + + AnimeMatrix + + + 程式已正在執行 + + + G-Helper已經在執行。 請確認右下工作列中的圖示。 + + + 套用自定義風扇曲線 + + + 套用功率限制 + + + 呼吸 + + + 循環 + + + 快速 + + + 正常 + + + 彩虹 + + + + + + 靜態 + + + 閃爍 + + + 自動 + + + 電池模式時自動60Hz + + + 喚醒時 + + + 平衡模式 + + + 電池充電上限 + + + 開機時 + + + 顏色 + + + CPU 加速 + + + 自定義設置 + + + 預設 + + + 禁用螢幕加速OD + + + 正在釋放電力 + + + 下載更新 + + + 禁用獨顯以節省電池電量 + + + 節能模式 + + + 更多 + + + 更多設定 + + + 恢復原廠設定 + + + 風扇曲線 + + + CPU 風扇設置文件 + + + GPU 風扇設置文件 + + + 中等風扇設置 + + + 風扇設置 + + + 風扇和電源 + + + 自定義設置 + + + 切換中... + + + GPU 模式 + + + 僅限內顯 + + + 內顯 + 獨顯 + + + 獨立顯卡 + + + 按鍵綁定 + + + 鍵盤 + + + 電池模式時自動降低鍵盤背光亮度以省電 + + + 鍵盤背光 + + + 鍵盤背光: + + + 螢幕顯示 + + + 横幅 + + + 明亮 + + + 時鐘 + + + 黯淡 + + + ROG logo + + + + + + 關閉 + + + 圖片 + + + 更高的更新率和更低延遲 + + + 維持60Hz以節省電量 + + + 多區域 + + + 打開G-Helper視窗 + + + 自動模式 + + + 使用電池切換到節能模式,插入電源時切換到標準模式 + + + 其他 + + + OD + + + 性能模式: + + + 圖片/動圖 + + + 播放/暫停 + + + 功率限制 (PPT) + + + 功率限制 (PPT) 是實驗性功能。 謹慎使用,風險自負! + + + 截圖 + + + 退出 + + + 每分鐘轉數 + + + 開機自動開啟 + + + 關機時 + + + 安静模式 + + + 睡眠時 + + + 標準模式會啟用獨顯 + + + 標準模式 + + + 啟動錯誤 + + + 切換光環 + + + 極速模式 + + + 已關閉 + + + 電池模式時關閉 + + + 開啟獨顯直連獲得最佳幀數 + + + 獨顯直連 + + + 版本 + + + 靜音 + + + 視窗置頂 + + diff --git a/app/Settings.cs b/app/Settings.cs index 8db9c591..bf7b7f1d 100644 --- a/app/Settings.cs +++ b/app/Settings.cs @@ -1014,16 +1014,16 @@ namespace GHelper AutoFans(); AutoPower(1000); - if (Program.config.getConfigPerf("auto_boost") != -1) - { - NativeMethods.SetCPUBoost(Program.config.getConfigPerf("auto_boost")); - } - if (Program.config.getConfigPerfString("scheme") is not null) NativeMethods.SetPowerScheme(Program.config.getConfigPerfString("scheme")); else NativeMethods.SetPowerScheme(PerformanceMode); + if (Program.config.getConfigPerf("auto_boost") != -1) + { + NativeMethods.SetCPUBoost(Program.config.getConfigPerf("auto_boost")); + } + if (NativeMethods.PowerGetEffectiveOverlayScheme(out Guid activeScheme) == 0) { Debug.WriteLine("Effective :" + activeScheme);