Skip to content

Commit

Permalink
Merge branch 'seerge:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
HamzaYslmn authored Apr 12, 2023
2 parents dfa4fe8 + 552bc10 commit 7833623
Show file tree
Hide file tree
Showing 5 changed files with 454 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

## NOTE
Bug reports without clear information or scenario to reproduce will be closed without answer.
Bug reports without clear information or scenario to reproduce and logs from ``%AppData%\GHelper`` will be closed without answer.
Please respect time of the developer. Thanks.


Expand Down
72 changes: 39 additions & 33 deletions app/Fans.cs
Original file line number Diff line number Diff line change
Expand Up @@ -390,56 +390,62 @@ private void ChartCPU_MouseMove(object? sender, MouseEventArgs e)
{

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;
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];
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)
{
if (curPoint != null)
{

Series s = hit.Series;
double dx, dy, dymin;
Series s = hit.Series;
double dx, dy, dymin;

try
{
dx = ax.PixelPositionToValue(e.X);
dy = ay.PixelPositionToValue(e.Y);
try
{
dx = ax.PixelPositionToValue(e.X);
dy = ay.PixelPositionToValue(e.Y);

if (dx < 20) dx = 20;
if (dx > 100) dx = 100;
if (dx < 20) dx = 20;
if (dx > 100) dx = 100;

if (dy < 0) dy = 0;
if (dy > 100) dy = 100;
if (dy < 0) dy = 0;
if (dy > 100) dy = 100;

dymin = (dx - 65) * 1.2;
dymin = (dx - 65) * 1.2;

if (dy < dymin) dy = dymin;
if (dy < dymin) dy = dymin;

if (e.Button.HasFlag(MouseButtons.Left))
{
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;
}

}
}

Expand Down
5 changes: 1 addition & 4 deletions app/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@ static class Program
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);

Expand Down
Loading

0 comments on commit 7833623

Please sign in to comment.