修复BtnAddTempDiff_Click方法中缺少AddTempDiffRow参数的问题
This commit is contained in:
@@ -532,8 +532,10 @@ namespace JoyD.Windows.CS
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// 添加新的温差图例
|
// 添加新的温差图例,提供默认值和颜色
|
||||||
AddTempDiffRow();
|
int defaultTemp = tempDiffData.Count > 0 ? tempDiffData.Count * 10 : 10;
|
||||||
|
Color defaultColor = GetNextDefaultColor(tempDiffData.Count);
|
||||||
|
AddTempDiffRow($"{defaultTemp}°C", defaultColor);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -541,6 +543,13 @@ namespace JoyD.Windows.CS
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取下一个默认颜色
|
||||||
|
private Color GetNextDefaultColor(int index)
|
||||||
|
{
|
||||||
|
Color[] colors = { Color.Blue, Color.Green, Color.Red, Color.Yellow, Color.Purple, Color.Orange, Color.Pink, Color.Cyan };
|
||||||
|
return colors[index % colors.Length];
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 删除温差图例按钮点击事件
|
/// 删除温差图例按钮点击事件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user