change-修改按钮样式

dev
liuwf 1 month ago
parent 31ede07349
commit 79a68e0cca

@ -35,9 +35,8 @@
<StackPanel Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Right">
<TextBlock Grid.Column="0" Text="{Binding Date}" FontSize="20" Foreground="White" FontWeight="Bold" HorizontalAlignment="Right"/>
<TextBlock Grid.Column="0" Text="{Binding Time}" FontSize="20" Foreground="White" FontWeight="Bold" HorizontalAlignment="Right"/>
<TextBlock Grid.Column="0" Text="{Binding ModeName}" FontSize="20" Foreground="White" FontWeight="Bold" HorizontalAlignment="Right"/>
<TextBlock Grid.Column="0" Text="{Binding Date}" FontSize="25" Foreground="White" FontWeight="Bold" HorizontalAlignment="Right"/>
<TextBlock Grid.Column="0" Text="{Binding ModeName}" FontSize="25" Foreground="White" FontWeight="Bold" HorizontalAlignment="Right"/>
</StackPanel>
@ -69,22 +68,22 @@
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left" Orientation="Horizontal">
<Button Content="首 页" x:Name="Index" Command="{Binding ControlOnClickCommand}" CommandParameter="{Binding Name,ElementName=Index}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="40" Background="#009999" BorderBrush="#FF36B5C1" Margin="10,0,10,0"/>
<Button Content="设备监控" x:Name="DevMonitor" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=DevMonitor}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="40" Background="#0099FF" BorderBrush="#0099FF" Margin="0,0,10,0"/>
<Button Content="生产管理" Visibility="Collapsed" x:Name="ProdMgmt" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=ProdMgmt}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="40" Background="#0099FF" BorderBrush="#0099FF" Margin="0,0,10,0"/>
<Button Content="投料管理" x:Name="ManualDelivery" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=ManualDelivery}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="40" Background="#0099FF" BorderBrush="#0099FF" Margin="0,0,10,0"/>
<Button Content="首 页" x:Name="Index" Command="{Binding ControlOnClickCommand}" CommandParameter="{Binding Name,ElementName=Index}" Style="{StaticResource BUTTON_AGREE}" Height="40" Background="#009999" BorderBrush="#FF36B5C1" Margin="10,0,10,0"/>
<Button Content="设备监控" x:Name="DevMonitor" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=DevMonitor}" Style="{StaticResource BUTTON_AGREE}" Height="40" Background="#0099FF" BorderBrush="#0099FF" Margin="0,0,10,0"/>
<Button Content="生产管理" Visibility="Collapsed" x:Name="ProdMgmt" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=ProdMgmt}" Style="{StaticResource BUTTON_AGREE}" Height="40" Background="#0099FF" BorderBrush="#0099FF" Margin="0,0,10,0"/>
<Button Content="投料管理" x:Name="ManualDelivery" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=ManualDelivery}" Style="{StaticResource BUTTON_AGREE}" Height="40" Background="#0099FF" BorderBrush="#0099FF" Margin="0,0,10,0"/>
<Button Content="AGV监听" x:Name="AgvAndTaskPage" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=AgvAndTaskPage}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="40" Background="#0099FF" BorderBrush="#0099FF" Margin="0,0,10,0"/>
<Button Content="AGV监听" x:Name="AgvAndTaskPage" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=AgvAndTaskPage}" Style="{StaticResource BUTTON_AGREE}" Height="40" Background="#0099FF" BorderBrush="#0099FF" Margin="0,0,10,0"/>
<Button Content="生产统计" x:Name="ProdStatistics" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=ProdStatistics}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="40" Background="#0099FF" BorderBrush="#0099FF" Margin="0,0,10,0"/>
<Button Content="生产统计" x:Name="ProdStatistics" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=ProdStatistics}" Style="{StaticResource BUTTON_AGREE}" Height="40" Background="#0099FF" BorderBrush="#0099FF" Margin="0,0,10,0"/>
<Button Content="代码生成" Visibility="Collapsed" x:Name="Generate" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Generate}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="0,0,10,0"/>
<Button Content="参数配置" x:Name="ConfigInfo" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=ConfigInfo}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="40" Background="#009999" BorderBrush="#FF36B5C1" Margin="0,0,10,0"/>
<Button Content="代码生成" Visibility="Collapsed" x:Name="Generate" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Generate}" Style="{StaticResource BUTTON_AGREE}" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="0,0,10,0"/>
<Button Content="参数配置" x:Name="ConfigInfo" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=ConfigInfo}" Style="{StaticResource BUTTON_AGREE}" Height="40" Background="#009999" BorderBrush="#FF36B5C1" Margin="0,0,10,0"/>
<Button Content="配方管理" x:Name="RecipeManage" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=RecipeManage}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="40" Background="#009999" BorderBrush="#FF36B5C1" Margin="0,0,10,0"/>
<Button Content="配方管理" x:Name="RecipeManage" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=RecipeManage}" Style="{StaticResource BUTTON_AGREE}" Height="40" Background="#009999" BorderBrush="#FF36B5C1" Margin="0,0,10,0"/>
<Button Content="键 盘" Visibility="Collapsed" Command="{Binding OpenSystemKeyboardCommand}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="40" Background="#009999" BorderBrush="#FF36B5C1" Margin="0,0,10,0" />
<Button Content="最小化" x:Name="Minimized" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Minimized}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="40" Background="#FF9900" BorderBrush="#FF9900" Margin="0,0,10,0"/>
<Button Content="退 出" x:Name="Exit" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Exit}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="40" Background="#FF0033" BorderBrush="#FF0033" Margin="0,0,10,0"/>
<Button Content="最小化" x:Name="Minimized" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Minimized}" Style="{StaticResource BUTTON_AGREE}" Height="40" Background="#FF9900" BorderBrush="#FF9900" Margin="0,0,10,0"/>
<Button Content="退 出" x:Name="Exit" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Exit}" Style="{StaticResource BUTTON_AGREE}" Height="40" Background="#FF0033" BorderBrush="#FF0033" Margin="0,0,10,0"/>
</StackPanel>
<StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Right" Orientation="Horizontal">

@ -20,8 +20,8 @@
<StackPanel VerticalAlignment="Center" Orientation="Horizontal" >
<Ellipse x:Name="SystemStatusColor" VerticalAlignment="Center" Width="50" Height="50" Fill="Red"/>
<TextBlock x:Name="SystemStatusTxt" Text="系统停机中" FontSize="35" VerticalAlignment="Center" Width="180" Foreground="White" />
<Button x:Name="StartButton" Style="{StaticResource BUTTON_AGREE}" Content="一键启动" FontSize="30" Background="LimeGreen" Width="180" Height="60" Margin="0 0 20 0" Click="StartButton_Click"/>
<Button x:Name="StopButton" Style="{StaticResource BUTTON_AGREE}" Content="一键停止" FontSize="30" Background="OrangeRed" Width="180" Height="60" Margin="0,0,20,0" Click="StopButton_Click"/>
<Button x:Name="StartButton" Style="{StaticResource BUTTON_AGREE}" Content="一键启动" FontSize="30" Background="LimeGreen" Width="180" Height="45" Margin="0 0 20 0" Click="StartButton_Click"/>
<Button x:Name="StopButton" Style="{StaticResource BUTTON_AGREE}" Content="一键停止" FontSize="30" Background="OrangeRed" Width="180" Height="45" Margin="0,0,20,0" Click="StopButton_Click"/>
<TextBlock Text="缓存区重量:" FontSize="25" VerticalAlignment="Center" Width="140" Foreground="White" HorizontalAlignment="Left" Margin="150 0 10 0" />
<TextBlock x:Name="BufferWeightTxt" Text="0" Width="80" FontSize="25" VerticalAlignment="Center" Margin="0,0,20,0" Foreground="White"/>
@ -288,12 +288,12 @@
<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="Blue" 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="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="StopDryerSpiralButton" Content="螺旋停止" FontSize="20" Background="OrangeRed" Width="90" Height="40" Margin="0,0,20,0" Click="StopDryerSpiralButton_Click"/>
<Button x:Name="StopDryerHotButton" Content="燃烧停止" FontSize="20" Background="OrangeRed" Width="90" Height="40" Margin="0,0,20,0" Click="StopDryerHotButton_Click"/>
<Button x:Name="StopDryerFanButton" Content="风机停止" FontSize="20" Background="OrangeRed" Width="90" Height="40" Margin="0,0,0,0" Click="StopDryerFanButton_Click"/>
<Button x:Name="StartDryerSpiralButton" Style="{StaticResource BUTTON_AGREE}" Content="螺旋启动" FontSize="20" Background="LimeGreen" Width="120" Height="40" Margin="0 0 20 0" Click="StartDryerSpiralButton_Click"/>
<Button x:Name="StartDryerFanButton" Style="{StaticResource BUTTON_AGREE}" Content="风机启动" FontSize="20" Background="LimeGreen" Width="90" Height="40" Margin="0 0 20 0" Click="StartDryerFanButton_Click"/>
<Button x:Name="StartDryerHotButton" Style="{StaticResource BUTTON_AGREE}" Content="燃烧启动" FontSize="20" Background="LimeGreen" Width="90" Height="40" Margin="0 0 20 0" Click="StartDryerHotButton_Click"/>
<Button x:Name="StopDryerSpiralButton" Style="{StaticResource BUTTON_AGREE}" Content="螺旋停止" FontSize="20" Background="OrangeRed" Width="90" Height="40" Margin="0,0,20,0" Click="StopDryerSpiralButton_Click"/>
<Button x:Name="StopDryerHotButton" Style="{StaticResource BUTTON_AGREE}" Content="燃烧停止" FontSize="20" Background="OrangeRed" Width="90" Height="40" Margin="0,0,20,0" Click="StopDryerHotButton_Click"/>
<Button x:Name="StopDryerFanButton" Style="{StaticResource BUTTON_AGREE}" Content="风机停止" FontSize="20" Background="OrangeRed" Width="90" Height="40" Margin="0,0,0,0" Click="StopDryerFanButton_Click"/>
</StackPanel>
</Grid>
@ -337,8 +337,8 @@
</StackPanel>
</Grid>
<StackPanel Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Top" Orientation="Horizontal" >
<Button x:Name="StartMagNetButton" Content="磁选启动" FontSize="20" Background="LimeGreen" Width="150" Height="40" Margin="0 0 20 0" Click="StartMagNetButton_Click"/>
<Button x:Name="StopMagNetButton" Content="磁选停止" FontSize="20" Background="OrangeRed" Width="150" Height="40" Margin="0,0,0,0" Click="StopMagNetButton_Click"/>
<Button x:Name="StartMagNetButton" Style="{StaticResource BUTTON_AGREE}" Content="磁选启动" FontSize="20" Background="LimeGreen" Width="150" Height="40" Margin="0 0 20 0" Click="StartMagNetButton_Click"/>
<Button x:Name="StopMagNetButton" Style="{StaticResource BUTTON_AGREE}" Content="磁选停止" FontSize="20" Background="OrangeRed" Width="150" Height="40" Margin="0,0,0,0" Click="StopMagNetButton_Click"/>
</StackPanel>
@ -371,8 +371,8 @@
</StackPanel>-->
</Grid>
<StackPanel Grid.Row="5" HorizontalAlignment="Center" VerticalAlignment="Top" Orientation="Horizontal" >
<Button x:Name="StartDustButton" Content="除尘启动" FontSize="20" Background="LimeGreen" Width="150" Height="40" Margin="0 0 20 0" Click="StartDustButton_Click" />
<Button x:Name="StopDustButton" Content="除尘停止" FontSize="20" Background="OrangeRed" Width="150" Height="40" Margin="0,0,0,0" Click="StopDustButton_Click" />
<Button x:Name="StartDustButton" Style="{StaticResource BUTTON_AGREE}" Content="除尘启动" FontSize="20" Background="LimeGreen" Width="150" Height="40" Margin="0 0 20 0" Click="StartDustButton_Click" />
<Button x:Name="StopDustButton" Style="{StaticResource BUTTON_AGREE}" Content="除尘停止" FontSize="20" Background="OrangeRed" Width="150" Height="40" Margin="0,0,0,0" Click="StopDustButton_Click" />
</StackPanel>

@ -39,16 +39,7 @@ namespace SlnMesnac.WPF.ViewModel
private BaseBusiness? baseBusiness = null;
#region 参数定义
private string _time;
public string Time
{
get { return _time; }
set
{
_time = value;
RaisePropertyChanged(nameof(Time));
}
}
private string _Date;
public string Date
@ -172,9 +163,9 @@ namespace SlnMesnac.WPF.ViewModel
}
private void Timer_Tick(object sender, EventArgs e)
{
Date = DateTime.Now.ToString("yyyy年MM月dd日");
Time = DateTime.Now.ToString("HH:mm:ss");
ModeName = debugConfig.ProductMode == "1" ? "投料模式:手动" : "投料模式:自动";
Date = DateTime.Now.ToString("yyyy年MM月dd日:HH:mm:ss");
ModeName = debugConfig.ProductMode == "1" ? "投料模式 : 手动模式" : "投料模式 : 自动模式";
}
#region 监听外部设备状态:PLC、喷码机、RFID

Loading…
Cancel
Save