添加MCF状态显示

This commit is contained in:
hanqiangqiang 2026-05-13 16:59:12 +08:00
parent dd1b96ddc3
commit 7a79ee8dff
2 changed files with 27 additions and 0 deletions

View File

@ -39,6 +39,13 @@
FontSize="10"
Foreground="LightYellow"
Text="0.0" />
<Ellipse
Name="EllipseState"
Width="5"
Height="5"
Margin="0,-7,4,0"
HorizontalAlignment="Right"
Fill="Green" />
</Grid>
<Grid Height="18" Margin="1,14,1,1">
<Rectangle

View File

@ -194,6 +194,26 @@ namespace SicUI.Controls
labelValue.Foreground = DeviceData.IsError ? Brushes.Red : Brushes.LightYellow;
rectSetPoint.StrokeThickness = (DeviceData.IsWarning | DeviceData.IsError) ? 2 : 1;
switch (DeviceData.SetMode) //Normal = 0,Close = 1,Open = 2,Hold = 3
{
case 0:
EllipseState.Fill = Brushes.Green;
break;
case 1:
EllipseState.Fill = Brushes.LightGray;
break;
case 2:
EllipseState.Fill = Brushes.LawnGreen;
break;
case 3:
EllipseState.Fill = Brushes.DodgerBlue;
break;
default:
EllipseState.Fill = Brushes.Green;
break;
}
#endregion
}
}