报警消音相关逻辑

This commit is contained in:
sc committed 2025-08-01 15:50:16 +08:00
commit bf39e85925
4 files changed
+14 -6

No files matched your search

+1 -1
View File
@@ -655,7 +655,7 @@ namespace DyeingComputer.ViewModel
public static double TEMP_tar = 0.5; //目标温度
private bool Alert_yellow = false; //警报黄灯
private bool Alert_red = false; //警报红灯
private bool Alert_bell = false; //警报铃声
public static bool Alert_bell = false; //警报铃声
static Dictionary<string, object> updata_RUN = new Dictionary<string, object>();//
public static void STEP_START(string ID, double P1, double P2, double P3, double P4, double P5) //启动模块
{
+2 -2
View File
@@ -11,14 +11,14 @@
mc:Ignorable="d"
Title="SUNLIGHT 800" Height="200" Width="400">
<Grid>
<Image x:Name="NOT" Height="100" Width="100" VerticalAlignment="Bottom" FlowDirection="LeftToRight"
<Image Height="100" Width="100" VerticalAlignment="Bottom" FlowDirection="LeftToRight"
HorizontalAlignment="Left" Margin="25,0,0,27" Source="/Lmage/StreamlineUltimateColorColorPaletteSample1.png"/>
<TextBox x:Name="TIME_" HorizontalAlignment="Right" Height="40" Margin="0,0,20,80"
TextWrapping="Wrap" VerticalAlignment="Bottom" Width="134" FontSize="30" IsReadOnly="True"
BorderBrush="{x:Null}" />
<TextBox HorizontalAlignment="Right" Height="40" Margin="0,0,150,80" Text="{x:Static lang:Resources.Sampling}"
TextWrapping="Wrap" VerticalAlignment="Bottom" Width="80" FontSize="25" IsReadOnly="True"
TextWrapping="Wrap" VerticalAlignment="Bottom" Width="80" FontSize="30" IsReadOnly="True"
Background="{x:Null}" Foreground="Black" BorderBrush="{x:Null}" />
<Button Content="{x:Static lang:Resources.ADD}" HorizontalAlignment="Right" Height="35" Margin="50,70,150,20"
+7 -3
View File
@@ -38,7 +38,6 @@ namespace DyeingComputer.Windows
}
private void Window_Loaded(object sender, RoutedEventArgs e)
{
NOT.Visibility = Visibility.Collapsed;
Confirm_.IsEnabled = false;
ADD_.IsEnabled = false;
timeSpan = new TimeSpan(0, 0, 0, CALL_time);
@@ -63,12 +62,17 @@ namespace DyeingComputer.Windows
private void Confirm_Click(object sender, RoutedEventArgs e)//确认
{
MainWindowViewModel.UserCall_OK = true;
MainWindowViewModel.STEP_TIME = 0;
MainWindowViewModel.Alert_bell = false;
this.Close(); //关闭窗口
}
private void ADD_Click(object sender, RoutedEventArgs e)//
{
MainWindowViewModel.STEP_TIME = 0;
MainWindowViewModel.Alert_bell = false;
this.Close(); //关闭窗口
}
}
+4
View File
@@ -62,12 +62,16 @@ namespace DyeingComputer.Windows
private void YES_Click(object sender, RoutedEventArgs e)//确认
{
MainWindowViewModel.UserCall_OK = true;
MainWindowViewModel.STEP_TIME = 0;
MainWindowViewModel.Alert_bell = false;
this.Close(); //关闭窗口
}
private void Muffling_Click(object sender, RoutedEventArgs e)//
{
NOT.Visibility = Visibility.Visible;
MainWindowViewModel.STEP_TIME = 0;
MainWindowViewModel.Alert_bell = false;
}
}