添加项目文件。
This commit is contained in:
52
WPFWCSDemo/Views/Settings/AboutView.xaml
Normal file
52
WPFWCSDemo/Views/Settings/AboutView.xaml
Normal file
@@ -0,0 +1,52 @@
|
||||
<Page x:Class="WPFWCSDemo.Views.Settings.AboutView"
|
||||
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:local="clr-namespace:WPFWCSDemo.Views.Settings"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800"
|
||||
Title="AboutView">
|
||||
|
||||
<Page.Resources>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="FontSize" Value="20"/>
|
||||
<Setter Property="Margin" Value="10"/>
|
||||
<Setter Property="TextOptions.TextFormattingMode" Value="Display"/>
|
||||
</Style>
|
||||
</Page.Resources>
|
||||
|
||||
<Grid Margin="20">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Grid.Row="0">
|
||||
<TextBlock Text="WCS Demo 2023"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Row="1">
|
||||
<TextBlock Text="版本 1.0.0.1"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Row="2" Orientation="Horizontal">
|
||||
<TextBlock Text="©" Foreground="Gray" Margin="10,10,0,10"/>
|
||||
<TextBlock Text="2023 · YCTD"/>
|
||||
<TextBlock>
|
||||
<Hyperlink Command="{Binding WebNavigationCommand}">
|
||||
http://www.yctd.cn/
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
|
||||
</StackPanel>
|
||||
<TextBlock Grid.Row="3" Text="联系电话:010-60237001 60237002"/>
|
||||
|
||||
<StackPanel Grid.Row="4">
|
||||
<TextBlock Text="保留所有权利。"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Page>
|
||||
29
WPFWCSDemo/Views/Settings/AboutView.xaml.cs
Normal file
29
WPFWCSDemo/Views/Settings/AboutView.xaml.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace WPFWCSDemo.Views.Settings
|
||||
{
|
||||
/// <summary>
|
||||
/// AboutView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class AboutView : Page
|
||||
{
|
||||
public AboutView()
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = new ViewModels.Settings.AboutViewModel();
|
||||
}
|
||||
}
|
||||
}
|
||||
58
WPFWCSDemo/Views/Settings/SettingView.xaml
Normal file
58
WPFWCSDemo/Views/Settings/SettingView.xaml
Normal file
@@ -0,0 +1,58 @@
|
||||
<Page x:Class="WPFWCSDemo.Views.SettingView"
|
||||
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:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:viewmodels="clr-namespace:WPFWCSDemo.ViewModels"
|
||||
d:DataContext="{d:DesignInstance Type=viewmodels:SettingViewModel}"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="850" d:DesignWidth="1600"
|
||||
Title="SettingView">
|
||||
|
||||
|
||||
<Grid Margin="0,0,0,30">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="700"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="设置" FontSize="30" FontWeight="Bold" Margin="20"/>
|
||||
<Separator Grid.Row="1" VerticalAlignment="Bottom" Background="Gray" BorderThickness="0.5"/>
|
||||
<Grid Grid.Row="1" Margin="50,10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ListBox x:Name="settingMenu" Grid.Row="1" ItemsSource="{Binding Menu}" ItemContainerStyle="{StaticResource myListBoxItemStyle}">
|
||||
<!--添加行为触发(例:通过选中项的改变触发某个事件)-->
|
||||
<i:Interaction.Triggers>
|
||||
<!--设定触发的事件-->
|
||||
<i:EventTrigger EventName="SelectionChanged">
|
||||
<!--绑定动作对象的属性-->
|
||||
<i:InvokeCommandAction Command="{Binding SettingNavigateCommand}" CommandParameter="{Binding ElementName=settingMenu,Path=SelectedItem}"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal" Background="Transparent">
|
||||
<md:PackIcon Kind="{Binding Icon}" FontSize="16" Margin="40,20" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding Title}" FontSize="16" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
<Border Grid.Column="1">
|
||||
<Frame x:Name="settingFrame" Background="#FAFAFA" Margin="20 0 0 0"/>
|
||||
<Border.Effect>
|
||||
<DropShadowEffect ShadowDepth="3" BlurRadius="10" Direction="200" Color="Black" Opacity="0.3"/>
|
||||
</Border.Effect>
|
||||
</Border>
|
||||
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Page>
|
||||
29
WPFWCSDemo/Views/Settings/SettingView.xaml.cs
Normal file
29
WPFWCSDemo/Views/Settings/SettingView.xaml.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace WPFWCSDemo.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// SettingView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class SettingView : Page
|
||||
{
|
||||
public SettingView()
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = new ViewModels.SettingViewModel(settingFrame);
|
||||
}
|
||||
}
|
||||
}
|
||||
58
WPFWCSDemo/Views/Settings/SkinView.xaml
Normal file
58
WPFWCSDemo/Views/Settings/SkinView.xaml
Normal file
@@ -0,0 +1,58 @@
|
||||
<Page x:Class="WPFWCSDemo.Views.Settings.SkinView"
|
||||
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:mdColors="clr-namespace:MaterialDesignColors;assembly=MaterialDesignColors"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:local="clr-namespace:WPFWCSDemo.Views.Settings"
|
||||
xmlns:converters="clr-namespace:WPFWCSDemo.Common.Converters"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="700" d:DesignWidth="1500"
|
||||
Title="SkinView">
|
||||
|
||||
<Page.Resources>
|
||||
<converters:ColorToBrushConverter x:Key="ColorToBrushConverter"/>
|
||||
<DataTemplate x:Key="SwatchColorTemplate" DataType="{x:Type Color}">
|
||||
<Button Width="40"
|
||||
Height="40"
|
||||
Background="{Binding Converter={StaticResource ColorToBrushConverter}}"
|
||||
Command="{Binding DataContext.ChangeHueCommand, RelativeSource={RelativeSource AncestorType=local:SkinView}}"
|
||||
CommandParameter="{Binding}">
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</Page.Resources>
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="700" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="10">
|
||||
<TextBlock Text="浅色"/>
|
||||
<ToggleButton Margin="8 0" Command="{Binding }" IsChecked="{Binding IsDarkTheme}"/>
|
||||
<TextBlock Text="深色"/>
|
||||
</StackPanel>
|
||||
|
||||
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto" CanContentScroll="True">
|
||||
<ItemsControl ItemsSource="{Binding Swatches}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type mdColors:ISwatch}">
|
||||
<StackPanel Orientation="Horizontal" Margin="10,0">
|
||||
<TextBlock Width="90" VerticalAlignment="Center" Text="{Binding Name, Mode=OneTime}" />
|
||||
<ItemsControl ItemTemplate="{StaticResource SwatchColorTemplate}" ItemsSource="{Binding Hues, Mode=OneTime}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<VirtualizingStackPanel Orientation="Horizontal"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
</ItemsControl>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</Page>
|
||||
29
WPFWCSDemo/Views/Settings/SkinView.xaml.cs
Normal file
29
WPFWCSDemo/Views/Settings/SkinView.xaml.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace WPFWCSDemo.Views.Settings
|
||||
{
|
||||
/// <summary>
|
||||
/// SkinView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class SkinView : Page
|
||||
{
|
||||
public SkinView()
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = new ViewModels.Settings.SkinViewModel();
|
||||
}
|
||||
}
|
||||
}
|
||||
121
WPFWCSDemo/Views/Settings/SystemView.xaml
Normal file
121
WPFWCSDemo/Views/Settings/SystemView.xaml
Normal file
@@ -0,0 +1,121 @@
|
||||
<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>
|
||||
29
WPFWCSDemo/Views/Settings/SystemView.xaml.cs
Normal file
29
WPFWCSDemo/Views/Settings/SystemView.xaml.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace WPFWCSDemo.Views.Settings
|
||||
{
|
||||
/// <summary>
|
||||
/// SystemView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class SystemView : Page
|
||||
{
|
||||
public SystemView()
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = new ViewModels.Settings.SystemViewModel();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user