Files
FT479/WPFWCSDemo/Views/Settings/SystemView.xaml
2026-06-29 14:46:32 +08:00

122 lines
6.9 KiB
XML

<Page x:Class="WPFWCSDemo.Views.Settings.SystemView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:local="clr-namespace:WPFWCSDemo.Views.Settings"
mc:Ignorable="d"
d:DesignHeight="850" d:DesignWidth="1600"
Title="SystemView">
<Page.Resources>
<Style TargetType="Button" BasedOn="{StaticResource MaterialDesignRaisedButton}">
<Setter Property="MinHeight" Value="50"/>
<Setter Property="MinWidth" Value="240"/>
<Setter Property="VerticalAlignment" Value="Bottom"/>
<Setter Property="FontSize" Value="18"/>
<Setter Property="Margin" Value="0 10"/>
<Setter Property="BorderThickness" Value="0"/>
</Style>
<Style TargetType="CheckBox" BasedOn="{StaticResource MaterialDesignSecondaryCheckBox}">
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Bottom"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="Margin" Value="5"/>
<Setter Property="md:CheckBoxAssist.CheckBoxSize" Value="30"/>
</Style>
<Style x:Key="LineButton" TargetType="Button" BasedOn="{StaticResource MaterialDesignRaisedButton}">
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="MinHeight" Value="50"/>
<Setter Property="VerticalAlignment" Value="Bottom"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="Width" Value="240"/>
<Setter Property="Margin" Value="20 10 0 10"/>
<Setter Property="FontSize" Value="18"/>
<!--<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self},Path=Tag}" Value="true">
--><!--<Setter Property="Background" Value="#673AB7"/>--><!--
<Setter Property="Background" Value="YellowGreen"/>
</DataTrigger>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self},Path=Tag}" Value="false">
<Setter Property="Background" Value="Silver"/>
</DataTrigger>
</Style.Triggers>-->
</Style>
<Style x:Key="LineButtonTitle" TargetType="TextBlock" BasedOn="{StaticResource MaterialDesignBody1TextBlock}">
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Right"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="Visibility" Value="Hidden"/>
</Style>
</Page.Resources>
<Grid Margin="50 10 50 30">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBlock Text="系统维护操作" FontSize="20" Margin="0 10 0 10" Style="{StaticResource screenTitle}"/>
<!--便利性功能设置-->
<StackPanel Grid.Row="1" Orientation="Horizontal">
<Button Content="数据备份" Command="{Binding GetSqlDBBackupCommand}"/>
<CheckBox Content="备份时删除数据" IsChecked="{Binding IsTaskDataDelete}" Visibility="Hidden"/>
</StackPanel>
<StackPanel Grid.Row="2" Orientation="Horizontal">
<Button Content="删除历史数据" Command="{Binding DeleteDataOutOfTreeMouthsCommand}"/>
</StackPanel>
<StackPanel Grid.Row="3" Orientation="Horizontal" Visibility="Hidden">
<Button Content="历史报警记录备份" Command="{Binding AlarmBackupCommand}"/>
<CheckBox Content="备份时删除数据" IsChecked="{Binding IsAlarmDataDelete}"/>
</StackPanel>
<StackPanel Grid.Row="4" Orientation="Horizontal" Visibility="Hidden">
<Button Content="初始化生成库存状态表" Background="DarkOrange" Command="{Binding CargoInitializeCommand}"/>
<TextBlock Width="150" TextWrapping="Wrap" Text="(使用前请先备份库存记录,否则会导致数据丢失)" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal">
<TextBlock Text=" 实垛输送线-A:" Style="{StaticResource LineButtonTitle}"/>
<Button Content="{Binding LineAStr}" Command="{Binding LineAvailableIsResetCommand}" Tag="{Binding LineAIsEnable}" Style="{StaticResource LineButton}" CommandParameter="A"/>
</StackPanel>
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
<TextBlock Text=" 实垛输送线-B:" Style="{StaticResource LineButtonTitle}"/>
<Button Content="{Binding LineBStr}" Command="{Binding LineAvailableIsResetCommand}" Tag="{Binding LineBIsEnable}" Style="{StaticResource LineButton}" CommandParameter="B"/>
</StackPanel>
<StackPanel Grid.Row="3" Grid.Column="1" Orientation="Horizontal">
<TextBlock Text=" 实垛输送线-C:" Style="{StaticResource LineButtonTitle}"/>
<Button Content="{Binding LineCStr}" Command="{Binding LineAvailableIsResetCommand}" Tag="{Binding LineCIsEnable}" Style="{StaticResource LineButton}" CommandParameter="C"/>
</StackPanel>
<StackPanel Grid.Row="4" Grid.Column="1" Orientation="Horizontal">
<TextBlock Text=" 实垛输送线-D:" Style="{StaticResource LineButtonTitle}"/>
<Button Content="{Binding LineDStr}" Command="{Binding LineAvailableIsResetCommand}" Tag="{Binding LineDIsEnable}" Style="{StaticResource LineButton}" CommandParameter="D"/>
</StackPanel>
<StackPanel Grid.Row="5" Grid.Column="1" Orientation="Horizontal">
<TextBlock Text="空托输送线-AB:" Style="{StaticResource LineButtonTitle}"/>
<Button Content="{Binding LineABStr}" Command="{Binding LineAvailableIsResetCommand}" Tag="{Binding LineABIsEnable}" Style="{StaticResource LineButton}" CommandParameter="AB"/>
</StackPanel>
<StackPanel Grid.Row="6" Grid.Column="1" Orientation="Horizontal">
<TextBlock Text="空托输送线-CD:" Style="{StaticResource LineButtonTitle}"/>
<Button Content="{Binding LineCDStr}" Command="{Binding LineAvailableIsResetCommand}" Tag="{Binding LineCDIsEnable}" Style="{StaticResource LineButton}" CommandParameter="CD"/>
</StackPanel>
<!--接口请求测试-->
</Grid>
</Page>