mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Fans tip fix
This commit is contained in:
21
app/Fans.cs
21
app/Fans.cs
@@ -396,17 +396,19 @@ namespace GHelper
|
|||||||
Axis ax = ca.AxisX;
|
Axis ax = ca.AxisX;
|
||||||
Axis ay = ca.AxisY;
|
Axis ay = ca.AxisY;
|
||||||
|
|
||||||
|
bool tip = false;
|
||||||
|
|
||||||
HitTestResult hit = chart.HitTest(e.X, e.Y);
|
HitTestResult hit = chart.HitTest(e.X, e.Y);
|
||||||
if (hit.Series is not null && hit.PointIndex >= 0)
|
if (hit.Series is not null && hit.PointIndex >= 0)
|
||||||
|
{
|
||||||
curPoint = hit.Series.Points[hit.PointIndex];
|
curPoint = hit.Series.Points[hit.PointIndex];
|
||||||
else
|
tip = true;
|
||||||
curPoint = null;
|
}
|
||||||
|
|
||||||
|
|
||||||
if (curPoint != null)
|
if (curPoint != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
Series s = hit.Series;
|
|
||||||
double dx, dy, dymin;
|
double dx, dy, dymin;
|
||||||
|
|
||||||
try
|
try
|
||||||
@@ -428,23 +430,24 @@ namespace GHelper
|
|||||||
{
|
{
|
||||||
curPoint.XValue = dx;
|
curPoint.XValue = dx;
|
||||||
curPoint.YValues[0] = dy;
|
curPoint.YValues[0] = dy;
|
||||||
|
tip = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
labelTip.Visible = true;
|
|
||||||
labelTip.Text = Math.Round(curPoint.XValue) + "C, " + ChartPercToRPM((int)curPoint.YValues[0], " " + Properties.Strings.RPM);
|
labelTip.Text = Math.Round(curPoint.XValue) + "C, " + ChartPercToRPM((int)curPoint.YValues[0], " " + Properties.Strings.RPM);
|
||||||
labelTip.Top = e.Y + ((Control)sender).Top;
|
labelTip.Top = e.Y + ((Control)sender).Top;
|
||||||
labelTip.Left = e.X;
|
labelTip.Left = e.X;
|
||||||
|
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
Debug.WriteLine(e.Y);
|
Debug.WriteLine(e.Y);
|
||||||
labelTip.Visible = false;
|
tip = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else
|
}
|
||||||
{
|
|
||||||
labelTip.Visible = false;
|
labelTip.Visible = tip;
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<PlatformTarget>x64</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
||||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||||
<AssemblyVersion>0.50</AssemblyVersion>
|
<AssemblyVersion>0.51</AssemblyVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
|
|||||||
Reference in New Issue
Block a user