Browse Source

Recipe

样式分支
NXX 2 years ago
parent
commit
f49193852d
88 changed files with 3572 additions and 804 deletions
  1. +0
    -4
      BPASmart.Model/BPASmart.Model.csproj
  2. +14
    -0
      BPASmart.Model/用户/LocalUser.cs
  3. +17
    -0
      BPASmart.Model/用户/UserManager.cs
  4. +3
    -0
      BPASmart.Model/配方/Recipes.cs
  5. +48
    -0
      BPASmart.Model/配方/TechnologyProcessModel.cs
  6. +187
    -101
      BPASmart.RecipeManagement/App.xaml
  7. +48
    -0
      BPASmart.RecipeManagement/BPASmart.RecipeManagement.csproj
  8. BIN
     
  9. +16
    -2
      BPASmart.RecipeManagement/Globle/GlobleData.cs
  10. BIN
     
  11. BIN
     
  12. BIN
     
  13. BIN
     
  14. BIN
     
  15. BIN
     
  16. BIN
     
  17. BIN
     
  18. BIN
     
  19. BIN
     
  20. BIN
     
  21. BIN
     
  22. BIN
     
  23. BIN
     
  24. BIN
     
  25. BIN
     
  26. BIN
     
  27. BIN
     
  28. BIN
     
  29. BIN
     
  30. BIN
     
  31. BIN
     
  32. +175
    -54
      BPASmart.RecipeManagement/MainWindow.xaml
  33. +12
    -1
      BPASmart.RecipeManagement/MainWindow.xaml.cs
  34. +56
    -45
      BPASmart.RecipeManagement/View/CreateOrder.xaml
  35. +101
    -64
      BPASmart.RecipeManagement/View/MaterialConfigure.xaml
  36. +2
    -2
      BPASmart.RecipeManagement/View/MaterialConfigure.xaml.cs
  37. +93
    -133
      BPASmart.RecipeManagement/View/MaterialManager.xaml
  38. +86
    -55
      BPASmart.RecipeManagement/View/OrderManager.xaml
  39. +280
    -230
      BPASmart.RecipeManagement/View/PowerManager.xaml
  40. +16
    -4
      BPASmart.RecipeManagement/View/PropertySetting.xaml
  41. +80
    -31
      BPASmart.RecipeManagement/View/RecipeManager.xaml
  42. +75
    -61
      BPASmart.RecipeManagement/View/RecipesConfigure.xaml
  43. +445
    -0
      BPASmart.RecipeManagement/View/TechnologyProcess.xaml
  44. +70
    -0
      BPASmart.RecipeManagement/View/TechnologyProcess.xaml.cs
  45. +10
    -10
      BPASmart.RecipeManagement/View/TechnologySetting.xaml
  46. +1
    -2
      BPASmart.RecipeManagement/View/TechnologySetting.xaml.cs
  47. +1
    -1
      BPASmart.RecipeManagement/ViewModel/CreateOrderViewModel.cs
  48. +2
    -2
      BPASmart.RecipeManagement/ViewModel/MaterialManagerViewModel.cs
  49. +6
    -1
      BPASmart.RecipeManagement/ViewModel/RecipeManagerViewModel.cs
  50. +130
    -0
      BPASmart.RecipeManagement/ViewModel/TechnologyProcessViewModel.cs
  51. +382
    -0
      BPASmart.UserManagement/App.xaml
  52. +17
    -0
      BPASmart.UserManagement/App.xaml.cs
  53. +10
    -0
      BPASmart.UserManagement/AssemblyInfo.cs
  54. +65
    -0
      BPASmart.UserManagement/BPASmart.UserManagement.csproj
  55. BIN
     
  56. +13
    -0
      BPASmart.UserManagement/Globle/GlobleData.cs
  57. +73
    -0
      BPASmart.UserManagement/Helper/PasswordHelper.cs
  58. BIN
     
  59. BIN
     
  60. BIN
     
  61. BIN
     
  62. BIN
     
  63. BIN
     
  64. BIN
     
  65. BIN
     
  66. BIN
     
  67. BIN
     
  68. BIN
     
  69. BIN
     
  70. BIN
     
  71. BIN
     
  72. BIN
     
  73. BIN
     
  74. +113
    -0
      BPASmart.UserManagement/MainWindow.xaml
  75. +78
    -0
      BPASmart.UserManagement/MainWindow.xaml.cs
  76. +56
    -0
      BPASmart.UserManagement/MessageBox.xaml
  77. +102
    -0
      BPASmart.UserManagement/MessageBox.xaml.cs
  78. +136
    -0
      BPASmart.UserManagement/View/AddNewUser.xaml
  79. +54
    -0
      BPASmart.UserManagement/View/AddNewUser.xaml.cs
  80. +27
    -0
      BPASmart.UserManagement/View/ChangeUser.xaml
  81. +28
    -0
      BPASmart.UserManagement/View/ChangeUser.xaml.cs
  82. +163
    -0
      BPASmart.UserManagement/View/UserList.xaml
  83. +30
    -0
      BPASmart.UserManagement/View/UserList.xaml.cs
  84. +108
    -0
      BPASmart.UserManagement/ViewModel/AddNewUserViewModel.cs
  85. +14
    -0
      BPASmart.UserManagement/ViewModel/ChangeUserViewModel.cs
  86. +21
    -0
      BPASmart.UserManagement/ViewModel/MainWindowViewModel.cs
  87. +84
    -0
      BPASmart.UserManagement/ViewModel/UserListViewModel.cs
  88. +24
    -1
      SmartClient.sln

+ 0
- 4
BPASmart.Model/BPASmart.Model.csproj View File

@@ -12,8 +12,4 @@
<PackageReference Include="System.IO.Ports" Version="6.0.0" />
</ItemGroup>

<ItemGroup>
<Folder Include="权限\" />
</ItemGroup>

</Project>

+ 14
- 0
BPASmart.Model/用户/LocalUser.cs View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmart.Model.用户
{
public class LocalUser
{
public ObservableCollection<UserManager> UserManagers { get; set; } = new ObservableCollection<UserManager>();
}
}

+ 17
- 0
BPASmart.Model/用户/UserManager.cs View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmart.Model.用户
{
public class UserManager
{
public string UserID { get; set; }

public string UserName { get; set; }

public string Password { get; set; }
}
}

+ 3
- 0
BPASmart.Model/配方/Recipes.cs View File

@@ -38,6 +38,9 @@ namespace BPASmart.Model.配方
/// </summary>
public ObservableCollection<RecipeMaterials> recipeMaterials { get; set; }

public ObservableCollection<TechnologyProcessModel> TechnologyProcessModels { get; set; } = new ObservableCollection<TechnologyProcessModel>();

}

public enum RecipeStates


+ 48
- 0
BPASmart.Model/配方/TechnologyProcessModel.cs View File

@@ -0,0 +1,48 @@
using Microsoft.Toolkit.Mvvm.ComponentModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmart.Model.配方
{
public class TechnologyProcessModel:ObservableObject
{

/// <summary>
/// 工艺步骤
/// </summary>
public string Step { get { return _step; } set { _step = value; OnPropertyChanged(); } }
private string _step;

/// <summary>
/// 炒制原料/桶号
/// </summary>
public string FryMaterialNum { get { return _fryMaterialNum; } set { _fryMaterialNum = value; OnPropertyChanged(); } }
private string _fryMaterialNum;

/// <summary>
/// 炒制速度
/// </summary>
public double FrySpeed { get { return _frySpeed; } set { _frySpeed = value; OnPropertyChanged(); } }
private double _frySpeed;
/// <summary>
/// 炒制重量
/// </summary>
public double FryWeight { get { return _fryMaterialWeight; } set { _fryMaterialWeight = value; OnPropertyChanged(); } }
private double _fryMaterialWeight;
/// <summary>
/// 炒制温度
/// </summary>
public double FryTemperature { get { return _fryTemperature; } set { _fryTemperature = value; OnPropertyChanged(); } }
private double _fryTemperature;
/// <summary>
/// 炒制时间
/// </summary>
public double FryPeriodTime { get { return _fryPeriodTime; } set { _fryPeriodTime = value; OnPropertyChanged(); } }
private double _fryPeriodTime;


}
}

+ 187
- 101
BPASmart.RecipeManagement/App.xaml View File

@@ -4,91 +4,11 @@
xmlns:local="clr-namespace:BPASmart.RecipeManagement" xmlns:Themes1="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic"
StartupUri="MainWindow.xaml">
<Application.Resources>

<Style TargetType="{x:Type ContextMenu}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ContextMenu}">
<Border x:Name="Border" CornerRadius="4" Background="#009ACD" BorderThickness="1" Margin="0">
<Border.BorderBrush>
<SolidColorBrush Color="#104E8B" />
</Border.BorderBrush>
<ItemsPresenter/>
</Border>
<ControlTemplate.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="True"/>
</MultiTrigger.Conditions>
<MultiTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(FrameworkElement.Width)">
<SplineDoubleKeyFrame KeyTime="00:00:00.0020000" Value="0"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.20000" Value="110"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(FrameworkElement.Height)">
<SplineDoubleKeyFrame KeyTime="00:00:00.0020000" Value="0"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.20000" Value="100"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</MultiTrigger.EnterActions>
</MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type MenuItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type MenuItem}">
<Border Margin="0,5" MinWidth="80" CornerRadius="5">
<Border.Background>
<SolidColorBrush x:Name="MyAnimatedBrushBackground" Color="Transparent" />
</Border.Background>
<StackPanel Orientation="Horizontal">
<TextBlock Text=" "/>
<ContentPresenter ContentSource="Icon" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBlock Text=" "/>
<ContentPresenter ContentSource="Header" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</StackPanel>
</Border>
<ControlTemplate.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="True"/>
</MultiTrigger.Conditions>
<MultiTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MyAnimatedBrushBackground" Storyboard.TargetProperty="Color">
<LinearColorKeyFrame Value="Transparent" KeyTime="00:00:00.0020000" />
<LinearColorKeyFrame Value="#B0E2FF" KeyTime="00:00:00.0320000" />
</ColorAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</MultiTrigger.EnterActions>
<MultiTrigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MyAnimatedBrushBackground" Storyboard.TargetProperty="Color">
<LinearColorKeyFrame Value="#7E9C9C9C" KeyTime="00:00:00.0020000" />
<LinearColorKeyFrame Value="Transparent" KeyTime="00:00:00.0320000" />
</ColorAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</MultiTrigger.ExitActions>
</MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--#region -->

<SolidColorBrush x:Key="menufont" Color="#B7C5DA"/>

<!--#region ScrollViewer -->
<ControlTemplate x:Key="MyScrollViewer" TargetType="{x:Type ScrollViewer}">
<!--View区域背景色-->
<Grid x:Name="Grid" Background="{TemplateBinding Background}">
@@ -123,7 +43,7 @@
</Style>
<!--#endregion-->
<!--#region Combox-->
<!--#region Combox-->
<ControlTemplate x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
<Grid Height="25" HorizontalAlignment="Stretch" Background="Transparent">
<Grid.ColumnDefinitions>
@@ -141,7 +61,7 @@
HorizontalAlignment="Center"
VerticalAlignment="Center"
Data="M 0 0 6 6 12 0 Z"
Fill="Black"
Fill="#FF2AB2E7"
Stretch="None">
<Path.Effect>
<DropShadowEffect
@@ -432,17 +352,92 @@


<!--#endregion-->
<Style x:Key="ButtonStyle" TargetType="Button">
<Setter Property="Background" Value="#2219b7ec" />
<Setter Property="BorderBrush" Value="#ff19b7ec" />
<Setter Property="BorderThickness" Value="2" />
<Setter Property="Foreground" Value="Aqua"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#0041D4"/>
</Trigger>
</Style.Triggers>

<!--#region右键菜单-->
<Style TargetType="{x:Type ContextMenu}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ContextMenu}">
<Border x:Name="Border" CornerRadius="4" Background="#1E2D45" BorderThickness="1" Margin="0"
Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
<Border.BorderBrush>
<SolidColorBrush Color="#104E8B" />
</Border.BorderBrush>
<ItemsPresenter/>
</Border>
<ControlTemplate.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="True"/>
</MultiTrigger.Conditions>
<MultiTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(FrameworkElement.Width)">
<SplineDoubleKeyFrame KeyTime="00:00:00.0020000" Value="0"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.20000" Value="130"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(FrameworkElement.Height)">
<SplineDoubleKeyFrame KeyTime="00:00:00.0020000" Value="0"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.20000" Value="100"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</MultiTrigger.EnterActions>
</MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type MenuItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type MenuItem}">
<Border Margin="0,5,0,0" CornerRadius="5" >
<Border.Background>
<SolidColorBrush x:Name="MyAnimatedBrushBackground" Color="Transparent" />
</Border.Background>
<StackPanel Orientation="Horizontal">
<TextBlock Text=" "/>
<ContentPresenter ContentSource="Icon" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBlock Text=" "/>
<ContentPresenter ContentSource="Header" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</StackPanel>
</Border>
<ControlTemplate.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="True"/>
</MultiTrigger.Conditions>
<MultiTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MyAnimatedBrushBackground" Storyboard.TargetProperty="Color">
<LinearColorKeyFrame Value="#1E2D45" KeyTime="00:00:00.0020000" />
<LinearColorKeyFrame Value="#05173B" KeyTime="00:00:00.332" />
</ColorAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</MultiTrigger.EnterActions>
<MultiTrigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MyAnimatedBrushBackground" Storyboard.TargetProperty="Color">
<LinearColorKeyFrame Value="#05173B" KeyTime="00:00:00.0020000" />
<LinearColorKeyFrame Value="#1E2D45" KeyTime="00:00:00.30000" />
</ColorAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</MultiTrigger.ExitActions>
</MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--#endregion-->


<Style x:Key="TextBoxStyle" TargetType="{x:Type TextBox}">
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
@@ -509,19 +504,110 @@
</Setter>
</Style>

<Style x:Key="CommonButton" TargetType="{x:Type Button}">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="#FF2AB2E7"/>
<Setter Property="BorderBrush" Value="#FF2AB2E7"/>
<Style x:Key="menuText" TargetType="TextBlock">
<Setter Property="FontFamily" Value="pack://application:,,,/Font/#iconfont"/>
<Setter Property="Foreground" Value="{DynamicResource menufont}"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="Margin" Value="2,0"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>

<Style x:Key="CommonTextBox" TargetType="{x:Type TextBox}">
<Setter Property="Foreground" Value="Orange"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="#FF2AB2E7"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
<!--#region Button-->
<Style x:Key="CommonButton" TargetType="{x:Type Button}">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="#FF2AB2E7"/>
<Setter Property="BorderBrush" Value="#FF2AB2E7"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background" Value="#442AB2E7"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ButtonStyle" TargetType="Button">
<Setter Property="Background" Value="#2219b7ec" />
<Setter Property="BorderBrush" Value="#ff19b7ec" />
<Setter Property="BorderThickness" Value="2" />
<Setter Property="Foreground" Value="Aqua"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="border" BorderBrush="#ff19b7ec" BorderThickness="1">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background" Value="#442AB2E7"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>

</Style>

<Style x:Key="DeleteButton" TargetType="{x:Type Button}">
<Setter Property="Foreground" Value="#FFF53F62"/>
<Setter Property="Background" Value="#44F53F62"/>
<Setter Property="Opacity" Value="0.9"/>
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Foreground" Value="#FFF53F62"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background" Value="#77F53F62"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

<Style x:Key="GreenButton" TargetType="{x:Type Button}">
<Setter Property="Foreground" Value="#ff2bd06f"/>
<Setter Property="Background" Value="#332bd06f"/>
<Setter Property="Opacity" Value="0.9"/>
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background" Value="#772bd06f"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--#endregion-->

</Application.Resources>
</Application>

+ 48
- 0
BPASmart.RecipeManagement/BPASmart.RecipeManagement.csproj View File

@@ -16,12 +16,35 @@
</ItemGroup>

<ItemGroup>
<None Remove="Font\iconfont.ttf" />
<None Remove="Image\AddGreen.png" />
<None Remove="Image\Close.png" />
<None Remove="Image\Delete.png" />
<None Remove="Image\Exit.png" />
<None Remove="Image\left.png" />
<None Remove="Image\leftImage.png" />
<None Remove="Image\recipe.png" />
<None Remove="Image\right.png" />
<None Remove="Image\中间.png" />
<None Remove="Image\元素1.png" />
<None Remove="Image\内部背景.png" />
<None Remove="Image\双右箭头.png" />
<None Remove="Image\增加.png" />
<None Remove="Image\外边框1.png" />
<None Remove="Image\容器边框.png" />
<None Remove="Image\按钮背景蓝色.png" />
<None Remove="Image\直线.png" />
<None Remove="Image\矩形.png" />
<None Remove="Image\矩形1.png" />
<None Remove="Image\矩形2.png" />
<None Remove="Image\矩形样式.png" />
<None Remove="Image\移除.png" />
<None Remove="Image\背景.png" />
<None Remove="Image\蓝边框.png" />
<None Remove="Image\边框元素.png" />
<None Remove="Image\边框元素1.png" />
<None Remove="Image\边框效果2.png" />
<None Remove="Image\边角.png" />
</ItemGroup>

<ItemGroup>
@@ -43,6 +66,7 @@
</ItemGroup>

<ItemGroup>
<Resource Include="Font\iconfont.ttf" />
<Resource Include="Image\Close.png" />
<Resource Include="Image\Delete.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
@@ -51,9 +75,33 @@

<ItemGroup>
<Resource Include="Image\AddGreen.png" />
<Resource Include="Image\Exit.png" />
<Resource Include="Image\left.png" />
<Resource Include="Image\leftImage.png" />
<Resource Include="Image\recipe.png" />
<Resource Include="Image\right.png" />
<Resource Include="Image\中间.png" />
<Resource Include="Image\元素1.png" />
<Resource Include="Image\内部背景.png" />
<Resource Include="Image\双右箭头.png" />
<Resource Include="Image\增加.png" />
<Resource Include="Image\外边框1.png" />
<Resource Include="Image\容器边框.png" />
<Resource Include="Image\按钮背景蓝色.png" />
<Resource Include="Image\直线.png" />
<Resource Include="Image\矩形.png" />
<Resource Include="Image\矩形1.png" />
<Resource Include="Image\矩形2.png" />
<Resource Include="Image\矩形样式.png" />
<Resource Include="Image\移除.png" />
<Resource Include="Image\背景.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Image\蓝边框.png" />
<Resource Include="Image\边框元素.png" />
<Resource Include="Image\边框元素1.png" />
<Resource Include="Image\边框效果2.png" />
<Resource Include="Image\边角.png" />
</ItemGroup>

</Project>

BIN
View File


+ 16
- 2
BPASmart.RecipeManagement/Globle/GlobleData.cs View File

@@ -10,10 +10,24 @@ namespace BPASmart.RecipeManagement.Globle
{
public class GlobleData
{
public static RecipeMaterials ChangeMaterail;
/// <summary>
/// 原料传值
/// </summary>
public static RecipeMaterials ChangeMaterail = new RecipeMaterials();

public static Recipes ChangeRecipes;
/// <summary>
/// 修改配方传值
/// </summary>
public static Recipes ChangeRecipes = new Recipes();

/// <summary>
///
/// </summary>
public static ObservableCollection<Order> orders { get; set; } = new ObservableCollection<Order>();

/// <summary>
/// 配方的工艺流程传值
/// </summary>
public static Recipes recipeTechnologyProcess = new Recipes();
}
}

BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


+ 175
- 54
BPASmart.RecipeManagement/MainWindow.xaml View File

@@ -7,13 +7,23 @@
xmlns:view="clr-namespace:BPASmart.RecipeManagement.View"
xmlns:vm="clr-namespace:BPASmart.RecipeManagement.ViewModel"
mc:Ignorable="d"
Title="MainWindow" Height="800" Width="1400" WindowStyle="None" WindowStartupLocation="CenterScreen" Background="#01003B" AllowsTransparency="True">
Title="MainWindow" Height="800" Width="1400" WindowStyle="None" WindowStartupLocation="CenterScreen" Background="#01003B" AllowsTransparency="True">
<Window.DataContext>
<vm:MainWindowViewModel/>
</Window.DataContext>
<Window.Resources>
<Style x:Key="fonticon" TargetType="{x:Type TextBlock}">
<Setter Property="FontFamily" Value="pack://application:,,,/Font/#iconfont"/>
<Setter Property="FontSize" Value="24"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Margin" Value="0,0,20,0"/>


</Style>
<Style x:Key="RadioNavigation" TargetType="RadioButton">
<Setter Property="Margin" Value="-4,10"/>
<Setter Property="Margin" Value="-4,0"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="GroupName" Value="Navigation"/>
<Setter Property="VerticalAlignment" Value="Center"/>
@@ -23,49 +33,67 @@
<ControlTemplate TargetType="RadioButton">
<Border x:Name="_borderOver" Background="Transparent" Width="200" BorderBrush="Transparent" BorderThickness="0,1">
<Grid Background="{TemplateBinding Background}" Margin="{TemplateBinding Margin}">
<TextBlock Foreground="White" Text="{TemplateBinding Content}" FontSize="24" Background="Transparent"
VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="BorderBrush" TargetName="_borderOver" Value="#1971B6"/>
<Setter Property="Background" TargetName="_borderOver">
<Setter.Value>
<LinearGradientBrush StartPoint="0,1" EndPoint="1,1">
<GradientStop Color="#104E8B" Offset="0"/>
<GradientStop Color="#1874CD" Offset="0.4"/>
<GradientStop Color="#1874CD" Offset="0.6"/>
<GradientStop Color="#27408B" Offset="1"/>
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" TargetName="_borderOver" Value="#1E90FF"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ButtonNavigation" TargetType="Button">
<Setter Property="Height" Value="40"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontSize" Value="20"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid Background="{TemplateBinding Background}" Margin="{TemplateBinding Margin}">
<Border x:Name="_borderOver" Background="Transparent" Width="200" BorderBrush="Transparent" BorderThickness="0,1">
<TextBlock Foreground="White" Text="{TemplateBinding Content}" FontSize="24" Background="Transparent"
VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" TargetName="_borderOver" Value="#1971B6"/>

<Setter Property="Background" TargetName="_borderOver" >
<Setter.Value>
<ImageBrush ImageSource="../Image/leftImage.png"/>
</Setter.Value>
</Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<ControlTemplate x:Key="butonTempalte" TargetType="RadioButton">
<Border x:Name="_borderOver" Background="Transparent" Width="200" Height="60" BorderBrush="Transparent" BorderThickness="0,1">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="BorderBrush" TargetName="_borderOver" Value="#1971B6"/>
<Setter Property="Background" TargetName="_borderOver">
<Setter.Value>
<LinearGradientBrush StartPoint="0,1" EndPoint="1,1">
<GradientStop Color="#104E8B" Offset="0"/>
<GradientStop Color="#1874CD" Offset="0.4"/>
<GradientStop Color="#1874CD" Offset="0.6"/>
<GradientStop Color="#27408B" Offset="1"/>
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="IsChecked" Value="True">

<Setter Property="Background" TargetName="_borderOver" >
<Setter.Value>
<ImageBrush ImageSource="../Image/leftImage.png"/>
</Setter.Value>
</Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Window.Resources>
<Grid >
<Grid.ColumnDefinitions>
@@ -74,40 +102,133 @@
<ColumnDefinition Width="2"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="50"/>
<RowDefinition Height="*"/>
<RowDefinition Height="10"/>
</Grid.RowDefinitions>
<Border Background="#02255E" Grid.ColumnSpan="3 " MouseLeftButtonDown="Border_MouseLeftButtonDown" BorderBrush="#4682B4" BorderThickness="0,0,0,1">
<StackPanel Orientation="Horizontal" Margin="60,0,0,0">
<Border x:Name="br" Grid.ColumnSpan="3 " MouseLeftButtonDown="Border_MouseLeftButtonDown" BorderBrush="#4682B4" BorderThickness="0,0,0,1">
<Border.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="#0C2349" Offset="0.2"/>
<GradientStop Color="#6495ED" Offset="0.4"/>
<GradientStop Color="#0C2349" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
<StackPanel Orientation="Horizontal" Margin="60,0,0,0" VerticalAlignment="Center">
<Image Source="../image/recipe.png" Width="20" Height="20"/>
<TextBlock Text="配方集成管理" Foreground="#E8E8E8" FontSize="28" FontFamily="楷体"
HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5,0"/>
<TextBlock Text="配方集成管理" Foreground="#E8E8E8" FontSize="30" FontFamily="楷体"
HorizontalAlignment="Center" VerticalAlignment="Center" Margin="5,0">
<TextBlock.Effect>
<DropShadowEffect Direction="70" Color="Black" />
</TextBlock.Effect>
</TextBlock>
</StackPanel>
</Border>
<Button FontSize="28 " HorizontalAlignment="Right" VerticalAlignment="Top"
HorizontalContentAlignment="Right"
Grid.Column="1"
Background="Red" Height="30"
Click="Button_Click">
<Image Source="../Image/Close.png" HorizontalAlignment="Stretch"/>
<Button Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Top" Background="Transparent"
Height="45" Width="45" Click="Button_Click" BorderBrush="Transparent" >
<Button.Style>
<Style TargetType="Button" >
<Style.Setters>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="border" BorderThickness="1" Background="Transparent" Padding="0" >
<Image x:Name="image" Source="../image/Exit.png" Stretch="UniformToFill"
VerticalAlignment="Center" HorizontalAlignment="Center" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="image" Property="Margin" Value="-3"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style.Setters>

</Style>
</Button.Style>
</Button>
<Border Grid.Row="1" Grid.RowSpan="2" Background="Transparent" BorderBrush="#1E90FF" BorderThickness="0,0,2,0"/>


<Border Grid.Row="1" Grid.RowSpan="2" BorderBrush="#1E90FF" BorderThickness="0,0,2,0">
<Border.Background>
<LinearGradientBrush StartPoint="0,1" EndPoint="1,1">
<GradientStop Color="#01003B" Offset="0.2"/>

<GradientStop Color="#010050" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
</Border>
<StackPanel x:Name="mylistview" Background="Transparent" Grid.RowSpan="1" Grid.Row="1"
ScrollViewer.VerticalScrollBarVisibility="Hidden" ScrollViewer.HorizontalScrollBarVisibility="Hidden"
MouseDown="mylistview_MouseDown" >
<RadioButton Content="订单管理" Style="{DynamicResource RadioNavigation}" IsChecked="True"
Click="NavButton_Click" Tag="OrderManager"/>
<RadioButton Content="配方管理" Style="{DynamicResource RadioNavigation}"
Click="NavButton_Click" Tag="RecipeManager"/>
<RadioButton Content="原料管理" Style="{DynamicResource RadioNavigation}"
Click="NavButton_Click" Tag="MaterialManager"/>
<RadioButton Content="工艺参数" Style="{DynamicResource RadioNavigation}"
Click="NavButton_Click" Tag="TechnologySetting"/>
<RadioButton Content="权限分配" Style="{DynamicResource RadioNavigation}"
Click="NavButton_Click" Tag="PowerManager"/>
MouseLeftButtonDown="mylistview_MouseDown" >
<RadioButton Style="{DynamicResource RadioNavigation}" IsChecked="True" Template="{DynamicResource butonTempalte }"
Click="NavButton_Click" Tag="OrderManager">
<Grid Background="Transparent" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="&#xe737;" Style="{DynamicResource fonticon}"/>
<TextBlock Grid.Column="1" Foreground="White" Text="订单管理" FontSize="24" Background="Transparent"
VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="楷体"/>

</Grid>
</RadioButton>
<RadioButton Style="{DynamicResource RadioNavigation}" Template="{DynamicResource butonTempalte }"
Click="NavButton_Click" Tag="RecipeManager">
<Grid Background="Transparent" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="&#xe683;" Style="{DynamicResource fonticon}"/>
<TextBlock Grid.Column="1" Foreground="White" Text="配方管理" FontSize="24" Background="Transparent"
VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="楷体"/>
</Grid>
</RadioButton>
<RadioButton Style="{DynamicResource RadioNavigation}" Template="{DynamicResource butonTempalte }"
Click="NavButton_Click" Tag="MaterialManager">
<Grid Background="Transparent" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="&#xe63b;" Style="{DynamicResource fonticon}"/>
<TextBlock Grid.Column="1" Foreground="White" Text="原料管理" FontSize="24" Background="Transparent"
VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="楷体"/>

</Grid>
</RadioButton>
<!--<RadioButton Style="{DynamicResource RadioNavigation}" Template="{DynamicResource butonTempalte }"
Click="NavButton_Click" Tag="TechnologySetting">
<Grid Background="Transparent" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="&#xe69b;" Style="{DynamicResource fonticon}"/>
<TextBlock Grid.Column="1" Foreground="White" Text="工艺参数" FontSize="24" Background="Transparent"
VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="楷体"/>

</Grid>
</RadioButton>-->
<RadioButton Style="{DynamicResource RadioNavigation}" Template="{DynamicResource butonTempalte }"
Click="NavButton_Click" Tag="PowerManager">
<Grid Background="Transparent" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="&#xe60c;" Style="{DynamicResource fonticon}"/>
<TextBlock Grid.Column="1" Foreground="White" Text="权限分配" FontSize="24" Background="Transparent"
VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="楷体"/>

</Grid>
</RadioButton>
</StackPanel>


+ 12
- 1
BPASmart.RecipeManagement/MainWindow.xaml.cs View File

@@ -24,7 +24,18 @@ namespace BPASmart.RecipeManagement
public MainWindow()
{
InitializeComponent();
this.br.MouseLeftButtonDown += (o, e) =>
{
if (e.ClickCount > 1)
{
if (this.WindowState == WindowState.Maximized)
this.WindowState = WindowState.Normal;
else if (this.WindowState == WindowState.Normal)
this.WindowState = WindowState.Maximized;
}
};

}

private void mylistview_MouseDown(object sender, MouseButtonEventArgs e)


+ 56
- 45
BPASmart.RecipeManagement/View/CreateOrder.xaml View File

@@ -6,7 +6,7 @@
xmlns:local="clr-namespace:BPASmart.RecipeManagement.View"
xmlns:vm="clr-namespace:BPASmart.RecipeManagement.ViewModel"
mc:Ignorable="d"
Title="CreateOrder" Height="250" Width="400" WindowStartupLocation="CenterScreen" WindowStyle="None" Background="White" MouseLeftButtonDown="Window_MouseLeftButtonDown"
Title="CreateOrder" Height="300" Width="500" WindowStartupLocation="CenterScreen" WindowStyle="None" Background="Transparent" MouseLeftButtonDown="Window_MouseLeftButtonDown"
AllowsTransparency="True" Foreground="#FF2AB2E7">
<Window.DataContext>
<vm:CreateOrderViewModel/>
@@ -14,31 +14,38 @@
<Window.Resources>
</Window.Resources>
<Grid Background="#264c73">
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="*"/>
<RowDefinition Height="40"/>
</Grid.RowDefinitions>
<Button Content="增加配方" Width="100" Height="30" HorizontalAlignment="Right" Margin="10,0" Style="{DynamicResource ButtonStyle}"
<Border>
<Border.Background>
<ImageBrush ImageSource="../image/容器边框.png"/>
</Border.Background>
<Grid Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="50"/>
<RowDefinition Height="*"/>
<RowDefinition Height="40"/>
<RowDefinition Height="5"/>
</Grid.RowDefinitions>
<TextBlock Text="创建订单" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="20" Margin="0,3,0,0 "/>
<Button Content="添加配方" Width="80" Height="24" HorizontalAlignment="Right" Margin="10,10,2,0" VerticalAlignment="Bottom"
Style="{DynamicResource ButtonStyle}"
Command="{Binding AddRecipeCommand}"/>

<Border Grid.Row="1" BorderBrush="#B0E2FF" BorderThickness="0,1">
<ItemsControl ItemsSource="{Binding recipes}" Grid.Row="1" HorizontalAlignment="Center">
<ItemsControl.ItemTemplate>
<DataTemplate>
<RadioButton GroupName="all">
<RadioButton.Template>
<ControlTemplate TargetType="RadioButton">
<Border Background="Transparent" BorderBrush="Transparent" BorderThickness="1">
<Grid Name="gr" Height="40">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150"/>
<ColumnDefinition Width="100" />
<ColumnDefinition Width="60" />
</Grid.ColumnDefinitions>
<Border Grid.Row="1" BorderBrush="#B0E2FF" BorderThickness="0,1">
<ItemsControl ItemsSource="{Binding recipes}" Grid.Row="1" HorizontalAlignment="Center">
<ItemsControl.ItemTemplate>
<DataTemplate>
<RadioButton GroupName="all">
<RadioButton.Template>
<ControlTemplate TargetType="RadioButton">
<Border Background="Transparent" BorderBrush="Transparent" BorderThickness="1">
<Grid Name="gr" Height="40">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150"/>
<ColumnDefinition Width="100" />
<ColumnDefinition Width="60" />
</Grid.ColumnDefinitions>

<ComboBox
<ComboBox
Name="cb"
Grid.Column="0"
Margin="3,1"
@@ -52,11 +59,11 @@
/>


<StackPanel
<StackPanel
Grid.Column="1"
VerticalAlignment="Center"
Orientation="Horizontal">
<TextBox
<TextBox
Name="tb"
Foreground="Orange"
Background="Transparent"
@@ -66,9 +73,10 @@
Margin="3,1"
VerticalAlignment="Center"
FontSize="20"
Text="{Binding RecipeCount}" />
Text="{Binding RecipeCount}"
/>

<TextBlock
<TextBlock
Grid.Column="1"
Foreground="#FF2AB2E7"
Margin="0,0,8,4"
@@ -77,9 +85,9 @@
FontSize="20"
Text="单" />

</StackPanel>
</StackPanel>

<Button
<Button
Grid.Column="2"
Width="50"
Height="24" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7"
@@ -89,25 +97,28 @@
CommandParameter="{Binding ID}"
Content="删 除" />

</Grid>
</Border>
</Grid>
</Border>

</ControlTemplate>
</RadioButton.Template>
</RadioButton>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Border>
</ControlTemplate>
</RadioButton.Template>
</RadioButton>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Border>

<StackPanel Grid.Row="4" Grid.ColumnSpan="3" Orientation="Horizontal"
<StackPanel Grid.Row="2" Grid.ColumnSpan="3" Orientation="Horizontal"
HorizontalAlignment="Center" VerticalAlignment="Center">
<Button Content="保存" FontSize="22" Width="120" Height="30" Margin="10,2" Background="Transparent"
BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7"
<Button Content="保存" FontSize="18" Width="100" Height="24" Margin="10,2" Background="Transparent"
HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Style="{DynamicResource ButtonStyle}"
Command="{Binding SaveCommand}"/>
<Button Content="取消" FontSize="22" Width="120" Height="30" Margin="10,2" Background="Transparent"
BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7"
<Button Content="取消" FontSize="18" Width="100" Height="24" Margin="10,2" Background="Transparent"
HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Style="{DynamicResource ButtonStyle}"
Click="Button_Click"/>
</StackPanel>
</Grid>
</StackPanel>
</Grid>
</Border>
</Window>

+ 101
- 64
BPASmart.RecipeManagement/View/MaterialConfigure.xaml View File

@@ -14,95 +14,132 @@
<Window.Resources>
</Window.Resources>
<Border CornerRadius="20" Background="#264c73" >
<Border >
<Grid Width="900">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="17*"/>
<ColumnDefinition Width="33*"/>
<ColumnDefinition Width="40"/>
<ColumnDefinition Width="400"/>
<ColumnDefinition Width="500"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition />
<RowDefinition />
<RowDefinition Height="40"/>
<RowDefinition />
</Grid.RowDefinitions>
<TextBlock Text="原料名称:" FontSize="22"
<Border Background="#264c73" CornerRadius="20" >
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="17*"/>
<ColumnDefinition Width="33*"/>
<ColumnDefinition Width="40"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition />
<RowDefinition />
<RowDefinition Height="40"/>
<RowDefinition />
</Grid.RowDefinitions>
<TextBlock Text="原料名称:" FontSize="22"
HorizontalAlignment="Center" VerticalAlignment="Center" Height="28" Width="92"/>
<TextBlock Text="原料种类:" FontSize="22" Grid.Row="1"
<TextBlock Text="原料种类:" FontSize="22" Grid.Row="1"
HorizontalAlignment="Center" VerticalAlignment="Center" Height="28" Width="92"/>
<TextBlock Text="原料位置:" FontSize="22" Grid.Row="2"
<TextBlock Text="原料位置:" FontSize="22" Grid.Row="2"
HorizontalAlignment="Center" VerticalAlignment="Center" Height="28" Width="92"/>
<TextBox Text="{Binding MaterialName}" FontSize="22" Grid.Column="1" Width="200" Height="40" Background="Transparent" Foreground="Orange"
<TextBox Text="{Binding MaterialName}" FontSize="22" Grid.Column="1" Width="200" Height="40" Background="Transparent" Foreground="Orange"
VerticalAlignment="Center" HorizontalAlignment="Center" BorderBrush="#FF2AB2E7"
VerticalContentAlignment="Center" HorizontalContentAlignment="Center"/>
<ComboBox ItemsSource="{Binding MaterialTypes}"
<ComboBox ItemsSource="{Binding MaterialTypes}"
FontSize="18" Foreground="#FF2AB2E7"
Grid.Column="1" Grid.Row="1" Width="200" Height="40"
SelectedItem="{Binding MaterialType}" />
<TextBox Text="{Binding MaterialPosion}" FontSize="22" Grid.Column="1" Grid.Row="2"
<TextBox Text="{Binding MaterialPosion}" FontSize="22" Grid.Column="1" Grid.Row="2"
Width="100" Height="40" Background="Transparent" Foreground="Orange"
HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
VerticalAlignment="Center" HorizontalAlignment="Center" BorderBrush="#FF2AB2E7"/>
<TextBlock Text="{Binding ErrorMessage}" Grid.Row="3" Grid.ColumnSpan=" 2"
<TextBlock Text="{Binding ErrorMessage}" Grid.Row="3" Grid.ColumnSpan=" 2"
Foreground="Red" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<StackPanel Grid.Row="4" Grid.ColumnSpan="2" Orientation="Horizontal"
<StackPanel Grid.Row="4" Grid.ColumnSpan="2" Orientation="Horizontal"
HorizontalAlignment="Center" VerticalAlignment="Center">
<Button Content="保存" FontSize="22" Width="120" Height="36" Margin="10" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7"
Command="{Binding SaveCommand}"/>
<Button Content="取消" FontSize="22" Width="120" Height="36" Margin="10" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7"
Click="Button_Click"/>
</StackPanel>
<Button x:Name="expand" Grid.Column="2" Grid.RowSpan="5" HorizontalAlignment="Center" VerticalAlignment="Center" Style="{DynamicResource ButtonStyle}"
Click="expand_Click" >
<Grid>
<Button Content="保存" FontSize="18" Width="120" Height="28" Margin="10" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7"
Command="{Binding SaveCommand}" Style="{DynamicResource ButtonStyle}"/>
<Button Content="取消" FontSize="18" Width="120" Height="28" Margin="10" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7"
Click="Button_Click" Style="{DynamicResource ButtonStyle}"/>

</StackPanel>
<Button x:Name="expand" Grid.Column="2" Grid.RowSpan="5" HorizontalAlignment="Right" VerticalAlignment="Center" Style="{DynamicResource ButtonStyle}"
Click="expand_Click" BorderThickness="1,1,0,1">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Text="拓展属性" TextWrapping="Wrap" FontSize="16" HorizontalAlignment="Center"
VerticalAlignment="Center" Width="20" FontFamily="楷体"/>

</Grid>
</Button>


</Grid>
</Border>

<Border Grid.Column="1" Background="#264c73" BorderThickness="1,0,0,0" CornerRadius="20,20,20,20">
<Grid >
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition/>
<RowDefinition Height="20"/>
<RowDefinition Height="30"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBlock Text="拓展属性" TextWrapping="Wrap" FontSize="18" HorizontalAlignment="Center" />
<Image x:Name="expandImage" Source="../image/right.png" Grid.Row="1" Width="22" Margin="0,5"/>
</Grid>
</Button>
<ScrollViewer Grid.Column="3"
Grid.RowSpan="5"
<Border Grid.Row="1" Background="#dd2AB2E7" >
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="120"/>
<ColumnDefinition Width="*"/>

</Grid.ColumnDefinitions>
<TextBlock Text="属性名称" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20" Foreground="White"/>
<TextBlock Grid.Column="1" Text="属性值" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,0,40,0" FontSize="20" Foreground="White"/>
</Grid>
</Border>

<ScrollViewer Grid.Row="2"
HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Hidden" Margin="10,5">
<Border Background="Transparent" BorderBrush="White" BorderThickness="1,0,0,0">
<ListBox Margin="5,20" Background="Transparent" BorderBrush="Transparent" Foreground="#FF2AB2E7" FontSize="20" HorizontalAlignment="Left"
<Border Background="Transparent" BorderBrush="Transparent" BorderThickness="1,0,0,0">
<ListBox Margin="5,0" Width="380" Background="Transparent" BorderBrush="Transparent" Foreground="#FF2AB2E7" FontSize="16" HorizontalAlignment="Left"
VerticalAlignment="Top"
ItemsSource="{Binding currentProperty}">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding PropertyName}" Margin="0,5,2,0" >
<TextBlock.ToolTip >
<TextBlock Text="{Binding PropertyDescription}"/>
</TextBlock.ToolTip>
</TextBlock>
<TextBlock Grid.Column="1" Text=":" Margin="0,5,0,0"/>
<TextBox Grid.Column="2" Text="{Binding PropertyValue}" Background="Transparent" Foreground="Orange"
BorderBrush="#FF2AB2E7" VerticalAlignment="Center" HorizontalContentAlignment="Center"
Width="150" Margin="20,5"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="140"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding PropertyName}" Margin="0,5,2,0" >
<TextBlock.ToolTip >
<TextBlock Text="{Binding PropertyDescription}"/>
</TextBlock.ToolTip>
</TextBlock>
<TextBlock Text=":" Margin="0,5,0,0"/>
</StackPanel>
<TextBox Grid.Column="2" Text="{Binding PropertyValue}" Background="Transparent" Foreground="Orange"
BorderBrush="#FF2AB2E7" VerticalAlignment="Center" HorizontalAlignment="Center" HorizontalContentAlignment="Center" MinWidth="110"
Margin="20,5"/>
</Grid>
</DataTemplate>

</ListBox>
</Border>
</ScrollViewer>
</ListBox.ItemTemplate>

</ListBox>
</Border>
</ScrollViewer>

</Grid>
</Border>

</Grid>
</Border>
</Window>

+ 2
- 2
BPASmart.RecipeManagement/View/MaterialConfigure.xaml.cs View File

@@ -46,13 +46,13 @@ namespace BPASmart.RecipeManagement.View
{
this.Width = 500;
isExpend = false;
expandImage.Source = new BitmapImage(new Uri("pack://application:,,,/Image/right.png"));
}
else
{
this.Width = 900;
isExpend = true;
expandImage.Source = new BitmapImage(new Uri("pack://application:,,,/Image/left.png"));
}
}


+ 93
- 133
BPASmart.RecipeManagement/View/MaterialManager.xaml View File

@@ -17,41 +17,40 @@
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListViewItem">
<Border x:Name="mborder" BorderBrush="#009AC0" BorderThickness="2,5 " CornerRadius="10">
<Border.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
<GradientStop Color="#4F94CD" Offset="0"/>
<GradientStop Color="White" Offset="0.3"/>
<GradientStop Color="White" Offset="0.7"/>
<GradientStop Color="#4F94CD" Offset="1" />
</LinearGradientBrush>
</Border.Background>
<Grid Width="100" >
<Border Padding="4" Opacity="0.7" x:Name="mborder" BorderBrush="Transparent" BorderThickness="1">
<Border >
<Border.Background>
<ImageBrush ImageSource="../image/蓝边框.png"/>
</Border.Background>
<Grid Width="100" >
<Grid.RowDefinitions>
<RowDefinition Height="60"/>
<RowDefinition Height="25"/>
<RowDefinition Height="25"/>
<RowDefinition Height="5"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding MaterialPosion}" Height="20" Width="20" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10,0"/>
<TextBlock Text="{Binding Name}" Grid.ColumnSpan="2"
<TextBlock Text="{Binding MaterialPosion}" Foreground="White" Height="20" Width="20" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10,0"/>
<TextBlock Text="{Binding Name}" Grid.ColumnSpan="2" Foreground="Orange"
FontSize="24"
HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
<TextBlock Grid.Row="1" Text="种类:" FontSize="16" VerticalAlignment="Center" HorizontalAlignment="Right"/>
<TextBlock Grid.Row="1" Text="种类:" Foreground="#FF2AB2E7" FontSize="16" VerticalAlignment="Center" HorizontalAlignment="Right"/>
<TextBlock Grid.Row="1" Grid.Column="1" FontSize="16"
VerticalAlignment="Center" HorizontalAlignment="Left"
VerticalAlignment="Center" HorizontalAlignment="Left" Foreground="#FF2AB2E7"
Text="{Binding MaterialType}" TextAlignment="Center"></TextBlock>
</Grid>
</Border>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="BorderBrush" Value="orange" TargetName="mborder"/>
<Setter Property="BorderBrush" Value="#4169E1" TargetName="mborder"/>
<Setter Property="Opacity" Value="1" TargetName="mborder"/>
</Trigger>
<Trigger Property="IsFocused" Value="True">
@@ -62,128 +61,89 @@
</Setter>
</Style>

<Style TargetType="{x:Type ContextMenu}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ContextMenu}">
<Border x:Name="Border" CornerRadius="4" Background="#009ACD" BorderThickness="1" Margin="0">
<Border.BorderBrush>
<SolidColorBrush Color="#104E8B" />
</Border.BorderBrush>
<ItemsPresenter/>
</Border>
<ControlTemplate.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="True"/>
</MultiTrigger.Conditions>
<MultiTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(FrameworkElement.Width)">
<SplineDoubleKeyFrame KeyTime="00:00:00.0020000" Value="0"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.20000" Value="110"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(FrameworkElement.Height)">
<SplineDoubleKeyFrame KeyTime="00:00:00.0020000" Value="0"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.20000" Value="100"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</MultiTrigger.EnterActions>
</MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type MenuItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type MenuItem}">
<Border Margin="0,5" MinWidth="80" CornerRadius="5">
<Border.Background>
<SolidColorBrush x:Name="MyAnimatedBrushBackground" Color="Transparent" />
</Border.Background>
<StackPanel Orientation="Horizontal">
<TextBlock Text=" "/>
<ContentPresenter ContentSource="Icon" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBlock Text=" "/>
<ContentPresenter ContentSource="Header" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</StackPanel>
</Border>
<ControlTemplate.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="True"/>
</MultiTrigger.Conditions>
<MultiTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MyAnimatedBrushBackground" Storyboard.TargetProperty="Color">
<LinearColorKeyFrame Value="Transparent" KeyTime="00:00:00.0020000" />
<LinearColorKeyFrame Value="#B0E2FF" KeyTime="00:00:00.0320000" />
</ColorAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</MultiTrigger.EnterActions>
<MultiTrigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MyAnimatedBrushBackground" Storyboard.TargetProperty="Color">
<LinearColorKeyFrame Value="#7E9C9C9C" KeyTime="00:00:00.0020000" />
<LinearColorKeyFrame Value="Transparent" KeyTime="00:00:00.0320000" />
</ColorAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</MultiTrigger.ExitActions>
</MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</UserControl.Resources>
<Grid Background="Transparent">
<Grid.ColumnDefinitions>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid Grid.RowSpan="2">
<Border>
<Border.Background>
<ImageBrush ImageSource="../image/中间.png"/>
</Border.Background>
<Grid Background="Transparent">
<Grid.ColumnDefinitions>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="*"/>
<RowDefinition Height="20*"/>
<RowDefinition Height="20*"/>
</Grid.RowDefinitions>
<TextBlock Text="原料清单" FontSize="28" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<Button x:Name="MateraisProperty" Style="{DynamicResource ButtonStyle}" Content="原料扩展属性"
<Grid Grid.RowSpan="2" Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="30"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBlock Text="原料清单" FontSize="28" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<Button Grid.Row="1" x:Name="MateraisProperty" Style="{DynamicResource CommonButton}" Content="原料扩展属性"
VerticalAlignment="Center" HorizontalAlignment="Right"
FontSize="16" Margin="0,7,20,0" Height="34" Width="150"
FontSize="14" Margin="0,0,20,0" Height="26" Width="120"
Click="MateraisProperty_Click"/>
<ListView x:Name="mylistview" Grid.Row="1"
ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemsSource="{Binding MaterialList}" Margin=" 10" Background="Transparent" >
<ListView.ContextMenu>
<ContextMenu FontSize="16" Foreground="White">
<MenuItem Header="新建原料" Name="MenuAdd" Command="{Binding CreateMaterailCommand}"></MenuItem>
<MenuItem Header="编辑原料" Name="MenuEdit"
Command="{Binding EditMaterailCommand }"
CommandParameter="{Binding PlacementTarget.SelectedIndex,RelativeSource={RelativeSource AncestorType=ContextMenu}}"></MenuItem>
<MenuItem Header="删除原料" Name="MenuDelete"
<ListView x:Name="mylistview" Grid.Row="2"
ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemsSource="{Binding MaterialList}" Margin=" 0" Background="Transparent"
BorderBrush="Transparent">

<ListView.ContextMenu>
<ContextMenu FontSize="16" Foreground="White">
<MenuItem Name="MenuAdd" Command="{Binding CreateMaterailCommand}">
<MenuItem.Header>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Style="{DynamicResource menuText}" Text="&#xe64d;"/>
<TextBlock Grid.Column="1" Text="新建原料" Style="{DynamicResource menuText}" FontFamily="楷体"/>
</Grid>
</MenuItem.Header>
</MenuItem>
<MenuItem Command="{Binding EditMaterailCommand }"
CommandParameter="{Binding PlacementTarget.SelectedIndex,RelativeSource={RelativeSource AncestorType=ContextMenu}}">
<MenuItem.Header>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Style="{DynamicResource menuText}" Text="&#xf0213;"/>
<TextBlock Grid.Column="1" Text="编辑原料" Style="{DynamicResource menuText}" FontFamily="楷体" />
</Grid>
</MenuItem.Header>
</MenuItem>
<MenuItem Name="MenuDelete"
Command="{Binding DeleteMaterailCommand}"
CommandParameter="{Binding PlacementTarget.SelectedIndex,RelativeSource={RelativeSource AncestorType=ContextMenu}}"></MenuItem>
</ContextMenu>
</ListView.ContextMenu>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Margin="10"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListView>
CommandParameter="{Binding PlacementTarget.SelectedIndex,RelativeSource={RelativeSource AncestorType=ContextMenu}}">
<MenuItem.Header>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Style="{DynamicResource menuText}" Text="&#xe8c1;"/>
<TextBlock Grid.Column="1" Text="删除原料" Style="{DynamicResource menuText}" FontFamily="楷体" />
</Grid>
</MenuItem.Header>
</MenuItem>
</ContextMenu>
</ListView.ContextMenu>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Margin="10"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>



</ListView>
</Grid>
</Grid>
</Grid>
</Border>
</UserControl>

+ 86
- 55
BPASmart.RecipeManagement/View/OrderManager.xaml View File

@@ -6,7 +6,7 @@
xmlns:local="clr-namespace:BPASmart.RecipeManagement.View"
xmlns:vm ="clr-namespace:BPASmart.RecipeManagement.ViewModel"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800" Background="Transparent">
d:DesignHeight="450" d:DesignWidth="800" Background="Transparent" Foreground="#FF2AB2E7">
<UserControl.DataContext>
<vm:OrderManagerViewModel/>
</UserControl.DataContext>
@@ -15,11 +15,12 @@
<Setter Property="Margin" Value="2"/>
<Setter Property="FontSize" Value="22"/>
<Setter Property="FontWeight" Value="Black"/>
<Setter Property="Background" Value="#104E8B"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="FontFamily" Value="楷体"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBoxItem">
<Border BorderBrush="Black" BorderThickness="0" Background="{TemplateBinding Background}">
<Border BorderBrush="Black" BorderThickness="0" Background="Transparent">
<Grid HorizontalAlignment="Center" Margin="10 ">
<Grid.RowDefinitions>
<RowDefinition/>
@@ -35,21 +36,27 @@
Margin="5,0,0,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Foreground="Orange"
Foreground="#aa2AB2E7"
FontFamily="微软雅黑"
FontWeight="Light"
Text="配方:" />
<TextBlock
Grid.Row="1"
Margin="5,0,0,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Foreground="Orange"
Foreground="#aa2AB2E7"
FontFamily="微软雅黑"
FontWeight="Light"
Text="数量:" />
<TextBlock
Grid.Row="2"
Margin="5,0,0,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Foreground="Orange"
Foreground="#aa2AB2E7"
FontFamily="微软雅黑"
FontWeight="Light"
Text="已完成:" />
<TextBlock
Grid.Row="0"
@@ -57,16 +64,19 @@
Margin="5,0,0,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Foreground="Orange"
Foreground="#aa2AB2E7"
FontFamily="微软雅黑"
FontWeight="Light"
Text="{Binding Name}" />
<TextBlock
Grid.Row="1"
Grid.Column="1"
Margin="5,0,0,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Foreground="Orange"
Foreground="#aa2AB2E7"
FontFamily="微软雅黑"
FontWeight="Light"
Text="{Binding RecipeCount}" />
<TextBlock
Grid.Row="2"
@@ -74,7 +84,9 @@
Margin="5,0,0,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Foreground="Orange"
Foreground="#aa2AB2E7"
FontFamily="微软雅黑"
FontWeight="Light"
Text="" />
</Grid>
</Border>
@@ -84,71 +96,81 @@
</Style>
<Style TargetType="ListViewItem" >
<Setter Property="Margin" Value="10"/>
<Setter Property="Background" Value="#104E8B"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListViewItem">
<Border x:Name="mborder" BorderBrush="#009AC0" BorderThickness="5,5,5,5" CornerRadius="5,5,5,5" Margin="10"
Background="#104E8B">
<Grid
<Border x:Name="mborder" Margin="10" Padding="2" BorderThickness="1" BorderBrush="Transparent" Opacity="0.7"
>
<Border>
<Border.Background>
<ImageBrush ImageSource="../image/边框效果2.png"/>
</Border.Background>
<Grid
Background="Transparent"
Name="tt"
Height="250"
Width="300"
Margin="5">
<Grid.RowDefinitions>
<RowDefinition Height="30" />
<RowDefinition Height="*" />
<RowDefinition Height="2" />
<RowDefinition Height="40" />
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock
<Grid.RowDefinitions>
<RowDefinition Height="30" />
<RowDefinition Height="*" />
<RowDefinition Height="4" />
<RowDefinition Height="40" />
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock
Grid.Row="0"
Margin="2,5,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Top"
FontSize="18"
Foreground="White"
FontFamily="楷体"
Text="下单时间: " />
<TextBlock
<TextBlock
Grid.Row="0"
Margin="2,5,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Top"
FontSize="18"
Foreground="White"
FontFamily="楷体"
Text="{Binding OrderdateTime}" />
</StackPanel>
<ScrollViewer
</StackPanel>
<ScrollViewer
Grid.Row="1"
Margin="20,10"
VerticalAlignment="Top"
Background="#104E8B"
Background="#11F53F62"
HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Auto">
<ListBox ItemsSource="{Binding Recipes}" FontFamily="楷体" Background="#104E8B" >
</ListBox>
<ListBox ItemsSource="{Binding Recipes}" FontFamily="楷体" BorderBrush="Transparent" Background="Transparent" >
</ListBox>

</ScrollViewer>
<StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button Content="执行订单" Width="100" Height="24" HorizontalAlignment="Right" Margin="10,0"
Style="{DynamicResource ButtonStyle}"
</ScrollViewer>
<Image Grid.Row="2" Source="../image/直线.png" Stretch="Fill"/>
<StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button Content="执行订单" Width="100" Height="24" HorizontalAlignment="Right" Margin="10,0" Foreground="#ff2bd06f"
BorderBrush="Transparent" Background="#332bd06f" Opacity="0.9" Style="{DynamicResource GreenButton}"
Command="{Binding }"
/>
<Button Content="删除订单" Width="100" Height="24" HorizontalAlignment="Right" Margin="10,0"
Style="{DynamicResource ButtonStyle}"
<Button Content="删除订单" Width="100" Height="24" HorizontalAlignment="Right" Margin="10,0" Foreground="#FFF53F62"
BorderBrush="Transparent" Background="#24F53F62" Opacity="0.9"
Style="{DynamicResource DeleteButton}"
Command="{Binding }"
CommandParameter="{Binding}"/>
</StackPanel>
</Grid>
</StackPanel>
</Grid>
</Border>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="BorderBrush" Value="#D2B48C" TargetName="mborder"/>
<Setter Property="BorderBrush" Value="#4169E1" TargetName="mborder"/>
<Setter Property="Opacity" Value="1" TargetName="mborder"/>
</Trigger>
<Trigger Property="IsFocused" Value="True">

@@ -159,21 +181,30 @@
</Setter>
</Style>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition />
</Grid.RowDefinitions>
<Button Content="创建订单" Width="100" Height="30" HorizontalAlignment="Right" Margin="10,0" Style="{DynamicResource ButtonStyle}"
<Border>
<Border.Background>
<ImageBrush ImageSource="../image/中间.png"/>
</Border.Background>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="17"/>
<RowDefinition Height="40"/>
<RowDefinition Height="28"/>
<RowDefinition />
</Grid.RowDefinitions>
<TextBlock Grid.Row="1" Text="订单列表" FontSize="28" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<Button Grid.Row="2" Content="创建订单" Width="100" Height="28" HorizontalAlignment="Right" Margin="20,0" Style="{DynamicResource CommonButton}"
Command="{Binding CreateOrderCommand}"/>
<ListView Grid.Row="1" Background="Transparent" Margin="10"
<ListView Grid.Row="3" Margin="0" Background="Transparent" BorderBrush="Transparent"
ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemsSource="{Binding orders}" >
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Margin="10"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListView>
</Grid>

<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Margin="10"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListView>
</Grid>
</Border>
</UserControl>

+ 280
- 230
BPASmart.RecipeManagement/View/PowerManager.xaml View File

@@ -6,11 +6,12 @@
xmlns:local="clr-namespace:BPASmart.RecipeManagement.View"
xmlns:vm="clr-namespace:BPASmart.RecipeManagement.ViewModel"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800" Foreground="#FF2AB2E7">
d:DesignHeight="450" d:DesignWidth="800" Foreground="#FF2AB2E7" FontFamily="楷体">
<UserControl.DataContext>
<vm:PowerManagerViewModel/>
</UserControl.DataContext>
<UserControl.Resources>
<ImageBrush x:Key="powerback" ImageSource="../Image/边框元素1.png"/>
<ImageBrush x:Key="ImageBrushAddBlue" ImageSource="../Image/AddGreen.png"></ImageBrush>
<ImageBrush x:Key="ImageBrushAddGray" ImageSource="../Image/Delete.png"></ImageBrush>

@@ -99,263 +100,312 @@
</Grid>
</ControlTemplate>
</UserControl.Resources>
<Grid Margin="0,10">
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="20"/>
<RowDefinition Height="40"/>
<RowDefinition />
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="选择用户" FontSize="22" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="20,0"/>
<ComboBox Width="120" Margin="20,0" ItemsSource="{Binding UserName }" FontSize="16" Foreground="#FF2AB2E7"/>
<Button Style="{DynamicResource CommonButton}" Margin="20,0"
<Border>
<Border.Background>
<ImageBrush ImageSource="../image/背景.png"/>
</Border.Background>

<Grid Margin="0,10">
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="20"/>
<RowDefinition Height="40"/>
<RowDefinition />
</Grid.RowDefinitions>

<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="选择用户" FontSize="22" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="20,0"/>
<ComboBox Width="120" Margin="20,0" ItemsSource="{Binding UserName }" FontSize="16" Foreground="#FF2AB2E7"/>
<Button Style="{DynamicResource ButtonStyle}" Margin="20,0" Content="保 存"
FontSize="18" Height="30" Width="120"
Command="{Binding SaveCommand}" CommandParameter="Materials">
<TextBlock Text="保存" TextWrapping="Wrap"/>
</Button>
</Button>

</StackPanel>
</StackPanel>

<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBlock Text="原料权限" FontSize="22" VerticalAlignment="Bottom" HorizontalAlignment="Center" />
<TextBlock Grid.Column="1" Text="配方权限" FontSize="22" VerticalAlignment="Bottom" HorizontalAlignment="Center" />
</Grid>
<Grid Grid.Row="3" Margin="5,10,5,50">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="70"/>
<ColumnDefinition/>
<ColumnDefinition Width="20"/>
<ColumnDefinition/>
<ColumnDefinition Width="70"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<!--#region原料权限-->
<Border Grid.Column="0" BorderBrush="#1874CD" BorderThickness="1" />
<Border Grid.Column="2" BorderBrush="#1874CD" BorderThickness="1" />
<ScrollViewer Margin="5" Template="{StaticResource ScrollViewerControlTemplate1}" CanContentScroll="True"
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Width="150">
<Border.Background>
<ImageBrush ImageSource="../Image/元素1.png"/>
</Border.Background>
<TextBlock Text="原料权限" FontSize="20" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="5" />
</Border>
<Border Width="150" Grid.Column="1">
<Border.Background>
<ImageBrush ImageSource="../Image/元素1.png"/>
</Border.Background>
<TextBlock Text="配方权限" FontSize="20" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="5" />
</Border>

</Grid>
<Grid Grid.Row="3" Margin="5,10,5,50">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="80"/>
<ColumnDefinition/>
<ColumnDefinition Width="20"/>
<ColumnDefinition/>
<ColumnDefinition Width="80"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<!--#region原料权限-->
<Border Grid.Column="0" Margin="10,0,10,0" CornerRadius="5" Background="{DynamicResource powerback}" >
<ScrollViewer Margin="20,42" Template="{StaticResource ScrollViewerControlTemplate1}" CanContentScroll="True"
Width="auto">
<ListBox Background="Transparent" ItemContainerStyle="{StaticResource ItemContainer}" FocusVisualStyle="{x:Null}"
<ListBox Background="Transparent" ItemContainerStyle="{StaticResource ItemContainer}" FocusVisualStyle="{x:Null}"
ItemsSource="{Binding AllMaterials}" >
<ListBox.Template>
<ControlTemplate>
<StackPanel Background="Transparent" IsItemsHost="True"></StackPanel>
</ControlTemplate>
</ListBox.Template>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Height="28" Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="60"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock x:Name="tb_Name" Text="{Binding Name}" Foreground="White" FontSize="18" VerticalAlignment="Center" HorizontalAlignment="Left" />
<Button x:Name="BtnDelete" Grid.Column="1" Background="Transparent" ToolTip="移除" VerticalAlignment="Center" HorizontalAlignment="Left"
<ListBox.Template>
<ControlTemplate>
<StackPanel Background="Transparent" IsItemsHost="True"></StackPanel>
</ControlTemplate>
</ListBox.Template>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Height="28" Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="60"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock x:Name="tb_Name" Text="{Binding Name}" Foreground="White" FontSize="18" VerticalAlignment="Center" HorizontalAlignment="Left" />
<Button x:Name="BtnDelete" Grid.Column="1" Background="Transparent" ToolTip="移除" VerticalAlignment="Center" HorizontalAlignment="Left"
Command="{Binding DataContext.AddMaterialCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}}"
CommandParameter="{Binding Path=Text,ElementName=tb_Name}">
<Button.Template>
<ControlTemplate TargetType="Button">
<Grid>
<Rectangle x:Name="BtnRetangle" Height="21" Width="21" Stroke="Transparent" StrokeThickness="1" VerticalAlignment="Center" HorizontalAlignment="Left">
<Rectangle.Fill>
<ImageBrush ImageSource="../Image/AddGreen.png"></ImageBrush>
</Rectangle.Fill>
</Rectangle>
<ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center" Content="{TemplateBinding Content}"></ContentPresenter>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="BtnRetangle" Property="Height" Value="24"></Setter>
<Setter TargetName="BtnRetangle" Property="Width" Value="24"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Template>
</Button>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</ScrollViewer>
<Button.Template>
<ControlTemplate TargetType="Button">
<Grid>
<Rectangle x:Name="BtnRetangle" Height="21" Width="21" Stroke="Transparent" StrokeThickness="1" VerticalAlignment="Center" HorizontalAlignment="Left">
<Rectangle.Fill>
<ImageBrush ImageSource="../Image/AddGreen.png"></ImageBrush>
</Rectangle.Fill>
</Rectangle>
<ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center" Content="{TemplateBinding Content}"></ContentPresenter>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="BtnRetangle" Property="Height" Value="24"></Setter>
<Setter TargetName="BtnRetangle" Property="Width" Value="24"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Template>
</Button>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</ScrollViewer>
</Border>

<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button Style="{DynamicResource ButtonStyle}"
FontSize="18" Height="60" Width="60" Margin="0,20"
Command="{Binding AddAllCommand}" CommandParameter="Materials">
<TextBlock Text="全部
添加" TextWrapping="Wrap"/>
</Button>
<Button Style="{DynamicResource ButtonStyle}"
FontSize="18" Height="60" Width="60" Margin="0,20"
<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" >

<Button
FontSize="14" Height="30" Width="100" Margin="0,20" VerticalAlignment="Center" HorizontalAlignment="Center"
Command="{Binding AddAllCommand}" CommandParameter="Materials" Style="{DynamicResource GreenButton}" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Image Source="../Image/增加.png" Width="15" Margin="2"/>
<TextBlock Grid.Column="1" Text="全部添加" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Grid>
</Button>

<Button Style="{DynamicResource DeleteButton}" VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="18" Height="30" Width="100" Margin="0,20"
Command="{Binding DeleteAllCommand}" CommandParameter="Materials">
<TextBlock Text="全部
移除" TextWrapping="Wrap"/>
</Button>
</StackPanel>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Image Source="../Image/移除.png" Width="15" Margin="2"/>
<TextBlock Grid.Column="1" Text="全部移除" FontSize="15" HorizontalAlignment="Center" VerticalAlignment="Center" />
</Grid>
</Button>
</StackPanel>
<Border Grid.Column="2" Background="{DynamicResource powerback}" Margin="10,0,10,0">

<ScrollViewer Grid.Column="2" Margin="5" Template="{StaticResource ScrollViewerControlTemplate1}" CanContentScroll="True">
<ListBox Background="Transparent" ItemContainerStyle="{StaticResource ItemContainer}" FocusVisualStyle="{x:Null}" Width="auto"
<ScrollViewer Grid.Column="2" Template="{StaticResource ScrollViewerControlTemplate1}" CanContentScroll="True" Margin="20,42">
<ListBox Background="Transparent" ItemContainerStyle="{StaticResource ItemContainer}" FocusVisualStyle="{x:Null}" Width="auto"
ItemsSource="{Binding UserMaterials}" >
<ListBox.Template>
<ControlTemplate>
<StackPanel Background="Transparent" IsItemsHost="True"></StackPanel>
</ControlTemplate>
</ListBox.Template>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Height="28" Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="60"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock x:Name="tb_Name" Text="{Binding Name}" Foreground="White" FontSize="18" VerticalAlignment="Center" HorizontalAlignment="Left" />
<Button x:Name="BtnDelete" Grid.Column="1" Background="Transparent" ToolTip="移除" VerticalAlignment="Center" HorizontalAlignment="Left"
<ListBox.Template>
<ControlTemplate>
<StackPanel Background="Transparent" IsItemsHost="True"></StackPanel>
</ControlTemplate>
</ListBox.Template>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Height="28" Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="60"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock x:Name="tb_Name" Text="{Binding Name}" Foreground="White" FontSize="18" VerticalAlignment="Center" HorizontalAlignment="Left" />
<Button x:Name="BtnDelete" Grid.Column="1" Background="Transparent" ToolTip="移除" VerticalAlignment="Center" HorizontalAlignment="Left"
Command="{Binding DataContext.DeleteMaterialCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}}"
CommandParameter="{Binding Path=Text,ElementName=tb_Name}">
<Button.Template>
<ControlTemplate TargetType="Button">
<Grid>
<Rectangle x:Name="BtnRetangle" Height="21" Width="21" Stroke="Transparent" StrokeThickness="1" VerticalAlignment="Center" HorizontalAlignment="Left">
<Rectangle.Fill>
<ImageBrush ImageSource="../Image/Delete.png"></ImageBrush>
</Rectangle.Fill>
</Rectangle>
<ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center" Content="{TemplateBinding Content}"></ContentPresenter>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="BtnRetangle" Property="Height" Value="24"></Setter>
<Setter TargetName="BtnRetangle" Property="Width" Value="24"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Template>
</Button>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</ScrollViewer>
<!--#endregion-->
<!--#region 配方权限-->
<Border Grid.Column="4" BorderBrush="#1874CD" BorderThickness="1" />
<Border Grid.Column="6" BorderBrush="#1874CD" BorderThickness="1" />
<ScrollViewer Grid.Column="4" Width="auto" Margin="5,5,5,5" Template="{StaticResource ScrollViewerControlTemplate1}" CanContentScroll="True" >
<ListBox Background="Transparent" ItemContainerStyle="{StaticResource ItemContainer}" FocusVisualStyle="{x:Null}"
<Button.Template>
<ControlTemplate TargetType="Button">
<Grid>
<Rectangle x:Name="BtnRetangle" Height="21" Width="21" Stroke="Transparent" StrokeThickness="1" VerticalAlignment="Center" HorizontalAlignment="Left">
<Rectangle.Fill>
<ImageBrush ImageSource="../Image/Delete.png"></ImageBrush>
</Rectangle.Fill>
</Rectangle>
<ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center" Content="{TemplateBinding Content}"></ContentPresenter>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="BtnRetangle" Property="Height" Value="24"></Setter>
<Setter TargetName="BtnRetangle" Property="Width" Value="24"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Template>
</Button>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</ScrollViewer>
</Border>
<!--#endregion-->
<!--#region 配方权限-->
<Border Grid.Column="4" Background="{DynamicResource powerback}" Margin="10,0,10,0">
<ScrollViewer Margin="20,42" Grid.Column="4" Width="auto" Template="{StaticResource ScrollViewerControlTemplate1}" CanContentScroll="True" >
<ListBox Background="Transparent" ItemContainerStyle="{StaticResource ItemContainer}" FocusVisualStyle="{x:Null}"
ItemsSource="{Binding AllRecipes}" >
<ListBox.Template>
<ControlTemplate>
<StackPanel Background="Transparent" IsItemsHost="True"></StackPanel>
</ControlTemplate>
</ListBox.Template>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Height="28" Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="60"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock x:Name="tb_Name" Text="{Binding Name}" Foreground="White" FontSize="18" VerticalAlignment="Center" HorizontalAlignment="Left" />
<Button x:Name="BtnDelete" Grid.Column="1" Background="Transparent" ToolTip="移除" VerticalAlignment="Center" HorizontalAlignment="Left"
<ListBox.Template>
<ControlTemplate>
<StackPanel Background="Transparent" IsItemsHost="True"></StackPanel>
</ControlTemplate>
</ListBox.Template>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Height="28" Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="60"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock x:Name="tb_Name" Text="{Binding Name}" Foreground="White" FontSize="18" VerticalAlignment="Center" HorizontalAlignment="Left" />
<Button x:Name="BtnDelete" Grid.Column="1" Background="Transparent" ToolTip="移除" VerticalAlignment="Center" HorizontalAlignment="Left"
Command="{Binding DataContext.AddRecipeCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}}"
CommandParameter="{Binding Path=Text,ElementName=tb_Name}">
<Button.Template>
<ControlTemplate TargetType="Button">
<Grid>
<Rectangle x:Name="BtnRetangle" Height="21" Width="21" Stroke="Transparent" StrokeThickness="1" VerticalAlignment="Center" HorizontalAlignment="Left">
<Rectangle.Fill>
<ImageBrush ImageSource="../Image/AddGreen.png"></ImageBrush>
</Rectangle.Fill>
</Rectangle>
<ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center" Content="{TemplateBinding Content}"></ContentPresenter>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="BtnRetangle" Property="Height" Value="24"></Setter>
<Setter TargetName="BtnRetangle" Property="Width" Value="24"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Template>
</Button>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</ScrollViewer>
<StackPanel Grid.Column="5" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button Style="{DynamicResource ButtonStyle}"
FontSize="18" Height="60" Width="60" Margin="0,20"
<Button.Template>
<ControlTemplate TargetType="Button">
<Grid>
<Rectangle x:Name="BtnRetangle" Height="21" Width="21" Stroke="Transparent" StrokeThickness="1" VerticalAlignment="Center" HorizontalAlignment="Left">
<Rectangle.Fill>
<ImageBrush ImageSource="../Image/AddGreen.png"></ImageBrush>
</Rectangle.Fill>
</Rectangle>
<ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center" Content="{TemplateBinding Content}"></ContentPresenter>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="BtnRetangle" Property="Height" Value="24"></Setter>
<Setter TargetName="BtnRetangle" Property="Width" Value="24"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Template>
</Button>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</ScrollViewer>
</Border>
<StackPanel Grid.Column="5" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button Style="{DynamicResource GreenButton}" HorizontalAlignment="Center" VerticalAlignment="Center"
FontSize="18" Height="30" Width="80" Margin="0,20"
Command="{Binding AddAllCommand}" CommandParameter="Recipes">
<TextBlock Text="全部
添加" TextWrapping="Wrap"/>
</Button>
<Button Style="{DynamicResource ButtonStyle}"
FontSize="18" Height="60" Width="60" Margin="0,20"
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Image Source="../Image/增加.png" Width="15" Margin="2"/>
<TextBlock Grid.Column="1" Text="全部添加" FontSize="15" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Grid>
</Button>
<Button Style="{DynamicResource DeleteButton}" HorizontalAlignment="Center" VerticalAlignment="Center"
FontSize="18" Height="30" Width="80" Margin="0,20"
Command="{Binding DeleteAllCommand}" CommandParameter="Recipes">
<TextBlock Text="全部
移除" TextWrapping="Wrap"/>
</Button>
</StackPanel>

<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Image Source="../Image/移除.png" Width="15" Margin="2"/>
<TextBlock Grid.Column="1" Text="全部移除" FontSize="15" HorizontalAlignment="Center" VerticalAlignment="Center" />
</Grid>
</Button>
</StackPanel>

<ScrollViewer Grid.Column="6" Margin="5" Template="{StaticResource ScrollViewerControlTemplate1}" CanContentScroll="True">
<ListBox Background="Transparent" ItemContainerStyle="{StaticResource ItemContainer}" FocusVisualStyle="{x:Null}"
<Border Grid.Column="6" Background="{DynamicResource powerback}" Margin="10,0,10,0">
<ScrollViewer Grid.Column="6" Margin="20,42" Template="{StaticResource ScrollViewerControlTemplate1}" CanContentScroll="True">
<ListBox Background="Transparent" ItemContainerStyle="{StaticResource ItemContainer}" FocusVisualStyle="{x:Null}"
Width="auto"
ItemsSource="{Binding UserRecipes}" >
<ListBox.Template>
<ControlTemplate>
<StackPanel Background="Transparent" IsItemsHost="True"></StackPanel>
</ControlTemplate>
</ListBox.Template>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Height="28" Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="60"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock x:Name="tb_Name" Text="{Binding Name}" Foreground="White" FontSize="18" VerticalAlignment="Center" HorizontalAlignment="Left" />
<Button x:Name="BtnDelete" Grid.Column="1" Background="Transparent" ToolTip="移除" VerticalAlignment="Center" HorizontalAlignment="Left"
<ListBox.Template>
<ControlTemplate>
<StackPanel Background="Transparent" IsItemsHost="True"></StackPanel>
</ControlTemplate>
</ListBox.Template>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Height="28" Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="60"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock x:Name="tb_Name" Text="{Binding Name}" Foreground="White" FontSize="18" VerticalAlignment="Center" HorizontalAlignment="Left" />
<Button x:Name="BtnDelete" Grid.Column="1" Background="Transparent" ToolTip="移除" VerticalAlignment="Center" HorizontalAlignment="Left"
Command="{Binding DataContext.DeleteRecipeCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}}"
CommandParameter="{Binding Path=Text,ElementName=tb_Name}">
<Button.Template>
<ControlTemplate TargetType="Button">
<Grid>
<Rectangle x:Name="BtnRetangle" Height="21" Width="21" Stroke="Transparent" StrokeThickness="1" VerticalAlignment="Center" HorizontalAlignment="Left">
<Rectangle.Fill>
<ImageBrush ImageSource="../Image/Delete.png"></ImageBrush>
</Rectangle.Fill>
</Rectangle>
<ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center" Content="{TemplateBinding Content}"></ContentPresenter>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="BtnRetangle" Property="Height" Value="24"></Setter>
<Setter TargetName="BtnRetangle" Property="Width" Value="24"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Template>
</Button>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</ScrollViewer>
<Button.Template>
<ControlTemplate TargetType="Button">
<Grid>
<Rectangle x:Name="BtnRetangle" Height="21" Width="21" Stroke="Transparent" StrokeThickness="1" VerticalAlignment="Center" HorizontalAlignment="Left">
<Rectangle.Fill>
<ImageBrush ImageSource="../Image/Delete.png"></ImageBrush>
</Rectangle.Fill>
</Rectangle>
<ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center" Content="{TemplateBinding Content}"></ContentPresenter>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="BtnRetangle" Property="Height" Value="24"></Setter>
<Setter TargetName="BtnRetangle" Property="Width" Value="24"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Template>
</Button>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</ScrollViewer>
</Border>


<!--#endregion-->
<!--#endregion-->


</Grid>
</Grid>
</Grid>
</Border>
</UserControl>

+ 16
- 4
BPASmart.RecipeManagement/View/PropertySetting.xaml View File

@@ -11,12 +11,22 @@
<Window.DataContext>
<vm:PropertySettingViewModel/>
</Window.DataContext>
<Grid>
<Border>
<Border.Background>
<ImageBrush ImageSource="../image/矩形.png"/>
</Border.Background>

<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="200"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid Margin="0,0,0,10">
<Border>
<TextBlock Text="原料扩展属性" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="22" Margin="0,10,0,0"/>
</Border>
<Grid Grid.Row="1" Margin="0,0,0,10">
<Grid.RowDefinitions>
<RowDefinition Height="49*"/>
<RowDefinition Height="30"/>
@@ -37,7 +47,7 @@
VerticalContentAlignment="Top"/>
</StackPanel>
</Grid>
<Grid Grid.Row="1">
<Grid Grid.Row="2">
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition />
@@ -82,7 +92,7 @@
Grid.Row="1"
HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Hidden">
<ListBox ItemsSource="{Binding properties}" x:Name="lb"
<ListBox ItemsSource="{Binding properties}" x:Name="lb" BorderBrush="Transparent"
ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden"
Background="Transparent" Foreground="#FF2AB2E7" >
<ListBox.ItemTemplate>
@@ -138,4 +148,6 @@
</ScrollViewer>
</Grid>
</Grid>
</Border>
</Window>

+ 80
- 31
BPASmart.RecipeManagement/View/RecipeManager.xaml View File

@@ -17,9 +17,15 @@
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListViewItem">
<Border x:Name="mborder" BorderBrush="#009AC0" BorderThickness="1,5" CornerRadius="10" Margin="10"
Background="#104E8B">
<Grid
<Border x:Name="mborder" BorderThickness="1" Background="Transparent"
Opacity="0.6" Margin="10" Padding="2"
>

<Border Margin="4">
<Border.Background>
<ImageBrush ImageSource="../image/外边框1.png" />
</Border.Background>
<Grid
Name="tt"
Height="200"
Width="150"
@@ -117,12 +123,13 @@
Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl,Mode=FindAncestor},Path=DataContext.PecipeSettingCommand}"
CommandParameter="{Binding ID}"/>
</Grid>
</Border>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="BorderBrush" Value="#CD8500" TargetName="mborder"/>
<Setter Property="BorderBrush" Value="#4169E1" TargetName="mborder"/>
<Setter Property="Opacity" Value="1" TargetName="mborder"/>
</Trigger>
<Trigger Property="IsFocused" Value="True">

@@ -134,30 +141,72 @@
</Style>

</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Text="配方清单" FontSize="28" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<ListView Grid.Row="1"
ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemsSource="{Binding RecipeList}" Margin=" 10" Background="Transparent" >
<ListView.ContextMenu>
<ContextMenu FontSize="16" Foreground="White">
<MenuItem Header="新建配方" Name="MenuAdd" Command="{Binding CreateRecipeCommand}"></MenuItem>
<MenuItem Header="编辑配方" Name="MenuEdit"
Command="{Binding EditRecipeCommand }"
CommandParameter="{Binding PlacementTarget.SelectedIndex,RelativeSource={RelativeSource AncestorType=ContextMenu}}"></MenuItem>
<MenuItem Header="删除配方" Name="MenuDelete"
Command="{Binding DeleteRecipeCommand}"
CommandParameter="{Binding PlacementTarget.SelectedIndex,RelativeSource={RelativeSource AncestorType=ContextMenu}}"></MenuItem>
</ContextMenu>
</ListView.ContextMenu>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Margin="10"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListView>
</Grid>
<Border>
<Border.Background>
<ImageBrush ImageSource="../image/中间.png"/>
</Border.Background>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="17"/>
<RowDefinition Height="40"/>
<RowDefinition Height="25"/>
<RowDefinition />
</Grid.RowDefinitions>
<TextBlock Grid.Row="1" Text="配方清单" FontSize="28" VerticalAlignment="Center" HorizontalAlignment="Center"/>

<Button Grid.Row="2" Content="工艺流程" Style="{DynamicResource CommonButton}" HorizontalAlignment="Right" Margin="20,0" Width="100"/>
<ListView Grid.Row="3"
ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemsSource="{Binding RecipeList}" Margin=" 10" Background="Transparent"
BorderBrush="Transparent">

<ListView.ContextMenu>
<ContextMenu FontSize="16" Foreground="White">
<MenuItem Command="{Binding CreateRecipeCommand}">
<MenuItem.Header>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Style="{DynamicResource menuText}" Text="&#xe64d;"/>
<TextBlock Grid.Column="1" Text="新建配方" Style="{DynamicResource menuText}" FontFamily="楷体"/>
</Grid>
</MenuItem.Header>
</MenuItem>
<MenuItem Command="{Binding EditRecipeCommand }"
CommandParameter="{Binding PlacementTarget.SelectedIndex,RelativeSource={RelativeSource AncestorType=ContextMenu}}">
<MenuItem.Header>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Style="{DynamicResource menuText}" Text="&#xf0213;"/>
<TextBlock Grid.Column="1" Text="编辑配方" Style="{DynamicResource menuText}" FontFamily="楷体" />
</Grid>
</MenuItem.Header>
</MenuItem>
<MenuItem Command="{Binding DeleteRecipeCommand}"
CommandParameter="{Binding PlacementTarget.SelectedIndex,RelativeSource={RelativeSource AncestorType=ContextMenu}}">
<MenuItem.Header>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Style="{DynamicResource menuText}" Text="&#xe8c1;"/>
<TextBlock Grid.Column="1" Text="删除配方" Style="{DynamicResource menuText}" FontFamily="楷体" />
</Grid>
</MenuItem.Header>
</MenuItem>
</ContextMenu>
</ListView.ContextMenu>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Margin="10"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListView>
</Grid>
</Border>
</UserControl>

+ 75
- 61
BPASmart.RecipeManagement/View/RecipesConfigure.xaml View File

@@ -6,7 +6,7 @@
xmlns:local="clr-namespace:BPASmartClient.RecipeManagement.View"
xmlns:vm="clr-namespace:BPASmart.RecipeManagement.ViewModel"
mc:Ignorable="d"
Title="RecipesConfigure" Height="600" Width="400" WindowStartupLocation="CenterScreen" WindowStyle="None" Background="White" MouseLeftButtonDown="Window_MouseLeftButtonDown"
Title="RecipesConfigure" Height="600" Width="600" WindowStartupLocation="CenterScreen" WindowStyle="None" Background="#01003B" MouseLeftButtonDown="Window_MouseLeftButtonDown"
AllowsTransparency="True" Foreground="#FF2AB2E7">
<Window.DataContext>
<vm:RecipesConfigureViewModel/>
@@ -16,65 +16,75 @@

</Window.Resources>
<Grid Background="#264c73">
<Grid.RowDefinitions>
<RowDefinition Height="50"/>
<RowDefinition />
<RowDefinition Height="30"/>
<RowDefinition Height="60"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="103*" />
<ColumnDefinition Width="147*" />
<ColumnDefinition Width="100*" />
</Grid.ColumnDefinitions>
<TextBlock Text="配方名称:" FontSize="22"
HorizontalAlignment="Center" VerticalAlignment="Center" Height="28" Width="92"/>
<TextBox Text="{Binding RecipeName}" FontSize="20" Grid.Column="1" Width="160" Height="36" Background="Transparent" Foreground="Orange"
<Border >
<Border.Background>
<ImageBrush ImageSource="../Image/边框元素.png" Stretch="Fill"/>
</Border.Background>

<Grid Background="Transparent" Margin="40,10">
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="50"/>
<RowDefinition />
<RowDefinition Height="30"/>
<RowDefinition Height="60"/>
<RowDefinition Height="26"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="103*" />
<ColumnDefinition Width="147*" />
<ColumnDefinition Width="100*" />
</Grid.ColumnDefinitions>
<StackPanel Grid.Row="1" Orientation="Horizontal" Grid.ColumnSpan="3 " HorizontalAlignment="Center">
<TextBlock Text="配方名称:" FontSize="16"
HorizontalAlignment="Right" VerticalAlignment="Center" Margin="50,0,10,0"/>
<TextBox Text="{Binding RecipeName}" FontSize="16" Grid.Column="1" Width="160" Background="Transparent" Foreground="Orange"
BorderBrush="#FF2AB2E7"
VerticalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10"
VerticalContentAlignment="Center"/>
<Button Grid.Column="2"
<Button Grid.Column="2"
Content="添加原料"
FontSize="16" Width="90" Height="30" Margin="10" Style="{DynamicResource ButtonStyle}"
FontSize="16" Width="90" Height="22" Margin="10" Style="{DynamicResource CommonButton}"
Command="{Binding AddMaterailsCommand}"/>
<ScrollViewer Grid.ColumnSpan="3"
Grid.Row="1"
Margin="15,10"
</StackPanel>
<ScrollViewer Grid.ColumnSpan="3"
Grid.Row="2"
Margin="30,10"
HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Auto">
<ItemsControl ItemsSource="{Binding recipeMaterials}" >
<ItemsControl.ItemTemplate>
<DataTemplate>
<RadioButton GroupName="all">
<RadioButton.Template>
<ControlTemplate TargetType="RadioButton">
<Grid Name="gr" Height="40">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="0.4*" />
<ColumnDefinition Width="0.4*" />
</Grid.ColumnDefinitions>
<ItemsControl ItemsSource="{Binding recipeMaterials}" >
<ItemsControl.ItemTemplate>
<DataTemplate>
<RadioButton GroupName="all">
<RadioButton.Template>
<ControlTemplate TargetType="RadioButton">
<Grid Name="gr" Height="40">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="2*" />
</Grid.ColumnDefinitions>

<ComboBox
<ComboBox
Name="cb"
Grid.Column="0"
Margin="3,1"
Foreground="#FF2AB2E7"
VerticalAlignment="Center"
HorizontalAlignment="Right"
Width="200"
FontFamily="楷体"
FontSize="20"
IsEditable="False"
ItemsSource="{Binding DataContext.materialsName, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
SelectedItem="{Binding Name}"
/>

<StackPanel
<StackPanel
Grid.Column="1"
VerticalAlignment="Center"
VerticalAlignment="Center" HorizontalAlignment="Right"
Orientation="Horizontal">
<TextBox
<TextBox
Name="tb"
Grid.Column="1"
Width="50"
@@ -85,49 +95,53 @@
FontSize="20"
Text="{Binding MaterialWeight}" />

<TextBlock
<TextBlock
Grid.Column="1"
Margin="0,0,5,4"
HorizontalAlignment="Right"
VerticalAlignment="Center"
FontSize="20"
Foreground="#FF2AB2E7"
Text="g" />

</StackPanel>
</StackPanel>

<Button
<Button
Grid.Column="2"
Width="70"
Height="28"
Margin="25,0,0,0"
Height="25"
Margin="15,0,0,0"
FontSize="16"
BorderBrush="#FF2AB2E7"
BorderThickness="1"
HorizontalAlignment="Left"
Style="{DynamicResource CommonButton}"
Style="{DynamicResource DeleteButton}"
Command="{Binding DataContext.DeleteCommand, RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}}"
CommandParameter="{Binding ID}"
Content="删 除" />

</Grid>
</Grid>


</ControlTemplate>
</RadioButton.Template>
</RadioButton>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</ControlTemplate>
</RadioButton.Template>
</RadioButton>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>

<TextBlock Text="{Binding ErrorMessage}" Grid.Row="2" Grid.ColumnSpan="3"
<TextBlock Text="{Binding ErrorMessage}" Grid.Row="2" Grid.ColumnSpan="3"
Foreground="Red" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<StackPanel Grid.Row="4" Grid.ColumnSpan="3" Orientation="Horizontal"
<StackPanel Grid.Row="4" Grid.ColumnSpan="3" Orientation="Horizontal"
HorizontalAlignment="Center" VerticalAlignment="Center">
<Button Content="保存" FontSize="22" Width="120" Height="40" Margin="10" Style="{DynamicResource CommonButton}"
<Button Content="保存" FontSize="18" Width="120" Height="24" Margin="10" Style="{DynamicResource ButtonStyle}"
Command="{Binding SaveCommand}"/>
<Button Content="取消" FontSize="22" Width="120" Height="40" Margin="10" Style="{DynamicResource CommonButton}"
<Button Content="取消" FontSize="18" Width="120" Height="24" Margin="10" Style="{DynamicResource ButtonStyle}"
Click="Button_Click"/>

</StackPanel>
</Grid>

</StackPanel>
</Grid>
</Border>
</Window>

+ 445
- 0
BPASmart.RecipeManagement/View/TechnologyProcess.xaml View File

@@ -0,0 +1,445 @@
<Window x:Class="BPASmart.RecipeManagement.View.TechnologyProcess"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:BPASmart.RecipeManagement.View" xmlns:Themes1="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Luna" xmlns:Themes11="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic"
xmlns:vm ="clr-namespace:BPASmart.RecipeManagement.ViewModel"
mc:Ignorable="d"
Title="TechnologyProcess" Height="550" Width="800" WindowStartupLocation="CenterOwner" WindowStyle="None" AllowsTransparency="True">
<Window.DataContext>
<vm:TechnologyProcessViewModel/>
</Window.DataContext>
<Window.Resources>
<SolidColorBrush x:Key="foreground" Color="#a2c2e8" />
<SolidColorBrush x:Key="borderBrush" Color="#FF074B92" />
<Style x:Key="ComboBoxFocusVisual">
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle
Margin="4,4,21,4"
SnapsToDevicePixels="true"
Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
StrokeDashArray="1 2"
StrokeThickness="1" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Geometry x:Key="DownArrowGeometry">M 0 0 L 3.5 4 L 7 0 Z</Geometry>
<Style x:Key="ComboBoxTransparentButtonStyle" TargetType="{x:Type ToggleButton}">
<Setter Property="MinWidth" Value="0" />
<Setter Property="MinHeight" Value="0" />
<Setter Property="Width" Value="Auto" />
<Setter Property="Height" Value="Auto" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="White" />
<Setter Property="BorderBrush" Value="{x:Static Themes11:ClassicBorderDecorator.ClassicBorderBrush}" />
<Setter Property="BorderThickness" Value="2" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<DockPanel
Background="{TemplateBinding Background}"
LastChildFill="false"
SnapsToDevicePixels="true">
<Themes11:ClassicBorderDecorator
x:Name="Border"
Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderStyle="None"
BorderThickness="{TemplateBinding BorderThickness}"
DockPanel.Dock="Right">
<Path
HorizontalAlignment="Center"
VerticalAlignment="Center"
Data="{StaticResource DownArrowGeometry}"
Fill="{TemplateBinding Foreground}" />
</Themes11:ClassicBorderDecorator>
</DockPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
<Setter TargetName="Border" Property="BorderStyle" Value="AltPressed" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}" />
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="ComboBoxEditableTextBox" TargetType="{x:Type TextBox}">
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="AllowDrop" Value="true" />
<Setter Property="MinWidth" Value="0" />
<Setter Property="Foreground" Value="{DynamicResource foreground}" />
<Setter Property="MinHeight" Value="0" />
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
<Setter Property="Stylus.IsFlicksEnabled" Value="False" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}">
<ScrollViewer
x:Name="PART_ContentHost"
Background="Transparent"
Focusable="false"
HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Hidden" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<ControlTemplate x:Key="ComboBoxEditableTemplate" TargetType="{x:Type ComboBox}">
<Border
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
SnapsToDevicePixels="true">
<Grid>
<Themes11:ClassicBorderDecorator
x:Name="Border"
BorderBrush="{x:Static Themes11:ClassicBorderDecorator.ClassicBorderBrush}"
BorderStyle="None"
BorderThickness="2">
<Popup
x:Name="PART_Popup"
AllowsTransparency="true"
Focusable="False"
IsOpen="{TemplateBinding IsDropDownOpen}"
Placement="Bottom"
PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
<Themes1:SystemDropShadowChrome
x:Name="Shdw"
MinWidth="{Binding ActualWidth, ElementName=Border}"
MaxHeight="{TemplateBinding MaxDropDownHeight}"
Color="Transparent">
<Border
x:Name="DropDownBorder"
BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"
BorderThickness="1">
<Border.Background>
<ImageBrush
ImageSource="../Image/内部背景.png"
Opacity="0.5"
Stretch="Fill" />
</Border.Background>
<ScrollViewer x:Name="DropDownScrollViewer">
<Grid RenderOptions.ClearTypeHint="Enabled">
<Canvas
Width="0"
Height="0"
HorizontalAlignment="Left"
VerticalAlignment="Top">
<Rectangle
x:Name="OpaqueRect"
Width="{Binding ActualWidth, ElementName=DropDownBorder}"
Height="{Binding ActualHeight, ElementName=DropDownBorder}"
Fill="{Binding Background, ElementName=DropDownBorder}" />
</Canvas>
<ItemsPresenter
x:Name="ItemsPresenter"
KeyboardNavigation.DirectionalNavigation="Contained"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Grid>
</ScrollViewer>
</Border>
</Themes1:SystemDropShadowChrome>
</Popup>
</Themes11:ClassicBorderDecorator>
<ToggleButton
Width="Auto"
MinWidth="0"
MinHeight="0"
ClickMode="Press"
Focusable="false"
IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
Style="{StaticResource ComboBoxTransparentButtonStyle}" />
<DockPanel>
<FrameworkElement Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" DockPanel.Dock="Right" />
<TextBox
x:Name="PART_EditableTextBox"
Margin="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
CaretBrush="White"
IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"
Style="{StaticResource ComboBoxEditableTextBox}" />
</DockPanel>

</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="HasItems" Value="false">
<Setter TargetName="DropDownBorder" Property="MinHeight" Value="95" />
</Trigger>
<Trigger SourceName="PART_Popup" Property="HasDropShadow" Value="true">
<Setter TargetName="Shdw" Property="Margin" Value="0,0,5,5" />
<Setter TargetName="Shdw" Property="Color" Value="#71000000" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsGrouping" Value="true" />
<Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
</MultiTrigger.Conditions>
<Setter Property="ScrollViewer.CanContentScroll" Value="false" />
</MultiTrigger>
<Trigger SourceName="DropDownScrollViewer" Property="ScrollViewer.CanContentScroll" Value="false">
<Setter TargetName="OpaqueRect" Property="Canvas.Top" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}" />
<Setter TargetName="OpaqueRect" Property="Canvas.Left" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<Style x:Key="BaseComboBoxStyle" TargetType="{x:Type ComboBox}">
<Setter Property="FocusVisualStyle" Value="{StaticResource ComboBoxFocusVisual}" />
<Setter Property="Foreground" Value="{DynamicResource foreground}" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="{DynamicResource borderBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Margin" Value="0,0,0,0" />
<Setter Property="Padding" Value="0" />
<Setter Property="Height" Value="24" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
<Setter Property="ScrollViewer.CanContentScroll" Value="true" />
<Setter Property="ScrollViewer.PanningMode" Value="Both" />
<Setter Property="Stylus.IsFlicksEnabled" Value="False" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="IsTextSearchCaseSensitive" Value="true" />
<Setter Property="IsEditable" Value="true" />
<Setter Property="StaysOpenOnEdit" Value="true" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ComboBox}">
<Border
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
SnapsToDevicePixels="true">
<Grid>
<Themes11:ClassicBorderDecorator
x:Name="Border"
BorderBrush="{x:Static Themes11:ClassicBorderDecorator.ClassicBorderBrush}"
BorderStyle="None"
BorderThickness="2">
<Popup
x:Name="PART_Popup"
AllowsTransparency="true"
Focusable="False"
IsOpen="{TemplateBinding IsDropDownOpen}"
Placement="Bottom"
PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
<Themes1:SystemDropShadowChrome
x:Name="Shdw"
MinWidth="{Binding ActualWidth, ElementName=Border}"
MaxHeight="{TemplateBinding MaxDropDownHeight}"
Color="Transparent">
<Border
x:Name="DropDownBorder"
BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"
BorderThickness="1">
<Border.Background>
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/From/内部背景.png" />
</Border.Background>
<ScrollViewer x:Name="DropDownScrollViewer">
<Grid RenderOptions.ClearTypeHint="Enabled">
<Canvas
Width="0"
Height="0"
HorizontalAlignment="Left"
VerticalAlignment="Top">
<Rectangle
x:Name="OpaqueRect"
Width="{Binding ActualWidth, ElementName=DropDownBorder}"
Height="{Binding ActualHeight, ElementName=DropDownBorder}"
Fill="{Binding Background, ElementName=DropDownBorder}" />
</Canvas>
<ItemsPresenter
x:Name="ItemsPresenter"
KeyboardNavigation.DirectionalNavigation="Contained"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Grid>
</ScrollViewer>
</Border>
</Themes1:SystemDropShadowChrome>
</Popup>
</Themes11:ClassicBorderDecorator>
<DockPanel Margin="2">
<FrameworkElement Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" DockPanel.Dock="Right" />
<Border x:Name="SelectedItemBorder" Margin="{TemplateBinding Padding}">
<ContentPresenter
Margin="1,1,1,1"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding SelectionBoxItem}"
ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
</DockPanel>
<ToggleButton
Width="Auto"
MinWidth="0"
MinHeight="0"
Margin="2"
ClickMode="Press"
Focusable="false"
IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
Style="{StaticResource ComboBoxTransparentButtonStyle}" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<!--<Condition Property="IsSelectionBoxHighlighted" Value="true"/>-->
<Condition Property="IsDropDownOpen" Value="false" />
</MultiTrigger.Conditions>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}" />
</MultiTrigger>
<!--<Trigger Property="IsSelectionBoxHighlighted" Value="true">
<Setter Property="Background" TargetName="SelectedItemBorder" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
</Trigger>-->
<Trigger Property="HasItems" Value="false">
<Setter TargetName="DropDownBorder" Property="MinHeight" Value="95" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsGrouping" Value="true" />
<Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
</MultiTrigger.Conditions>
<Setter Property="ScrollViewer.CanContentScroll" Value="false" />
</MultiTrigger>
<Trigger SourceName="PART_Popup" Property="HasDropShadow" Value="true">
<Setter TargetName="Shdw" Property="Margin" Value="0,0,5,5" />
<Setter TargetName="Shdw" Property="Color" Value="#71000000" />
</Trigger>
<Trigger SourceName="DropDownScrollViewer" Property="ScrollViewer.CanContentScroll" Value="false">
<Setter TargetName="OpaqueRect" Property="Canvas.Top" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}" />
<Setter TargetName="OpaqueRect" Property="Canvas.Left" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsEditable" Value="true">
<Setter Property="IsTabStop" Value="false" />
<Setter Property="Padding" Value="1" />
<Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}" />
</Trigger>
</Style.Triggers>

</Style>
<Style BasedOn="{StaticResource BaseComboBoxStyle}" TargetType="ComboBox" />
<!--#endregion-->

<!--#region ColorCommboxStyle-->
<ObjectDataProvider
x:Key="colorPropertieOdp"
MethodName="GetProperties"
ObjectInstance="{x:Type Colors}" />
<Style
x:Key="ColorCommboxStyle"
BasedOn="{StaticResource BaseComboBoxStyle}"
TargetType="ComboBox">
<Setter Property="IsTextSearchCaseSensitive" Value="False" />
<Setter Property="IsEditable" Value="False" />
<Setter Property="StaysOpenOnEdit" Value="False" />
<Setter Property="ItemsSource" Value="{Binding Source={StaticResource colorPropertieOdp}}" />
<Setter Property="ItemTemplate">
<Setter.Value>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Rectangle
Width="40"
Height="10"
Fill="{Binding Name}" />
<TextBlock Text="{Binding Name}" />
</StackPanel>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
<!--#endregion-->
</Window.Resources>
<Border x:Name="br">
<Border.Background>
<SolidColorBrush Color="#264c73"/>
</Border.Background>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50"/>
<RowDefinition Height="50"/>
<RowDefinition Height="40"/>
<RowDefinition/>
</Grid.RowDefinitions>

<TextBlock Text="工艺流程" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="#FF2AB2E7" Background="Transparent" FontSize="25" Cursor="Arrow" ></TextBlock>

<Border BorderThickness="0,0,0,1" BorderBrush="#FF2AB2E7"></Border>
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Content="向前新增" Width="100" Margin="0,0,10,0" Height="30" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Cursor="Hand" FontSize="18" Command="{Binding AddFrontFlowItemCommand}" ></Button>
<Button Content="向后新增" Width="100" Margin="0,0,10,0" Height="30" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Cursor="Hand" FontSize="18" Command="{Binding AddLastFlowItemCommand}" ></Button>
<Button Content="删除选项" Width="100" Margin="0,0,10,0" Height="30" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Cursor="Hand" FontSize="18" Command="{Binding DeleteFlowItemCommand}" ></Button>
<Button Content="保存工艺" Width="100" Margin="0,0,10,0" Height="30" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Cursor="Hand" FontSize="18" Command="{Binding ConfirmCommand}" ></Button>
<Button Content="取消" Height="30" Width="100" Margin="0,0,10,0" Background="Transparent" FontSize="18" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Command="{Binding CloseWindowCommand}"></Button>

</StackPanel>
<Grid Grid.Row="2" Background="#FF2AB2E7" Margin="0,0,0,8">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="140"/>
<ColumnDefinition Width="140"/>
<ColumnDefinition Width="140"/>
<ColumnDefinition Width="140"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<TextBlock Text="工艺步骤" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="white" FontSize="18"/>
<GridSplitter BorderThickness="0.2" BorderBrush="White"></GridSplitter>
<TextBlock Grid.Column="1" Text="炒制原料/桶号" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="white" FontSize="18"/>
<GridSplitter Grid.Column="1" BorderThickness="0.2" BorderBrush="White"></GridSplitter>
<TextBlock Grid.Column="2" Text="炒制速度" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="white" FontSize="18"/>
<GridSplitter Grid.Column="2" BorderThickness="0.2" BorderBrush="White"></GridSplitter>
<TextBlock Grid.Column="3" Text="炒制重量" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="white" FontSize="18"></TextBlock>
<GridSplitter Grid.Column="3" BorderThickness="0.2" BorderBrush="White"></GridSplitter>
<TextBlock Grid.Column="4" Text="炒制温度" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="white" FontSize="18"/>
<GridSplitter Grid.Column="4" BorderThickness="0.2" BorderBrush="White"></GridSplitter>
<TextBlock Grid.Column="5" Text="炒制时间" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="white" FontSize="18"/>
</Grid>
<ScrollViewer Grid.Row="3" VerticalScrollBarVisibility="Hidden">
<ItemsControl x:Name="itemcontrols" AlternationCount="{Binding technologyProcessModels.Count}" ItemsSource="{Binding technologyProcessModels}" Margin="0,1,0,-1">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<StackPanel x:Name="stk" Orientation="Horizontal" >
<Label MouseLeftButtonDown="Label_MouseLeftButtonDown" Content="{Binding Path=(ItemsControl.AlternationIndex),RelativeSource={ RelativeSource TemplatedParent}}" Foreground="SkyBlue" Width="100" Height="40" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" FontSize="18" Background="Transparent" BorderBrush="#FF2AB2E7" BorderThickness="1,1,0.5,1"/>
<ComboBox ItemsSource="{Binding DataContext.FlowItems, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}" Text="{Binding FryMaterialNum}" Style="{StaticResource BaseComboBoxStyle}" IsReadOnly="True" Width="140" Height="40" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Background="Transparent" Foreground="SkyBlue" FontSize="18" BorderBrush="#FF2AB2E7" BorderThickness="0.5,1,0.5,1"/>
<TextBox Text="{Binding FrySpeed}" Width="140" Height="40" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Background="Transparent" Foreground="SkyBlue" FontSize="18" BorderBrush="#FF2AB2E7" BorderThickness="0.5,1,0.5,1"/>
<TextBox Text="{Binding FryWeight}" Width="140" Height="40" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Background="Transparent" Foreground="SkyBlue" FontSize="18" BorderBrush="#FF2AB2E7" BorderThickness="0.5,1,0.5,1"/>
<TextBox Text="{Binding FryTemperature}" Width="140" Height="40" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Background="Transparent" Foreground="SkyBlue" FontSize="18" BorderBrush="#FF2AB2E7" BorderThickness="0.5,1,0.5,1"/>
<TextBox Text="{Binding FryPeriodTime}" Width="140" Height="40" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Background="Transparent" Foreground="SkyBlue" FontSize="18" BorderBrush="#FF2AB2E7" BorderThickness="0.5,1,1,1"/>
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</Grid>
</Border>
</Window>

+ 70
- 0
BPASmart.RecipeManagement/View/TechnologyProcess.xaml.cs View File

@@ -0,0 +1,70 @@
using BPASmartClient.Helper;
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 BPASmart.RecipeManagement.View
{
/// <summary>
/// TechnologyProcess.xaml 的交互逻辑
/// </summary>
public partial class TechnologyProcess : Window
{
public TechnologyProcess()
{
InitializeComponent();
this.br.MouseLeftButtonDown += (o, e) => { if (e.LeftButton == MouseButtonState.Pressed) this.DragMove(); };
ActionManage.GetInstance.CancelRegister("CloseTechnologyProcessView");
ActionManage.GetInstance.Register(new Action(() =>
{
this.Close();
}), "CloseTechnologyProcessView");
}

private void Label_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
Label txt = sender as Label;
if (txt != null)
{
StackPanel oldSp = FindFirstVisualChild(itemcontrols, "stk");
if (oldSp != null)
oldSp.Background = new SolidColorBrush(Color.FromRgb(38, 76, 115));
StackPanel sp = VisualTreeHelper.GetParent(txt) as StackPanel;
sp.Background = new SolidColorBrush(Color.FromRgb(8, 20, 36));
ActionManage.GetInstance.Send("CurrentItemId", txt.Content);
}
}

public StackPanel FindFirstVisualChild(DependencyObject obj, string childName)
{
for (int i = 0; i < VisualTreeHelper.GetChildrenCount(obj); i++)
{
DependencyObject child = VisualTreeHelper.GetChild(obj, i);
if (child != null && child is StackPanel && child.GetValue(NameProperty).ToString() == childName)
{
if (child is StackPanel stack && stack.Background?.ToString() == "#FF081424")
return stack;
}
else
{
StackPanel SP = FindFirstVisualChild(child, childName);
if (SP != null)
{
return SP;
}
}
}
return null;
}
}
}

+ 10
- 10
BPASmart.RecipeManagement/View/TechnologySetting.xaml View File

@@ -1,12 +1,12 @@
<UserControl x:Class="BPASmart.RecipeManagement.View.TechnologySetting"
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:BPASmart.RecipeManagement.View"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Window x:Class="BPASmart.RecipeManagement.View.TechnologySetting"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:BPASmart.RecipeManagement.View"
mc:Ignorable="d"
Title="TechnologySetting" Height="450" Width="800">
<Grid>
</Grid>
</UserControl>
</Window>

+ 1
- 2
BPASmart.RecipeManagement/View/TechnologySetting.xaml.cs View File

@@ -10,7 +10,6 @@ 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 BPASmart.RecipeManagement.View
@@ -18,7 +17,7 @@ namespace BPASmart.RecipeManagement.View
/// <summary>
/// TechnologySetting.xaml 的交互逻辑
/// </summary>
public partial class TechnologySetting : UserControl
public partial class TechnologySetting : Window
{
public TechnologySetting()
{


+ 1
- 1
BPASmart.RecipeManagement/ViewModel/CreateOrderViewModel.cs View File

@@ -49,7 +49,7 @@ namespace BPASmart.RecipeManagement.ViewModel

AddRecipeCommand = new RelayCommand(() =>
{
recipes.Add(new Recipes() { ID = Guid.NewGuid().ToString() });
recipes.Add(new Recipes() { ID = Guid.NewGuid().ToString() ,RecipeCount =1,});
});

foreach( var item in Json<LocalRecipes>.Data.locaRecipes )


+ 2
- 2
BPASmart.RecipeManagement/ViewModel/MaterialManagerViewModel.cs View File

@@ -29,7 +29,7 @@ namespace BPASmart.RecipeManagement.ViewModel
private void EditMaterail(object o)
{
if(o == null) return;
if(o is int item)
if(o is int item && item >= 0)
{
GlobleData.ChangeMaterail = new RecipeMaterials();
GlobleData.ChangeMaterail = MaterialList[item];
@@ -41,7 +41,7 @@ namespace BPASmart.RecipeManagement.ViewModel
private void DeleteMaterail(object o)
{
if (o == null) return;
if (o is int item)
if (o is int item && item >= 0)
{
MaterialList.RemoveAt(item);
Json<LocalMaterails>.Save();


+ 6
- 1
BPASmart.RecipeManagement/ViewModel/RecipeManagerViewModel.cs View File

@@ -1,4 +1,5 @@
using BPASmart.Model.配方;
using BPASmart.RecipeManagement.View;
using BPASmartClient.Helper;
using BPASmartClient.RecipeManagement.View;
using Microsoft.Toolkit.Mvvm.ComponentModel;
@@ -52,7 +53,11 @@ namespace BPASmart.RecipeManagement.ViewModel
var res = Json<LocalRecipes>.Data.locaRecipes.FirstOrDefault(p=>p.ID == id);
if (res != null)
{

Globle.GlobleData.recipeTechnologyProcess = null;
Globle.GlobleData.recipeTechnologyProcess = res;
TechnologyProcess technologyProcess = new TechnologyProcess();
technologyProcess.ShowDialog();
}
}
}


+ 130
- 0
BPASmart.RecipeManagement/ViewModel/TechnologyProcessViewModel.cs View File

@@ -0,0 +1,130 @@
using BPASmart.Model.配方;
using BPASmartClient.Helper;
using Microsoft.Toolkit.Mvvm.ComponentModel;
using Microsoft.Toolkit.Mvvm.Input;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmart.RecipeManagement.ViewModel
{
public class TechnologyProcessViewModel:ObservableObject
{
public static int currentItemId;

public int Id { get { return _id; } set { _id = value; OnPropertyChanged(); } }
private int _id = 0;
public ObservableCollection<TechnologyProcessModel> technologyProcessModels { get; set; } = new ObservableCollection<TechnologyProcessModel>();

public string currentRecipeName { get { return _currentRecipeName; } set { _currentRecipeName = value; OnPropertyChanged(); } }
private string _currentRecipeName = string.Empty;

public RelayCommand CloseWindowCommand { get; set; }

public ObservableCollection<string> meterailItems { get; set; } = new ObservableCollection<string>();
public RelayCommand ConfirmCommand { get; set; }
public RelayCommand AddLastFlowItemCommand { get; set; }
public RelayCommand AddFrontFlowItemCommand { get; set; }
public RelayCommand DeleteFlowItemCommand { get; set; }



public TechnologyProcessViewModel()
{
foreach(var item in Globle.GlobleData.recipeTechnologyProcess.recipeMaterials)
{
meterailItems.Add(item.Name);
}
ActionManage.GetInstance.Register(new Action<object>((obj) =>
{
if (obj != null)
try
{
currentItemId = Convert.ToInt32(obj);
}
catch (Exception)
{

}
}), "CurrentItemId");
technologyProcessModels = Globle.GlobleData.recipeTechnologyProcess.TechnologyProcessModels;


CloseWindowCommand = new RelayCommand(() =>
{
ActionManage.GetInstance.Send("CloseTechnologyProcessView");
});
ConfirmCommand = new RelayCommand(() =>
{
var res = Json<LocalRecipes>.Data.locaRecipes.FirstOrDefault(p => p.ID == Globle.GlobleData.recipeTechnologyProcess.ID);
if(res != null)
{
res.TechnologyProcessModels.Clear();
res.TechnologyProcessModels = technologyProcessModels;
}
Json<LocalRecipes>.Save();

;
ActionManage.GetInstance.Send("CloseTechnologyProcessView");
});

AddFrontFlowItemCommand = new RelayCommand(() =>
{
try
{
if (currentItemId == 0)
{
technologyProcessModels.Insert(0, new TechnologyProcessModel());
}
else
{
technologyProcessModels.Insert(currentItemId, new TechnologyProcessModel());
currentItemId = currentItemId + 1;
}
}
catch (Exception)
{

//throw;
}

});
AddLastFlowItemCommand = new RelayCommand(() =>
{
try
{
if (technologyProcessModels.Count <= 0)
{
technologyProcessModels.Insert(0, new TechnologyProcessModel());

}
else if (currentItemId != 0)
{
technologyProcessModels.Insert(currentItemId + 1, new TechnologyProcessModel());
}
else
{
technologyProcessModels.Add(new TechnologyProcessModel());
}
}
catch (Exception)
{

// throw;
}
});
DeleteFlowItemCommand = new RelayCommand(() =>
{
if (technologyProcessModels.Count > 0)
technologyProcessModels.RemoveAt(currentItemId);
currentItemId = 0;
});
}
}
}

+ 382
- 0
BPASmart.UserManagement/App.xaml View File

@@ -0,0 +1,382 @@
<Application x:Class="BPASmart.UserManagement.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:BPASmart.UserManagement"
StartupUri="MainWindow.xaml">
<Application.Resources>
<SolidColorBrush x:Key="commanTextblock" Color="#FF2AB2E7"/>
<SolidColorBrush x:Key="selectedColor" Color=" #4169E1"/>
<!--#region ScrollViewer-->

<Style x:Key="ScrollBarThumb" TargetType="{x:Type Thumb}">
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="IsTabStop" Value="false" />
<Setter Property="Focusable" Value="false" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}">
<Border CornerRadius="2" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ScrollBarPageButton" TargetType="{x:Type RepeatButton}">
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="IsTabStop" Value="false" />
<Setter Property="Focusable" Value="false" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type RepeatButton}">
<Border Background="Transparent" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<ControlTemplate x:Key="VerticalScrollBar" TargetType="{x:Type ScrollBar}">
<Grid>
<Border CornerRadius="2" Width="0.5" Background="#FF046BFF" />
<Track x:Name="PART_Track" IsDirectionReversed="true">
<Track.DecreaseRepeatButton>
<RepeatButton Style="{StaticResource ScrollBarPageButton}" Command="ScrollBar.PageUpCommand" />
</Track.DecreaseRepeatButton>
<Track.Thumb>
<Thumb Style="{StaticResource ScrollBarThumb}" Margin="4,0,4,0" Background="DodgerBlue"></Thumb>
</Track.Thumb>
<Track.IncreaseRepeatButton>
<RepeatButton Style="{StaticResource ScrollBarPageButton}" Command="ScrollBar.PageDownCommand" />
</Track.IncreaseRepeatButton>
</Track>
</Grid>
</ControlTemplate>
<ControlTemplate x:Key="ScrollViewerControlTemplate1" TargetType="{x:Type ScrollViewer}">
<Grid x:Name="Grid" Background="{TemplateBinding Background}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Rectangle x:Name="Corner" Grid.Column="1" Fill="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" Grid.Row="1"/>
<ScrollContentPresenter x:Name="PART_ScrollContentPresenter" CanContentScroll="{TemplateBinding CanContentScroll}" CanHorizontallyScroll="False" CanVerticallyScroll="False" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Grid.Column="0" Margin="{TemplateBinding Padding}" Grid.Row="0"/>
<ScrollBar x:Name="PART_VerticalScrollBar" AutomationProperties.AutomationId="VerticalScrollBar" Cursor="Arrow" Grid.Column="1"
Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" Grid.Row="0" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}"
Template="{StaticResource VerticalScrollBar}"/>
<ScrollBar x:Name="PART_HorizontalScrollBar" AutomationProperties.AutomationId="HorizontalScrollBar" Cursor="Arrow" Grid.Column="0" Maximum="{TemplateBinding ScrollableWidth}" Minimum="0" Orientation="Horizontal" Grid.Row="1" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportWidth}"/>
</Grid>
</ControlTemplate>
<!--#endregion-->
<!--#region右键菜单-->
<Style TargetType="{x:Type ContextMenu}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ContextMenu}">
<Border x:Name="Border" CornerRadius="4" Background="#1E2D45" BorderThickness="1" Margin="0"
Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
<Border.BorderBrush>
<SolidColorBrush Color="#104E8B" />
</Border.BorderBrush>
<ItemsPresenter/>
</Border>
<ControlTemplate.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="True"/>
</MultiTrigger.Conditions>
<MultiTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(FrameworkElement.Width)">
<SplineDoubleKeyFrame KeyTime="00:00:00.0020000" Value="0"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.20000" Value="130"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(FrameworkElement.Height)">
<SplineDoubleKeyFrame KeyTime="00:00:00.0020000" Value="0"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.20000" Value="100"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</MultiTrigger.EnterActions>
</MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type MenuItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type MenuItem}">
<Border Margin="0,5,0,0" CornerRadius="5" >
<Border.Background>
<SolidColorBrush x:Name="MyAnimatedBrushBackground" Color="Transparent" />
</Border.Background>
<StackPanel Orientation="Horizontal">
<TextBlock Text=" "/>
<ContentPresenter ContentSource="Icon" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBlock Text=" "/>
<ContentPresenter ContentSource="Header" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</StackPanel>
</Border>
<ControlTemplate.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="True"/>
</MultiTrigger.Conditions>
<MultiTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MyAnimatedBrushBackground" Storyboard.TargetProperty="Color">
<LinearColorKeyFrame Value="#1E2D45" KeyTime="00:00:00.0020000" />
<LinearColorKeyFrame Value="#05173B" KeyTime="00:00:00.320000" />
</ColorAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</MultiTrigger.EnterActions>
<MultiTrigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MyAnimatedBrushBackground" Storyboard.TargetProperty="Color">
<LinearColorKeyFrame Value="#05173B" KeyTime="00:00:00.0020000" />
<LinearColorKeyFrame Value="#1E2D45" KeyTime="00:00:00.320000" />
</ColorAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</MultiTrigger.ExitActions>
</MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--#endregion-->

<!--#region button样式-->
<Style x:Key="CommonButton" TargetType="{x:Type Button}">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="#FF2AB2E7"/>
<Setter Property="BorderBrush" Value="#FF2AB2E7"/>
<Setter Property="FontFamily" Value="楷体"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="border" CornerRadius="5" BorderThickness="1" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"
Padding="5,2">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background" Value="{DynamicResource selectedColor}"/>
<Setter TargetName="border" Property="BorderBrush" Value="#F0FFFF"/>
<Setter Property="Foreground" Value="white"/>

</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ButtonStyle" TargetType="Button">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="#FF2AB2E7"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background" Value="#442AB2E7"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--#endregion-->
<!--#region 用户输入框样式-->
<Style x:Key="UserTextBoxStyle" TargetType="TextBox">
<Setter Property="Background" Value="Transparent" />
<Setter Property="CaretBrush" Value="#009DFF" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TextBox">
<Border
x:Name="border"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="5"
SnapsToDevicePixels="true">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="40" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBlock
x:Name="PasswordTextBlock"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontFamily="../Fonts/#iconfont"
FontSize="{TemplateBinding FontSize}"
Foreground="{TemplateBinding BorderBrush}"
Text="&#xe633;"/>

<TextBlock
Name="markText"
Grid.Column="1"
Margin="10,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="{TemplateBinding FontSize}"
Foreground="#88009dff"
Text="请输入账号名称"
Visibility="Collapsed" />


<ScrollViewer
x:Name="PART_ContentHost"
Grid.Column="1"
MinHeight="20"
VerticalAlignment="Center"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Grid>

</Border>

<ControlTemplate.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="false"/>
<Condition Property="IsKeyboardFocused" Value="true"/>
</MultiTrigger.Conditions>
<MultiTrigger.Setters>
<Setter TargetName="border" Property="BorderBrush" Value="#FF569DE5" />
</MultiTrigger.Setters>
</MultiTrigger>
<Trigger Property="IsEnabled" Value="false">
<Setter TargetName="border" Property="Opacity" Value="0.56" />
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="border" Property="BorderBrush" Value="#447EB4EA" />
</Trigger>
<!--<Trigger Property="IsKeyboardFocused" Value="true">
<Setter TargetName="border" Property="BorderBrush" Value="#FF569DE5" />
</Trigger>-->
<DataTrigger Binding="{Binding Path=Text, RelativeSource={RelativeSource Mode=self}}" Value="">
<Setter TargetName="markText" Property="Visibility" Value="Visible" />
</DataTrigger>
</ControlTemplate.Triggers>

</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

<!--#region 密码输入框样式-->
<Style x:Key="PasswordBoxStyle" TargetType="{x:Type PasswordBox}">
<Setter Property="Background" Value="Transparent" />
<Setter Property="FontFamily" Value="Times New Roman" />
<Setter Property="PasswordChar" Value="●" />
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
<Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="Padding" Value="1" />
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="AllowDrop" Value="true" />
<Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
<Setter Property="Stylus.IsFlicksEnabled" Value="False" />
<Setter Property="CaretBrush" Value="#009DFF" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type PasswordBox}">
<Border
x:Name="Bd"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="5"
SnapsToDevicePixels="true">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="40" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBlock
x:Name="UserTextBlock"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontFamily="../../Fonts/#iconfont"
FontSize="{TemplateBinding FontSize}"
Foreground="{TemplateBinding BorderBrush}"
Text="&#xe611;" />


<ScrollViewer
x:Name="PART_ContentHost"
Grid.Column="1"
MinHeight="{TemplateBinding FontSize}"
VerticalAlignment="Center"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Grid>

</Border>
<ControlTemplate.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="false"/>
<Condition Property="IsKeyboardFocused" Value="true"/>
</MultiTrigger.Conditions>
<MultiTrigger.Setters>
<Setter TargetName="Bd" Property="BorderBrush" Value="#FF569DE5" />
<Setter TargetName="UserTextBlock" Property="Foreground" Value="#FF569DE5" />
</MultiTrigger.Setters>
</MultiTrigger>
<Trigger Property="IsEnabled" Value="false">
<Setter TargetName="Bd" Property="Opacity" Value="0.56" />
<Setter TargetName="UserTextBlock" Property="Opacity" Value="0.56" />
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="Bd" Property="BorderBrush" Value="#447EB4EA" />
<Setter TargetName="UserTextBlock" Property="Foreground" Value="#447EB4EA" />
</Trigger>
<!--<Trigger Property="IsKeyboardFocused" Value="true">
<Setter TargetName="Bd" Property="BorderBrush" Value="#FF569DE5" />
<Setter TargetName="UserTextBlock" Property="Foreground" Value="#FF569DE5" />
</Trigger>-->

</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsInactiveSelectionHighlightEnabled" Value="true" />
<Condition Property="IsSelectionActive" Value="false" />
</MultiTrigger.Conditions>
<Setter Property="SelectionBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}" />
</MultiTrigger>
</Style.Triggers>
</Style>
<!--#endregion-->

<Style x:Key="CommonTextBox" TargetType="{x:Type TextBox}">
<Setter Property="Foreground" Value="Orange"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="#FF2AB2E7"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
</Application.Resources>
</Application>

+ 17
- 0
BPASmart.UserManagement/App.xaml.cs View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace BPASmart.UserManagement
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}

+ 10
- 0
BPASmart.UserManagement/AssemblyInfo.cs View File

@@ -0,0 +1,10 @@
using System.Windows;

[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]

+ 65
- 0
BPASmart.UserManagement/BPASmart.UserManagement.csproj View File

@@ -0,0 +1,65 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
</PropertyGroup>

<ItemGroup>
<None Remove="Fonts\iconfont.ttf" />
<None Remove="Image\Exit.png" />
<None Remove="Image\leftImage.png" />
<None Remove="Image\List.png" />
<None Remove="Image\User.png" />
<None Remove="Image\user背景.png" />
<None Remove="Image\信息边框.png" />
<None Remove="Image\图层1.png" />
<None Remove="Image\图层2.png" />
<None Remove="Image\容器边框.png" />
<None Remove="Image\尺条框.png" />
<None Remove="Image\成功提示.png" />
<None Remove="Image\按钮背景.png" />
<None Remove="Image\权限背景.png" />
<None Remove="Image\科技警告.png" />
<None Remove="Image\背景4.png" />
<None Remove="Image\边框.png" />
</ItemGroup>

<ItemGroup>
<Resource Include="Image\user背景.png" />
</ItemGroup>

<ItemGroup>
<Resource Include="Image\leftImage.png" />
<Resource Include="Image\信息边框.png" />
<Resource Include="Image\图层1.png" />
<Resource Include="Image\图层2.png" />
<Resource Include="Image\容器边框.png" />
<Resource Include="Image\尺条框.png" />
<Resource Include="Image\成功提示.png" />
<Resource Include="Image\按钮背景.png" />
<Resource Include="Image\权限背景.png" />
<Resource Include="Image\科技警告.png" />
<Resource Include="Image\背景4.png" />
<Resource Include="Image\边框.png" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\BPASmart.Model\BPASmart.Model.csproj" />
<ProjectReference Include="..\BPASmartClient.Helper\BPASmartClient.Helper.csproj" />
</ItemGroup>

<ItemGroup>
<Resource Include="Fonts\iconfont.ttf" />
<Resource Include="Image\Exit.png" />
<Resource Include="Image\List.png" />
<Resource Include="Image\User.png" />
</ItemGroup>

</Project>

BIN
View File


+ 13
- 0
BPASmart.UserManagement/Globle/GlobleData.cs View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmart.UserManagement.Globle
{
public class GlobleData
{
}
}

+ 73
- 0
BPASmart.UserManagement/Helper/PasswordHelper.cs View File

@@ -0,0 +1,73 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;

namespace BPASmart.UserManagement.Helper
{
/// <summary>
/// 给PasswordBox添加一个可以绑定的附加类
/// </summary>
public class PasswordHelper
{

static bool IsUpdete = false;

#region PasswordProperty
public static readonly DependencyProperty PasswordProperty = DependencyProperty.RegisterAttached("Password", typeof(string),
typeof(PasswordHelper), new FrameworkPropertyMetadata("", new PropertyChangedCallback(OnPropertyChanged)));


public static string GetPassword(DependencyObject d)
{
return d.GetValue(PasswordProperty).ToString();
}

public static void SetPassword(DependencyObject d, string value)
{
d.SetValue(PasswordProperty, value);
}

private static void OnPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
PasswordBox password = d as PasswordBox;
password.PasswordChanged -= password_PasswordChanged;
if (!IsUpdete) password.Password = e.NewValue?.ToString();
password.PasswordChanged += password_PasswordChanged;
}
#endregion

#region AttachProperty
public static readonly DependencyProperty AttachProperty = DependencyProperty.RegisterAttached("Attach", typeof(bool),
typeof(PasswordHelper), new FrameworkPropertyMetadata(default(bool), new PropertyChangedCallback(OnAttachChanged)));

public static bool GetAttach(DependencyObject d)
{
return (bool)d.GetValue(AttachProperty);
}

public static void SetAttach(DependencyObject d, bool value)
{
d.SetValue(AttachProperty, value);
}

private static void OnAttachChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
PasswordBox password = d as PasswordBox;
password.PasswordChanged += password_PasswordChanged;
}

private static void password_PasswordChanged(object sender, RoutedEventArgs e)
{
PasswordBox passwordBox = sender as PasswordBox;
IsUpdete = true;
SetPassword(passwordBox, passwordBox.Password);
IsUpdete = false;
}

#endregion
}
}

BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


+ 113
- 0
BPASmart.UserManagement/MainWindow.xaml View File

@@ -0,0 +1,113 @@
<Window x:Class="BPASmart.UserManagement.MainWindow"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:BPASmart.UserManagement"
xmlns:vm="clr-namespace:BPASmart.UserManagement.ViewModel"
xmlns:view="clr-namespace:BPASmart.UserManagement.View"
mc:Ignorable="d"
Title="MainWindow" Height="600 " Width="1000" WindowStartupLocation="CenterScreen" WindowStyle="None" AllowsTransparency="True" Background="Transparent" FontFamily="楷体"
>
<Window.DataContext>
<vm:MainWindowViewModel/>
</Window.DataContext>
<Border Background="#01003B" CornerRadius="10">

<Grid >
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Border CornerRadius="10,10,0,0" MouseLeftButtonDown="Border_MouseLeftButtonDown" x:Name="br">
<Border.Background>
<LinearGradientBrush StartPoint="0,1" EndPoint="1,1">
<GradientStop Color="#104E8B" Offset="0"/>
<GradientStop Color="#1874CD" Offset="0.4"/>
<GradientStop Color="#1874CD" Offset="0.6"/>
<GradientStop Color="#27408B" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>

</Grid.ColumnDefinitions>

<Image Source="../image/user.png" Width="22" Margin="20,0,4 ,0" VerticalAlignment="Center"/>
<TextBlock Grid.Column="1" Text="用户管理模块" Foreground="White" FontFamily="楷体" FontSize="24" VerticalAlignment="Center"/>
<Button Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Center" Background="Transparent" Margin="5,0"
Height="35" Width="35" Click="Button_Click" BorderBrush="Transparent">
<Button.Style>
<Style TargetType="Button" >
<Style.Setters>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="border" BorderThickness="1" Background="Transparent" Padding="0" >
<Image x:Name="image" Source="../image/Exit.png" Stretch="UniformToFill"
Height="auto" Width="auto" VerticalAlignment="Center" HorizontalAlignment="Center" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="image" Property="Margin" Value="-3"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style.Setters>

</Style>
</Button.Style>
</Button>
</Grid>
</Border>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200"/>
<ColumnDefinition Width="81*"/>
<ColumnDefinition Width="319*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Border Grid.RowSpan="2" Background="Transparent" BorderBrush="#1E90FF" BorderThickness="0,0,1,0">
<view:UserList/>
</Border>


<Border Grid.RowSpan="2" Grid.Column="1" Grid.ColumnSpan="2">
<Border.Background>
<ImageBrush ImageSource="../Image/背景4.png"/>
</Border.Background>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0">
<Image Source="../Image/图层2.png" Width="100" Height="40"/>
<Button HorizontalAlignment="Right" VerticalAlignment="Center" Margin="10,0" Padding="10,3" FontSize="18"
Content="注册新用户" Style="{DynamicResource ButtonStyle}" Click="NewUser_Click" />
<Image Source="../Image/图层2.png" Width="100"/>
</StackPanel>

<ContentControl Grid.Row="1" x:Name="mainContent" Background="Transparent" >


</ContentControl>
</Grid>

</Border>

</Grid>
</Grid>


</Border>

</Window>

+ 78
- 0
BPASmart.UserManagement/MainWindow.xaml.cs View File

@@ -0,0 +1,78 @@
using BPASmartClient.Helper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
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 BPASmart.UserManagement
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
this.br.MouseLeftButtonDown += (o, e) =>
{
if (e.ClickCount > 1)
{
if (this.WindowState == WindowState.Maximized)
this.WindowState = WindowState.Normal;
else if (this.WindowState == WindowState.Normal)
this.WindowState = WindowState.Maximized;
}

};
ActionManage.GetInstance.Register(new Action<object>((o) => {
if (o == null)
{
return;
}
if(o == string.Empty)
{
mainContent.Content = null;
return;
}
if(o is string pageName)
{
Type type = Type.GetType($"BPASmart.UserManagement.View.{pageName}");
if (type == null) { return; }
ConstructorInfo cti = type.GetConstructor(System.Type.EmptyTypes);
mainContent.Content = (FrameworkElement)cti.Invoke(null);

}
}), "ChangeMianContent");
}

private void Border_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
this.DragMove();
}

private void Button_Click(object sender, RoutedEventArgs e)
{
this.Close();
}


private void NewUser_Click(object sender, RoutedEventArgs e)
{
ActionManage.GetInstance.Send("ChangeMianContent", "AddNewUser");
}
}
}

+ 56
- 0
BPASmart.UserManagement/MessageBox.xaml View File

@@ -0,0 +1,56 @@
<Window x:Class="BPASmart.UserManagement.MessageBox"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:BPASmart.UserManagement"
mc:Ignorable="d"
Title="MessageBox" Height="110" Width="240"
WindowStartupLocation="CenterOwner" WindowStyle="None" AllowsTransparency="True" Background="Transparent" Topmost="True" ResizeMode="NoResize" ShowInTaskbar="False">
<Border MouseLeftButtonDown="Border_MouseLeftButtonDown" Background="Black" Opacity="0.9" CornerRadius="10">
<Border>
<Border.Background>
<ImageBrush ImageSource="../Image/信息边框.png"/>
</Border.Background>
<Grid>
<Border Margin="10" Background="Transparent" Opacity="1">
<Border.Effect>
<DropShadowEffect ShadowDepth="0" BlurRadius="10" Opacity="0.5"/>
</Border.Effect>
<Grid Margin="0">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="30"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,0,30,0">
<Image Source="../Image/成功提示.png" Height="26" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10,0"/>
<TextBlock x:Name="TB_Context" Text="Ensure?" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20" Foreground="#E900F859"/>
</StackPanel>
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Bottom">
<Button VerticalAlignment="Bottom" Click="No_Button_Click" Cursor="Hand" >
<Button.Template>
<ControlTemplate TargetType="{x:Type Button}">
<Border Name="Border" VerticalAlignment="Bottom" Width="100" Height="20" BorderBrush="#cccccc" CornerRadius="10" >
<Border.Effect>
<DropShadowEffect ShadowDepth="0" BlurRadius="10" Opacity="0.2"/>
</Border.Effect>
<Border.Background>
<ImageBrush ImageSource="../Image/按钮背景.png"/>
</Border.Background>
<TextBlock Text="确 定" FontSize="16" Margin="15,0" Foreground="#056F75" HorizontalAlignment="Center" VerticalAlignment="Center">
</TextBlock>
</Border>
</ControlTemplate>
</Button.Template>
</Button>
</StackPanel>
</Grid>
</Border>
</Grid>
</Border>
</Border>
</Window>

+ 102
- 0
BPASmart.UserManagement/MessageBox.xaml.cs View File

@@ -0,0 +1,102 @@
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 BPASmart.UserManagement
{
/// <summary>
/// MessageBox.xaml 的交互逻辑
/// </summary>

public class MessageResult
{
/// <summary>
/// 结果,Yes为true,No为false
/// </summary>
public bool IsYes { get; set; }
}
public class MessageBoxEventArgs : EventArgs
{
/// <summary>
/// 结果,Yes为true,No为false
/// </summary>
public MessageResult Result { get; set; }
}
/// <summary>
/// MessageBox.xaml 的交互逻辑
/// </summary>
public partial class MessageBox : Window
{
public event EventHandler<MessageBoxEventArgs> Result;

public string Context
{
get { return TB_Context.Text; }
set { TB_Context.Text = value; }
}
bool _isLegal = false;
public MessageBox()
{
InitializeComponent();
}
public static void Show(string context, EventHandler<MessageBoxEventArgs> result)
{
var mb = new MessageBox();
mb.Context = context;
mb.Result += result;
mb.Show();
}
public static void Show(string context)
{
var mb = new MessageBox();
mb.Context = context;
mb.Show();
}
public static MessageResult ShowDialog(string context)
{
var mb = new MessageBox();
mb.Context = context;
MessageResult r = null;
mb.Result += (s, e) =>
{
r = e.Result;
};
mb.ShowDialog();
return r;
}
private void No_Button_Click(object sender, RoutedEventArgs e)
{
_isLegal = true;
Close();
Result?.Invoke(this, new MessageBoxEventArgs() { Result = new MessageResult() { IsYes = false } });
}
private void Yes_Button_Click(object sender, RoutedEventArgs e)
{
_isLegal = true;
Close();
Result?.Invoke(this, new MessageBoxEventArgs() { Result = new MessageResult() { IsYes = true } });
}
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
e.Cancel = !_isLegal;
}

private void Border_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
this.DragMove();
}
}
}



+ 136
- 0
BPASmart.UserManagement/View/AddNewUser.xaml View File

@@ -0,0 +1,136 @@
<UserControl x:Class="BPASmart.UserManagement.View.AddNewUser"
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:BPASmart.UserManagement.View"
xmlns:common="clr-namespace:BPASmart.UserManagement.Helper"
xmlns:vm="clr-namespace:BPASmart.UserManagement.ViewModel"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.DataContext>
<vm:AddNewUserViewModel/>
</UserControl.DataContext>
<Border Margin="100,40">
<Border.Background>
<ImageBrush ImageSource="../Image/user背景.png" Stretch="Fill"/>
</Border.Background>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="14*"/>
<RowDefinition Height="36*"/>
<RowDefinition Height="192*"/>
<RowDefinition Height="51*"/>
<RowDefinition Height="77*"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="1" Text="注册新用户" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="#009DFF"
FontSize="24" Height="30" Width="120"/>
<Grid Grid.Row="2" Margin="10" VerticalAlignment="Center" Width="250">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBox
Name="Username"
Margin="5,5"
BorderBrush="#009DFF"
BorderThickness="3"
FontSize="18"
Foreground="#009DFF"
KeyDown="TextBox_KeyDown"
Height="40"
Style="{DynamicResource UserTextBoxStyle}"

TabIndex="1"
Text="{Binding UserName}" />

<PasswordBox
Name="pb"
Grid.Row="1"
Margin="5"
common:PasswordHelper.Attach="True"
common:PasswordHelper.Password="{Binding UserPassword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
BorderBrush="#009DFF"
BorderThickness="3"
FontSize="20"
Height="40"
Foreground="#009DFF"
KeyDown="pb_KeyDown"
PasswordChanged="PasswordBox_PasswordChanged"
Style="{DynamicResource PasswordBoxStyle}"
TabIndex="2" />
<PasswordBox
Name="pb2"
Grid.Row="2"
Margin="5"
common:PasswordHelper.Attach="True"
common:PasswordHelper.Password="{Binding ConfirmPassword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
BorderBrush="#009DFF"
BorderThickness="3"
FontSize="20"
Height="40"
Foreground="#009DFF"
KeyDown="pb2_KeyDown"
PasswordChanged="PasswordBox2_PasswordChanged"
Style="{DynamicResource PasswordBoxStyle}"
TabIndex="2" />

<TextBlock
Name="markText"
Grid.Row="1"
Margin="58,5"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="16"
Foreground="#88009dff"
IsHitTestVisible="False"
Text="请输入账号密码"
Visibility="Visible" />

<TextBlock
Name="mark2Text"
Grid.Row="2"
Margin="58,5"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="16"
Foreground="#88009dff"
IsHitTestVisible="False"
Text="请再次确认密码"
Visibility="Visible" />
</Grid>
<StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="top">
<Button
Grid.Column="1"
Command="{Binding ResgisterUserCommand}"
Content="注 册"
Style="{StaticResource CommonButton}"
FontSize="20"
TabIndex="3"
Width="120"
Background="#009DFF"
Foreground="White"
VerticalAlignment="Top"
Margin="20,0"/>
<Button
Command="{Binding ExitCommand}"
Content="退 出" FontSize="20"
Width="120"
Style="{StaticResource CommonButton}"
Background="#009DFF"
Foreground="White"
VerticalAlignment="Top"
Margin="20,0"
/>
</StackPanel>

<StackPanel Grid.Row="4" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Top" Visibility="{Binding ErrorVisibility}">
<Image Source="../image/科技警告.png" Width="25" Height="25" Stretch="Fill"/>
<TextBlock Margin="10,0" Text="{Binding ErrorMessage}" Foreground="#FF3F36" FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</StackPanel>
</Grid>
</Border>
</UserControl>

+ 54
- 0
BPASmart.UserManagement/View/AddNewUser.xaml.cs View File

@@ -0,0 +1,54 @@
using BPASmartClient.Helper;
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 BPASmart.UserManagement.View
{
/// <summary>
/// AddNewUser.xaml 的交互逻辑
/// </summary>
public partial class AddNewUser : UserControl
{
public AddNewUser()
{
InitializeComponent();
}

private void TextBox_KeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Enter) pb.Focus();
}

private void pb_KeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Enter) pb2.Focus();
}

private void pb2_KeyDown(object sender, KeyEventArgs e)
{

}

private void PasswordBox_PasswordChanged(object sender, RoutedEventArgs e)
{
this.markText.Visibility = this.pb.Password.Length > 0 ? Visibility.Collapsed : Visibility.Visible;
}

private void PasswordBox2_PasswordChanged(object sender, RoutedEventArgs e)
{
this.mark2Text.Visibility = this.pb2.Password.Length > 0 ? Visibility.Collapsed : Visibility.Visible;
}
}
}

+ 27
- 0
BPASmart.UserManagement/View/ChangeUser.xaml View File

@@ -0,0 +1,27 @@
<UserControl x:Class="BPASmart.UserManagement.View.ChangeUser"
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:BPASmart.UserManagement.View"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800" FontFamily="楷体">
<Border Margin="100,80">
<Border.Background>
<ImageBrush ImageSource="../Image/user背景.png" Stretch="Fill"/>
</Border.Background>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1.2*"/>
<RowDefinition Height="6*"/>
<RowDefinition Height="10*"/>
<RowDefinition Height="20*"/>
<RowDefinition Height="20*"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="1" Text="修改密码" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="#009DFF"
FontSize="22"/>
</Grid>
</Border>
</UserControl>

+ 28
- 0
BPASmart.UserManagement/View/ChangeUser.xaml.cs View File

@@ -0,0 +1,28 @@
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 BPASmart.UserManagement.View
{
/// <summary>
/// ChangeUser.xaml 的交互逻辑
/// </summary>
public partial class ChangeUser : UserControl
{
public ChangeUser()
{
InitializeComponent();
}
}
}

+ 163
- 0
BPASmart.UserManagement/View/UserList.xaml View File

@@ -0,0 +1,163 @@
<UserControl x:Class="BPASmart.UserManagement.View.UserList"
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:BPASmart.UserManagement.View"
xmlns:vm="clr-namespace:BPASmart.UserManagement.ViewModel"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="200" >
<UserControl.DataContext>
<vm:UserListViewModel/>
</UserControl.DataContext>
<UserControl.Resources>
<SolidColorBrush x:Key="menufont" Color="#B7C5DA"/>
<Style x:Key="menuText" TargetType="TextBlock">
<Setter Property="FontFamily" Value="pack://application:,,,/Fonts/#iconfont"/>
<Setter Property="Foreground" Value="{DynamicResource menufont}"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="Margin" Value="2,0"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
<Style x:Key="ItemContainer" TargetType="ListBoxItem">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Margin" Value="5"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Border x:Name="IconBorder" CornerRadius="4" BorderThickness="1" Background="Transparent">
<Grid Margin="20,5,0,5" HorizontalAlignment="Left" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<TextBlock x:Name="userIcon" Text="&#xe671;" FontFamily="pack://application:,,,/Fonts/#iconfont"
Foreground="{DynamicResource commanTextblock}" FontSize="26"
HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBlock x:Name="userText" Grid.Column="1" Text="{Binding UserName}" Foreground="{DynamicResource commanTextblock}"
FontSize="18" FontFamily="楷体"
HorizontalAlignment="Center" VerticalAlignment="Center" Margin="20,5,0,0"/>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="IconBorder" Property="BorderBrush" Value="Transparent"/>
<Setter TargetName="IconBorder" Property="Background" Value=" #3A5FCD">
</Setter>
<Setter TargetName="userText" Property="Foreground" Value="Orange"/>
<Setter TargetName="userIcon" Property="Foreground" Value="Orange"/>
<!--<Setter TargetName="userImage" Property="Source" Value="../image/账户黄.png"/>-->
</Trigger>
<Trigger Property="IsFocused" Value="true">
<Setter TargetName="IconBorder" Property="Background">
<Setter.Value>
<LinearGradientBrush StartPoint="1,0" EndPoint="1,1">
<GradientStop Color="#87CEFA" Offset="0"/>
<GradientStop Color=" #3A5FCD" Offset="0.2"/>
<GradientStop Color=" #1C86EE" Offset="0.4"/>
<GradientStop Color=" #87CEFA" Offset="1"/>
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter TargetName="userText" Property="Foreground" Value="Orange"/>
<Setter TargetName="userIcon" Property="Foreground" Value="Orange"/>
<!--<Setter TargetName="userImage" Property="Source" Value="../image/账户黄.png"/>-->
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="listbox" TargetType="ListBox">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
</Style>
</UserControl.Resources>
<Border>
<Border.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="#FF00203B" Offset="0"/>
<GradientStop Color="#FF020026" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" >
<Image Source="../image/List.png" Height="19" Margin="2,2,4,0" VerticalAlignment="Center" HorizontalAlignment="Stretch"/>
<TextBlock Text="用户列表" Foreground="White" FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center" />
</StackPanel>
<Border Grid.Row="1" BorderBrush="White" BorderThickness="0,1,0,0">
<ScrollViewer Grid.Row="1" Template="{DynamicResource ScrollViewerControlTemplate1 }" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">

<ListBox Style="{DynamicResource listbox}" ItemContainerStyle="{DynamicResource ItemContainer}" ItemsSource="{Binding userManagers}" >
<ListBox.ContextMenu>
<ContextMenu Height="auto">
<MenuItem Command="{Binding RegisterNewUserCommand}" >
<MenuItem.Header>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Style="{DynamicResource menuText}" Text="&#xe6d6;"/>
<TextBlock Grid.Column="1" Text="注册新用户" Style="{DynamicResource menuText}" FontFamily="楷体"/>
</Grid>
</MenuItem.Header>
</MenuItem>
<MenuItem Command="{Binding ChangePasswordCommand}"
CommandParameter="{Binding PlacementTarget.SelectedItem,RelativeSource={RelativeSource AncestorType=ContextMenu,Mode=FindAncestor}}">
<MenuItem.Header>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Style="{DynamicResource menuText}" Text="&#xe611;"/>
<TextBlock Grid.Column="1" Text="修改密码" Style="{DynamicResource menuText}" FontFamily="楷体" />
</Grid>
</MenuItem.Header>
</MenuItem>
<MenuItem Command="{Binding EditUsetPowerCommand}"
CommandParameter="{Binding PlacementTarget.SelectedItem,RelativeSource={RelativeSource AncestorType=ContextMenu,Mode=FindAncestor}}">
<MenuItem.Header>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Style="{DynamicResource menuText}" Text="&#xf0213;"/>
<TextBlock Grid.Column="1" Text="编辑权限" Style="{DynamicResource menuText}" FontFamily="楷体"/>
</Grid>
</MenuItem.Header>
</MenuItem>
<MenuItem Command="{Binding DeleteUserCommand}"
CommandParameter="{Binding PlacementTarget.SelectedItem,RelativeSource={RelativeSource AncestorType=ContextMenu,Mode=FindAncestor}}">
<MenuItem.Header>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Style="{DynamicResource menuText}" Text="&#xe8c1;"/>
<TextBlock Grid.Column="1" Text="删除用户" Style="{DynamicResource menuText}" FontFamily="楷体"/>
</Grid>
</MenuItem.Header>
</MenuItem>
</ContextMenu>
</ListBox.ContextMenu>

</ListBox>

</ScrollViewer>
</Border>
</Grid>
</Border>
</UserControl>

+ 30
- 0
BPASmart.UserManagement/View/UserList.xaml.cs View File

@@ -0,0 +1,30 @@
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 BPASmart.UserManagement.View
{
/// <summary>
/// UserList.xaml 的交互逻辑
/// </summary>
public partial class UserList : UserControl
{
public UserList()
{
InitializeComponent();
}

}
}

+ 108
- 0
BPASmart.UserManagement/ViewModel/AddNewUserViewModel.cs View File

@@ -0,0 +1,108 @@
using BPASmart.Model.用户;
using BPASmartClient.Helper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace BPASmart.UserManagement.ViewModel
{
[INotifyPropertyChanged]
partial class AddNewUserViewModel
{
/// <summary>
/// 用户名
/// </summary>
[ObservableProperty]
private string? _userName;
/// <summary>
/// 用户密码
/// </summary>
[ObservableProperty]
private string? _userPassword;
/// <summary>
/// 确认密码
/// </summary>
[ObservableProperty]
private string? _confirmPassword;

/// <summary>
/// 提示消息
/// </summary>
[ObservableProperty]
private string? _errorMessage;

[ObservableProperty]
private Visibility _errorVisibility = Visibility.Collapsed;

[RelayCommand]
private void ResgisterUser()
{
if(UserName == null)
{
ErrorVisibility = Visibility.Visible;
ErrorMessage = "请输入用户名";
return;
}
if(UserPassword == null)
{
ErrorVisibility = Visibility.Visible;
ErrorMessage = "请输入密码";
return;
}
if (UserPassword != ConfirmPassword)
{
ErrorVisibility = Visibility.Visible;
ErrorMessage = "两次密码不一致";
return;
}
if(Json<LocalUser>.Data.UserManagers!= null)
{
var res = Json<LocalUser>.Data.UserManagers.FirstOrDefault(p => p.UserName == UserName);
{
if(res != null)
{
ErrorVisibility = Visibility.Visible;
ErrorMessage = "用户名已存在";
return;
}
else
{
Json<LocalUser>.Data.UserManagers.Add(new UserManager
{
UserID = Guid.NewGuid().ToString(),
UserName = UserName,
Password = AESHelper.Encrypt(UserPassword)
});
}
}

}
else
{
Json<LocalUser>.Data.UserManagers.Add(new UserManager
{
UserID = Guid.NewGuid().ToString(),
UserName = UserName,
Password = AESHelper.Encrypt(UserPassword)
});
}
Json<LocalUser>.Save();
MessageBox.Show("注册成功");

}

[RelayCommand]
private void Exit()
{
ActionManage.GetInstance.Send("ChangeMianContent",string.Empty);
}

public AddNewUserViewModel()
{
}
}
}

+ 14
- 0
BPASmart.UserManagement/ViewModel/ChangeUserViewModel.cs View File

@@ -0,0 +1,14 @@

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmart.UserManagement.ViewModel
{
public class ChangeUserViewModel:ObservableObject
{
}
}

+ 21
- 0
BPASmart.UserManagement/ViewModel/MainWindowViewModel.cs View File

@@ -0,0 +1,21 @@
global using CommunityToolkit.Mvvm.ComponentModel;
global using CommunityToolkit.Mvvm.DependencyInjection;
global using CommunityToolkit.Mvvm.Input;
global using BPASmartClient.Helper;
global using System;
global using System.Collections.Generic;
global using System.Linq;
global using System.Text;
global using System.Threading.Tasks;
global using BPASmart.Model.用户;

namespace BPASmart.UserManagement.ViewModel
{
public class MainWindowViewModel:ObservableObject
{
public MainWindowViewModel()
{
Json<LocalUser>.Read();
}
}
}

+ 84
- 0
BPASmart.UserManagement/ViewModel/UserListViewModel.cs View File

@@ -0,0 +1,84 @@
using BPASmart.Model.用户;
using BPASmartClient.Helper;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmart.UserManagement.ViewModel
{
partial class UserListViewModel:ObservableObject
{
/// <summary>
/// 用户列表
/// </summary>
public ObservableCollection<UserManager> userManagers { get; set; } = Json<LocalUser>.Data.UserManagers;

/// <summary>
/// 注册新用户
/// </summary>
[RelayCommand]
private void RegisterNewUser()
{
ActionManage.GetInstance.Send("ChangeMianContent", "AddNewUser");
}
/// <summary>
/// 修改密码
/// </summary>
[RelayCommand]
private void ChangePassword(object o)
{
if (o == null) return;
if (o is UserManager user)
{
if(userManagers.Contains(user))
{

}

}

}
/// <summary>
/// 编辑权限
/// </summary>
[RelayCommand]
private void EditUsetPower(object o)
{
if (o == null) return;
if (o is UserManager user)
{
if (userManagers.Contains(user))
{

}

}
}
/// <summary>
/// 删除用户
/// </summary>
[RelayCommand]
private void DeleteUser(object o)
{
if (o == null) return;
if (o is UserManager user)
{
if (userManagers.Contains(user))
{
userManagers.Remove(user);
}

}
Json<LocalUser>.Save();

}

public UserListViewModel()
{
}
}
}

+ 24
- 1
SmartClient.sln View File

@@ -168,12 +168,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BeDesignerSCADA", "BeDesign
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmart.RecipeManagement", "BPASmart.RecipeManagement\BPASmart.RecipeManagement.csproj", "{28EBFC11-184A-4B88-A7B3-84F3FD768520}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PermissionManagement", "PermissionManagement\PermissionManagement.csproj", "{BE6E7BC1-F250-4D11-8051-1B0F93AD2401}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PermissionManagement", "PermissionManagement\PermissionManagement.csproj", "{BE6E7BC1-F250-4D11-8051-1B0F93AD2401}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmart.SmallBatchingSystem", "BPASmart.SmallBatchingSystem\BPASmart.SmallBatchingSystem.csproj", "{DB6DC970-859C-4C63-AE9B-BA415D56CECD}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmart.ConfigurationSoftware", "BPASmart.ConfigurationSoftware\BPASmart.ConfigurationSoftware.csproj", "{897F8379-3301-4CBE-9BCA-AF7FD2F963A9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmart.UserManagement", "BPASmart.UserManagement\BPASmart.UserManagement.csproj", "{06F30619-AD37-4CA0-838F-0431867E0932}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -1608,6 +1610,26 @@ Global
{897F8379-3301-4CBE-9BCA-AF7FD2F963A9}.Release|x64.Build.0 = Release|Any CPU
{897F8379-3301-4CBE-9BCA-AF7FD2F963A9}.Release|x86.ActiveCfg = Release|Any CPU
{897F8379-3301-4CBE-9BCA-AF7FD2F963A9}.Release|x86.Build.0 = Release|Any CPU
{06F30619-AD37-4CA0-838F-0431867E0932}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{06F30619-AD37-4CA0-838F-0431867E0932}.Debug|Any CPU.Build.0 = Debug|Any CPU
{06F30619-AD37-4CA0-838F-0431867E0932}.Debug|ARM.ActiveCfg = Debug|Any CPU
{06F30619-AD37-4CA0-838F-0431867E0932}.Debug|ARM.Build.0 = Debug|Any CPU
{06F30619-AD37-4CA0-838F-0431867E0932}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{06F30619-AD37-4CA0-838F-0431867E0932}.Debug|ARM64.Build.0 = Debug|Any CPU
{06F30619-AD37-4CA0-838F-0431867E0932}.Debug|x64.ActiveCfg = Debug|Any CPU
{06F30619-AD37-4CA0-838F-0431867E0932}.Debug|x64.Build.0 = Debug|Any CPU
{06F30619-AD37-4CA0-838F-0431867E0932}.Debug|x86.ActiveCfg = Debug|Any CPU
{06F30619-AD37-4CA0-838F-0431867E0932}.Debug|x86.Build.0 = Debug|Any CPU
{06F30619-AD37-4CA0-838F-0431867E0932}.Release|Any CPU.ActiveCfg = Release|Any CPU
{06F30619-AD37-4CA0-838F-0431867E0932}.Release|Any CPU.Build.0 = Release|Any CPU
{06F30619-AD37-4CA0-838F-0431867E0932}.Release|ARM.ActiveCfg = Release|Any CPU
{06F30619-AD37-4CA0-838F-0431867E0932}.Release|ARM.Build.0 = Release|Any CPU
{06F30619-AD37-4CA0-838F-0431867E0932}.Release|ARM64.ActiveCfg = Release|Any CPU
{06F30619-AD37-4CA0-838F-0431867E0932}.Release|ARM64.Build.0 = Release|Any CPU
{06F30619-AD37-4CA0-838F-0431867E0932}.Release|x64.ActiveCfg = Release|Any CPU
{06F30619-AD37-4CA0-838F-0431867E0932}.Release|x64.Build.0 = Release|Any CPU
{06F30619-AD37-4CA0-838F-0431867E0932}.Release|x86.ActiveCfg = Release|Any CPU
{06F30619-AD37-4CA0-838F-0431867E0932}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1688,6 +1710,7 @@ Global
{BE6E7BC1-F250-4D11-8051-1B0F93AD2401} = {CDC1E762-5E1D-4AE1-9DF2-B85761539086}
{DB6DC970-859C-4C63-AE9B-BA415D56CECD} = {CDC1E762-5E1D-4AE1-9DF2-B85761539086}
{897F8379-3301-4CBE-9BCA-AF7FD2F963A9} = {CDC1E762-5E1D-4AE1-9DF2-B85761539086}
{06F30619-AD37-4CA0-838F-0431867E0932} = {CDC1E762-5E1D-4AE1-9DF2-B85761539086}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9AEC9B81-0222-4DE9-B642-D915C29222AC}


Loading…
Cancel
Save