liuwf 3 months ago
parent 1e3b60b32d
commit b6ca315cc7

@ -2,7 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:SlnMesnac.WPF" xmlns:local="clr-namespace:SlnMesnac.WPF"
StartupUri="MainWindow.xaml"> StartupUri="MainWindow.xaml" DispatcherUnhandledException="Application_DispatcherUnhandledException">
<Application.Resources> <Application.Resources>
<ResourceDictionary> <ResourceDictionary>

@ -63,6 +63,14 @@ namespace SlnMesnac.WPF
} }
private void Application_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
{
//记录日志
Console.WriteLine(e.Exception.Message);
}
/// <summary> /// <summary>

@ -263,10 +263,10 @@
<TextBlock Text="烘干机报警:" FontSize="20" VerticalAlignment="Center" Width="170" Margin="0,0,20,0" Foreground="White"/> <TextBlock Text="烘干机报警:" FontSize="20" VerticalAlignment="Center" Width="170" Margin="0,0,20,0" Foreground="White"/>
<TextBlock x:Name="HotSignal7_2_Value" Text="无" FontSize="20" VerticalAlignment="Center" Margin="0,0,20,0" Foreground="White"/> <TextBlock x:Name="HotSignal7_2_Value" Text="无" FontSize="20" VerticalAlignment="Center" Margin="0,0,20,0" Foreground="White"/>
</StackPanel> </StackPanel>
<StackPanel Grid.Row="7" Grid.Column="0" Orientation="Horizontal" HorizontalAlignment="Left" Margin="50 0 0 0"> <!--<StackPanel Grid.Row="7" Grid.Column="0" Orientation="Horizontal" HorizontalAlignment="Left" Margin="50 0 0 0">
<TextBox x:Name="HotSpiralSpeedTxt" Width="70" Height="35" FontSize="20" VerticalAlignment="Center" Margin="30,0,10,0" Foreground="White"/> <TextBox x:Name="HotSpiralSpeedTxt" Width="70" Height="35" FontSize="20" VerticalAlignment="Center" Margin="30,0,10,0" Foreground="White"/>
<Button x:Name="HotSpiralSpeedSet" Content="烘干机螺旋频率设定" FontSize="20" Width="200" Height="40" VerticalAlignment="Center" Margin="0,0,20,0" Background="DeepSkyBlue" Click="HotSpiralSpeedSet_Click" /> <Button x:Name="HotSpiralSpeedSet" Content="烘干机螺旋频率设定" FontSize="20" Width="200" Height="40" VerticalAlignment="Center" Margin="0,0,20,0" Background="DeepSkyBlue" Click="HotSpiralSpeedSet_Click" />
</StackPanel> </StackPanel>-->
<!--<StackPanel Grid.Row="7" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Left" Margin="50 0 0 0"> <!--<StackPanel Grid.Row="7" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Left" Margin="50 0 0 0">
<TextBox x:Name="HotTempTxt" Width="70" Height="35" FontSize="20" VerticalAlignment="Center" Margin="30,0,10,0" Foreground="White"/> <TextBox x:Name="HotTempTxt" Width="70" Height="35" FontSize="20" VerticalAlignment="Center" Margin="30,0,10,0" Foreground="White"/>
<Button x:Name="HotTempSet" Content="烘干机温度设定" FontSize="20" Width="150" Height="40" VerticalAlignment="Center" Margin="0,0,20,0" Background="DeepSkyBlue" Click="HotTempSet_Click" /> <Button x:Name="HotTempSet" Content="烘干机温度设定" FontSize="20" Width="150" Height="40" VerticalAlignment="Center" Margin="0,0,20,0" Background="DeepSkyBlue" Click="HotTempSet_Click" />
@ -274,6 +274,8 @@
</Grid> </Grid>
<StackPanel Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Top" Orientation="Horizontal" > <StackPanel Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Top" Orientation="Horizontal" >
<TextBox x:Name="HotSpiralSpeedTxt" Width="70" Height="35" FontSize="20" VerticalAlignment="Center" Margin="30,0,10,0" Foreground="White"/>
<Button x:Name="HotSpiralSpeedSet" Content="螺旋频率设定" FontSize="20" Width="150" Height="40" VerticalAlignment="Center" Margin="0,0,20,0" Background="DeepSkyBlue" Click="HotSpiralSpeedSet_Click" />
<Button x:Name="StartDryerSpiralButton" Content="螺旋启动" FontSize="20" Background="LimeGreen" Width="120" Height="40" Margin="0 0 20 0" Click="StartDryerSpiralButton_Click"/> <Button x:Name="StartDryerSpiralButton" Content="螺旋启动" FontSize="20" Background="LimeGreen" Width="120" Height="40" Margin="0 0 20 0" Click="StartDryerSpiralButton_Click"/>
<Button x:Name="StartDryerFanButton" Content="风机启动" FontSize="20" Background="LimeGreen" Width="90" Height="40" Margin="0 0 20 0" Click="StartDryerFanButton_Click"/> <Button x:Name="StartDryerFanButton" Content="风机启动" FontSize="20" Background="LimeGreen" Width="90" Height="40" Margin="0 0 20 0" Click="StartDryerFanButton_Click"/>
<Button x:Name="StartDryerHotButton" Content="燃烧启动" FontSize="20" Background="LimeGreen" Width="90" Height="40" Margin="0 0 20 0" Click="StartDryerHotButton_Click"/> <Button x:Name="StartDryerHotButton" Content="燃烧启动" FontSize="20" Background="LimeGreen" Width="90" Height="40" Margin="0 0 20 0" Click="StartDryerHotButton_Click"/>

@ -125,6 +125,9 @@ namespace SlnMesnac.WPF.Page
/// <param name="sender"></param> /// <param name="sender"></param>
/// <param name="e"></param> /// <param name="e"></param>
private void StartButton_Click(object sender, RoutedEventArgs e) private void StartButton_Click(object sender, RoutedEventArgs e)
{
var result = MessageBox.Show("是否确认启动?", "确认", MessageBoxButton.YesNo, MessageBoxImage.Information);
if (result == MessageBoxResult.Yes)
{ {
try try
{ {
@ -197,6 +200,8 @@ namespace SlnMesnac.WPF.Page
} }
} }
}
/// <summary> /// <summary>
/// 一键停止 /// 一键停止
@ -204,6 +209,9 @@ namespace SlnMesnac.WPF.Page
/// <param name="sender"></param> /// <param name="sender"></param>
/// <param name="e"></param> /// <param name="e"></param>
private void StopButton_Click(object sender, RoutedEventArgs e) private void StopButton_Click(object sender, RoutedEventArgs e)
{
var result = MessageBox.Show("是否确认停止?", "确认", MessageBoxButton.YesNo, MessageBoxImage.Warning);
if (result == MessageBoxResult.Yes)
{ {
try try
{ {
@ -247,6 +255,7 @@ namespace SlnMesnac.WPF.Page
_logger.LogError($"一键停止:{ex.Message}"); _logger.LogError($"一键停止:{ex.Message}");
} }
} }
}
/// <summary> /// <summary>
/// 急停 /// 急停
@ -254,6 +263,9 @@ namespace SlnMesnac.WPF.Page
/// <param name="sender"></param> /// <param name="sender"></param>
/// <param name="e"></param> /// <param name="e"></param>
private void StopUrgentButton_Click(object sender, RoutedEventArgs e) private void StopUrgentButton_Click(object sender, RoutedEventArgs e)
{
var result = MessageBox.Show("是否确认急停?", "确认", MessageBoxButton.YesNo, MessageBoxImage.Warning);
if (result == MessageBoxResult.Yes)
{ {
try try
{ {
@ -277,6 +289,7 @@ namespace SlnMesnac.WPF.Page
_logger.LogError($"拆包机远程急停:{ex.Message}"); _logger.LogError($"拆包机远程急停:{ex.Message}");
} }
} }
}
#region 拆包机 #region 拆包机
/// <summary> /// <summary>

@ -47,4 +47,8 @@
<Resource Include="Templates\image\background.jpg" /> <Resource Include="Templates\image\background.jpg" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="Page\Window\" />
</ItemGroup>
</Project> </Project>

Loading…
Cancel
Save