diff --git a/BPASmart.Model/配方/LocalRecipes.cs b/BPASmart.Model/配方/LocalRecipes.cs index 41515a36..74a4c335 100644 --- a/BPASmart.Model/配方/LocalRecipes.cs +++ b/BPASmart.Model/配方/LocalRecipes.cs @@ -1,13 +1,16 @@ -using System; + +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 LocalRecipes + public class LocalRecipes { - + public ObservableCollection locaRecipes { get; set; } = new ObservableCollection(); } + } diff --git a/BPASmart.Model/配方/Order.cs b/BPASmart.Model/配方/Order.cs new file mode 100644 index 00000000..bcc4a8aa --- /dev/null +++ b/BPASmart.Model/配方/Order.cs @@ -0,0 +1,36 @@ +using Microsoft.Toolkit.Mvvm.ComponentModel; +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 Order:ObservableObject + { + /// + /// 订单ID + /// + public string OrderId { get { return _orderId; } set { _orderId = value; OnPropertyChanged(); } } + private string _orderId; + + /// + /// 下单时间 + /// + public string OrderdateTime { get { return _orderDateTime; } set { _orderDateTime = value; OnPropertyChanged(); } } + private string _orderDateTime; + + /// + /// 订单完成时间 + /// + public string OrderCompeleteTime { get { return _orderCompeleteTime; } set { _orderCompeleteTime = value; OnPropertyChanged(); } } + private string _orderCompeleteTime; + + /// + /// 配方集合 + /// + public ObservableCollection Recipes { get; set; } = new ObservableCollection(); + } +} diff --git a/BPASmart.Model/配方/Recipes.cs b/BPASmart.Model/配方/Recipes.cs index 10f0b4be..27f66760 100644 --- a/BPASmart.Model/配方/Recipes.cs +++ b/BPASmart.Model/配方/Recipes.cs @@ -1,4 +1,5 @@ -using System; +using Microsoft.Toolkit.Mvvm.ComponentModel; +using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; @@ -7,8 +8,43 @@ using System.Threading.Tasks; namespace BPASmart.Model.配方 { - public class Recipes + public class Recipes:ObservableObject { - public ObservableCollection Materials { get; set; } + /// + /// 配方ID + /// + public string ID { get { return _id; } set { _id = value; OnPropertyChanged(); } } + private string _id; + + /// + /// 配方名称 + /// + public string Name { get { return _name; } set { _name = value; OnPropertyChanged(); } } + public string _name; + + /// + /// 配方状态 + /// + public RecipeStates RecipeState { get { return _recipeState; } set { _recipeState = value; OnPropertyChanged(); } } + public RecipeStates _recipeState; + + /// + /// 配方单数 + /// + public int RecipeCount { get { return _recipeCount; } set { _recipeCount = value; OnPropertyChanged(); } } + private int _recipeCount; + /// + /// 配方原料集合 + /// + public ObservableCollection recipeMaterials { get; set; } + + } + + public enum RecipeStates + { + 等待制作 = 0, + 制作中 = 1, + 制作完成 = 2 } } + diff --git a/BPASmart.RecipeManagement/App.xaml b/BPASmart.RecipeManagement/App.xaml index fc09f9a4..c488f68c 100644 --- a/BPASmart.RecipeManagement/App.xaml +++ b/BPASmart.RecipeManagement/App.xaml @@ -4,6 +4,272 @@ xmlns:local="clr-namespace:BPASmart.RecipeManagement" StartupUri="MainWindow.xaml"> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/BPASmart.RecipeManagement/BPASmart.RecipeManagement.csproj b/BPASmart.RecipeManagement/BPASmart.RecipeManagement.csproj index 42495326..d52552a2 100644 --- a/BPASmart.RecipeManagement/BPASmart.RecipeManagement.csproj +++ b/BPASmart.RecipeManagement/BPASmart.RecipeManagement.csproj @@ -15,9 +15,37 @@ + + + + + + + + Code + + + + + + $(DefaultXamlRuntime) + Designer + + + + + + Always + + + + + + + diff --git a/BPASmart.RecipeManagement/Globle/GlobleData.cs b/BPASmart.RecipeManagement/Globle/GlobleData.cs index 12fb80ef..c0db0770 100644 --- a/BPASmart.RecipeManagement/Globle/GlobleData.cs +++ b/BPASmart.RecipeManagement/Globle/GlobleData.cs @@ -1,6 +1,7 @@ using BPASmart.Model.配方; using System; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -10,5 +11,9 @@ namespace BPASmart.RecipeManagement.Globle public class GlobleData { public static RecipeMaterials ChangeMaterail; + + public static Recipes ChangeRecipes; + + public static ObservableCollection orders { get; set; } = new ObservableCollection(); } } diff --git a/BPASmart.RecipeManagement/Image/AddGreen.png b/BPASmart.RecipeManagement/Image/AddGreen.png new file mode 100644 index 00000000..13676da2 Binary files /dev/null and b/BPASmart.RecipeManagement/Image/AddGreen.png differ diff --git a/BPASmart.RecipeManagement/Image/Delete.png b/BPASmart.RecipeManagement/Image/Delete.png new file mode 100644 index 00000000..f53eb2b3 Binary files /dev/null and b/BPASmart.RecipeManagement/Image/Delete.png differ diff --git a/BPASmart.RecipeManagement/MainWindow.xaml b/BPASmart.RecipeManagement/MainWindow.xaml index 8b37e09d..0781e346 100644 --- a/BPASmart.RecipeManagement/MainWindow.xaml +++ b/BPASmart.RecipeManagement/MainWindow.xaml @@ -7,7 +7,7 @@ xmlns:view="clr-namespace:BPASmart.RecipeManagement.View" xmlns:vm="clr-namespace:BPASmart.RecipeManagement.ViewModel" mc:Ignorable="d" - Title="MainWindow" Height="900" Width="1600" WindowStyle="None" WindowStartupLocation="CenterScreen"> + Title="MainWindow" Height="900" Width="1400" WindowStyle="None" WindowStartupLocation="CenterScreen"> @@ -81,14 +81,16 @@ - + + + Click="NavButton_Click" Tag="MaterialManager"/> + Click="NavButton_Click" Tag="TechnologySetting"/> + Click="NavButton_Click" Tag="PowerManager"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/BPASmart.RecipeManagement/View/PowerManager.xaml.cs b/BPASmart.RecipeManagement/View/PowerManager.xaml.cs new file mode 100644 index 00000000..917d0d85 --- /dev/null +++ b/BPASmart.RecipeManagement/View/PowerManager.xaml.cs @@ -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.RecipeManagement.View +{ + /// + /// PowerManager.xaml 的交互逻辑 + /// + public partial class PowerManager : UserControl + { + public PowerManager() + { + InitializeComponent(); + } + } +} diff --git a/BPASmart.RecipeManagement/View/RecipeManager.xaml b/BPASmart.RecipeManagement/View/RecipeManager.xaml new file mode 100644 index 00000000..22f6b89d --- /dev/null +++ b/BPASmart.RecipeManagement/View/RecipeManager.xaml @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/BPASmart.RecipeManagement/View/RecipeManager.xaml.cs b/BPASmart.RecipeManagement/View/RecipeManager.xaml.cs new file mode 100644 index 00000000..b0632507 --- /dev/null +++ b/BPASmart.RecipeManagement/View/RecipeManager.xaml.cs @@ -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.RecipeManagement.View +{ + /// + /// RecipeManager.xaml 的交互逻辑 + /// + public partial class RecipeManager : UserControl + { + public RecipeManager() + { + InitializeComponent(); + } + } +} diff --git a/BPASmart.RecipeManagement/View/RecipesConfigure.xaml b/BPASmart.RecipeManagement/View/RecipesConfigure.xaml new file mode 100644 index 00000000..cb9e0cd1 --- /dev/null +++ b/BPASmart.RecipeManagement/View/RecipesConfigure.xaml @@ -0,0 +1,273 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +