添加项目文件。

This commit is contained in:
Administrator
2026-06-29 14:46:32 +08:00
parent 9a9c508618
commit d9e0324b1d
175 changed files with 17983 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
<Window x:Class="WPFWCSDemo.Views.CustomComponent.InputDialog"
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.ViewModels.CustomComponent"
d:DataContext="{d:DesignInstance Type=local:InputDialogViewModel}"
mc:Ignorable="d"
d:DesignHeight="160" d:DesignWidth="270"
MaxHeight="200"
MaxWidth="300"
AllowsTransparency="True"
Topmost="True"
WindowState="Normal"
WindowStyle="None"
BorderBrush="BlueViolet"
BorderThickness="3"
WindowStartupLocation="CenterScreen"
Background="GhostWhite"
x:Name="inputWindow">
<Window.Effect>
<DropShadowEffect BlurRadius="20" ShadowDepth="15" Direction="225" Opacity="0.7"/>
</Window.Effect>
<DockPanel>
<md:ColorZone x:Name="colorZone" CornerRadius="0" Padding="0" Height="30" md:ElevationAssist.Elevation="Dp4" DockPanel.Dock="Top" Mode="PrimaryMid">
<TextBlock Text="{Binding Caption}" VerticalAlignment="Center" Margin="20 0"/>
</md:ColorZone>
<md:ColorZone Height="6" CornerRadius="0"/>
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<TextBlock TextWrapping="Wrap" Text="请输入密码:" VerticalAlignment="Center" LineHeight="20" Padding="20 20 30 0"/>
<TextBox Grid.Row="1" Text="{Binding Content}" VerticalContentAlignment="Bottom" VerticalAlignment="Center" Width="200" />
<DockPanel Grid.Row="2" LastChildFill="False" Margin="20,10,20,0">
<Button Content="确认" Background="Lavender" Width="100" IsDefault="True" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding AcceptCommand}"/>
<Button Content="取消" Background="Lavender" Width="100" Style="{StaticResource MaterialDesignFlatButton}" DockPanel.Dock="Right" Command="{Binding CancelCommand}" CommandParameter="{Binding InputDialog}"/>
</DockPanel>
</Grid>
</DockPanel>
</Window>

View File

@@ -0,0 +1,34 @@
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.Shapes;
namespace WPFWCSDemo.Views.CustomComponent
{
/// <summary>
/// InputDialog.xaml 的交互逻辑
/// </summary>
public partial class InputDialog : Window
{
Action<string> action;
public InputDialog()
{
InitializeComponent();
DataContext = new ViewModels.CustomComponent.InputDialogViewModel(inputWindow,action);
colorZone.MouseMove += (s, e) =>
{
if (e.LeftButton == MouseButtonState.Pressed) DragMove();
};
}
}
}

View File

@@ -0,0 +1,122 @@
<Window x:Class="WPFWCSDemo.Views.CustomComponent.LineControlDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WPFWCSDemo.Views.CustomComponent"
xmlns:viewmodels="clr-namespace:WPFWCSDemo.ViewModels"
d:DataContext="{d:DesignInstance Type=viewmodels:LineManagementViewModel}"
mc:Ignorable="d"
AllowsTransparency="True"
WindowState="Normal"
WindowStyle="None"
BorderBrush="#673AB7"
BorderThickness="0"
WindowStartupLocation="CenterScreen"
Background="Transparent"
Title="LineControlDialog"
Height="400"
Width="600"
x:Name="lineControlWindow">
<Window.Resources>
<Style x:Key="title" TargetType="TextBlock">
<Setter Property="FontSize" Value="14"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="TextAlignment" Value="Center"/>
</Style>
<Style x:Key="button" TargetType="Button" BasedOn="{StaticResource MaterialDesignFlatDarkBgButton}">
<Setter Property="FontSize" Value="12"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Width" Value="90"/>
<Setter Property="Height" Value="24"/>
<!--<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect BlurRadius="5" ShadowDepth="5"/>
</Setter.Value>
</Setter>-->
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" Value="1">
<Setter Property="Background" Value="DarkGreen"/>
<Setter Property="Content" Value="正常"/>
</DataTrigger>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" Value="0">
<Setter Property="Background" Value="OrangeRed"/>
<Setter Property="Content" Value="禁止"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Window.Resources>
<Border Background=" lavender" CornerRadius="10" Margin="10">
<Border.Effect>
<DropShadowEffect Color="Gray" BlurRadius="10" ShadowDepth="5" Direction="-135" Opacity="0.5"/>
</Border.Effect>
<DockPanel>
<md:ColorZone x:Name="colorZone" CornerRadius="0" Padding="0" Height="30" md:ElevationAssist.Elevation="Dp4" DockPanel.Dock="Top" Mode="PrimaryMid">
<Grid Margin="5 0">
<TextBlock Text="{Binding Caption}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5 0"/>
<Button x:Name="btnClose" Background="DarkOrange" Width="20" Height="20" Content="{md:PackIcon Kind=Close, Size=14}" Margin="2" HorizontalAlignment="Right" Style="{StaticResource MaterialDesignFloatingActionButton}"/>
</Grid>
</md:ColorZone>
<md:ColorZone Height="6" CornerRadius="0"/>
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<TextBox Text="出口控制" HorizontalAlignment="Center" FontSize="22" Style="{StaticResource MaterialDesignDataGridComboBoxEditableTextBox}" Margin="10 5"/>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.5*"/>
<ColumnDefinition/>
<ColumnDefinition Width="1.5*"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="20"/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Rectangle Fill="Gray" Grid.ColumnSpan="4" Height="1.5" Margin="20 0"/>
<TextBlock Grid.Row="1" Text="立库1#实垛口1003" Style="{StaticResource title}"/>
<TextBlock Grid.Row="2" Text="立库2#实垛口1005" Style="{StaticResource title}"/>
<TextBlock Grid.Row="3" Text="G线实垛出口1011" Style="{StaticResource title}"/>
<TextBlock Grid.Row="4" Text="H线实垛出口1012" Style="{StaticResource title}"/>
<Button Grid.Column="1" Grid.Row="1" Tag="{Binding E1009}" Style="{StaticResource button}" Command="{Binding StateChangeCommand}" CommandParameter="1009"/>
<Button Grid.Column="1" Grid.Row="2" Tag="{Binding E1010}" Style="{StaticResource button}" Command="{Binding StateChangeCommand}" CommandParameter="1010"/>
<Button Grid.Column="1" Grid.Row="3" Tag="{Binding E1011}" Style="{StaticResource button}" Command="{Binding StateChangeCommand}" CommandParameter="1011"/>
<Button Grid.Column="1" Grid.Row="4" Tag="{Binding E1012}" Style="{StaticResource button}" Command="{Binding StateChangeCommand}" CommandParameter="1012"/>
<TextBlock Grid.Column="2" Grid.Row="1" Text="空托出口1002" Style="{StaticResource title}"/>
<TextBlock Grid.Column="2" Grid.Row="2" Text="空托出口1004" Style="{StaticResource title}"/>
<TextBlock Grid.Column="2" Grid.Row="3" Text="空托出口1006" Style="{StaticResource title}"/>
<Button Grid.Column="3" Grid.Row="1" Tag="{Binding E1002}" Style="{StaticResource button}" Margin="0 0 20 0" Command="{Binding StateChangeCommand}" CommandParameter="1002"/>
<Button Grid.Column="3" Grid.Row="2" Tag="{Binding E1004}" Style="{StaticResource button}" Margin="0 0 20 0" Command="{Binding StateChangeCommand}" CommandParameter="1004"/>
<Button Grid.Column="3" Grid.Row="3" Tag="{Binding E1006}" Style="{StaticResource button}" Margin="0 0 20 0" Command="{Binding StateChangeCommand}" CommandParameter="1006"/>
</Grid>
<DockPanel Grid.Row="2" Margin="20,10,20,10">
<Button Content="确认" BorderThickness="1" Width="150" IsDefault="True" Command="{Binding AcceptCommand}" CommandParameter="{Binding LineManagementDialog}" HorizontalAlignment="Center"/>
</DockPanel>
</Grid>
</DockPanel>
</Border>
</Window>

View File

@@ -0,0 +1,37 @@
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.Input;
using System.Windows.Shapes;
using WPFWCSDemo.ViewModels;
namespace WPFWCSDemo.Views.CustomComponent
{
/// <summary>
/// LineControlDialog.xaml 的交互逻辑
/// </summary>
public partial class LineControlDialog : Window
{
public LineControlDialog()
{
InitializeComponent();
DataContext = new LineManagementViewModel(lineControlWindow);
colorZone.MouseMove += (s, e) =>
{
if (e.LeftButton == MouseButtonState.Pressed) DragMove();
};
btnClose.Click += (s, e) =>
{
Close();
};
}
}
}

View File

@@ -0,0 +1,46 @@
<Window x:Class="WPFWCSDemo.Views.MessageDialog"
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.ViewModels.CustomComponent"
mc:Ignorable="d"
d:DesignHeight="160" d:DesignWidth="270"
MaxHeight="200"
MaxWidth="300"
AllowsTransparency="True"
Topmost="True"
WindowState="Normal"
WindowStyle="None"
BorderBrush="BlueViolet"
BorderThickness="3"
WindowStartupLocation="CenterScreen"
Background="GhostWhite"
x:Name="messageWindow"
>
<Window.Effect>
<DropShadowEffect BlurRadius="20" ShadowDepth="15" Direction="225" Opacity="0.7"/>
</Window.Effect>
<DockPanel>
<md:ColorZone x:Name="colorZone" CornerRadius="0" Padding="0" Height="30" md:ElevationAssist.Elevation="Dp4" DockPanel.Dock="Top" Mode="PrimaryMid">
<TextBlock Text="{Binding Caption}" VerticalAlignment="Center" Margin="20 0"/>
</md:ColorZone>
<md:ColorZone Height="6" CornerRadius="0"/>
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<TextBlock TextWrapping="Wrap" Text="{Binding Content}" Style="{StaticResource MaterialDesignTextBlock}" VerticalAlignment="Center" LineHeight="20" HorizontalAlignment="Center" Padding="30 20 30 0"/>
<DockPanel Grid.Row="2" LastChildFill="False" Margin="20,10,20,0">
<Button Content="确定" Background="Lavender" Width="100" IsDefault="True" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding AcceptCommand}"/>
<Button Content="取消" Background="Lavender" Width="100" Style="{StaticResource MaterialDesignFlatButton}" DockPanel.Dock="Right" Command="{Binding CancelCommand}" CommandParameter="{Binding MessageDialog}"/>
</DockPanel>
</Grid>
</DockPanel>
</Window>

View File

@@ -0,0 +1,36 @@
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;
using WPFWCSDemo.Models;
namespace WPFWCSDemo.Views
{
/// <summary>
/// MessageDialog.xaml 的交互逻辑
/// </summary>
public partial class MessageDialog : Window
{
public MessageDialog()
{
InitializeComponent();
DataContext = new ViewModels.CustomComponent.MessageDialogViewModel(messageWindow);
colorZone.MouseMove += (s, e) =>
{
if (e.LeftButton == MouseButtonState.Pressed) DragMove();
};
}
}
}