Browse Source

报警消音相关逻辑

master
sc 3 months ago
parent
commit
bf39e85925
  1. 2
      ViewModel/MainWindowViewModel.cs
  2. 4
      Windows/Sampling.xaml
  3. 10
      Windows/Sampling.xaml.cs
  4. 4
      Windows/UserCall.xaml.cs

2
ViewModel/MainWindowViewModel.cs

@ -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) //启动模块
{

4
Windows/Sampling.xaml

@ -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"

10
Windows/Sampling.xaml.cs

@ -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
Windows/UserCall.xaml.cs

@ -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;
}
}

Loading…
Cancel
Save