diff --git a/BPASmart.Model/配方/LocalMaterails.cs b/BPASmart.Model/配方/LocalMaterails.cs new file mode 100644 index 00000000..3ede4927 --- /dev/null +++ b/BPASmart.Model/配方/LocalMaterails.cs @@ -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 LocalMaterails + { + public ObservableCollection locaMaterails { get; set; } = new ObservableCollection(); + } +} diff --git a/BPASmart.Model/配方/LocalRecipes.cs b/BPASmart.Model/配方/LocalRecipes.cs new file mode 100644 index 00000000..41515a36 --- /dev/null +++ b/BPASmart.Model/配方/LocalRecipes.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BPASmart.Model.配方 +{ + public class LocalRecipes + { + + } +} diff --git a/BPASmart.Model/配方/RecipeMaterials.cs b/BPASmart.Model/配方/RecipeMaterials.cs new file mode 100644 index 00000000..35cb7dfd --- /dev/null +++ b/BPASmart.Model/配方/RecipeMaterials.cs @@ -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 RecipeMaterials:ObservableObject + { + /// + /// 原料ID + /// + public string ID { get { return _id; } set { _id = value; OnPropertyChanged(); } } + private string _id; + /// + /// 物料名称 + /// + public string Name { get { return _name; } set { _name = value;OnPropertyChanged(); } } + private string _name; + /// + /// 物料种类 + /// + public MaterialType MaterialType { get { return _materialType; } set { _materialType = value; OnPropertyChanged(); } } + private MaterialType _materialType; + /// + /// 物料重量 + /// + public int MaterialWeight { get { return _materialWeight; } set { _materialWeight = value; OnPropertyChanged(); } } + private int _materialWeight; + /// + /// 原料位置 + /// + public string MaterialPosion { get { return _materialPosion; } set { _materialPosion = value;OnPropertyChanged(); } } + private string _materialPosion; + } + + public enum MaterialType + { + 无 = 0, + 干料 = 1, + 湿料 = 2, + 粉体 = 3, + 膏体 = 4 + } + +} diff --git a/BPASmart.Model/配方/Recipes.cs b/BPASmart.Model/配方/Recipes.cs new file mode 100644 index 00000000..10f0b4be --- /dev/null +++ b/BPASmart.Model/配方/Recipes.cs @@ -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 Recipes + { + public ObservableCollection Materials { get; set; } + } +} diff --git a/BPASmart.RecipeManagement/App.xaml b/BPASmart.RecipeManagement/App.xaml new file mode 100644 index 00000000..fc09f9a4 --- /dev/null +++ b/BPASmart.RecipeManagement/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/BPASmart.RecipeManagement/App.xaml.cs b/BPASmart.RecipeManagement/App.xaml.cs new file mode 100644 index 00000000..b9814a15 --- /dev/null +++ b/BPASmart.RecipeManagement/App.xaml.cs @@ -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.RecipeManagement +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/BPASmart.RecipeManagement/AssemblyInfo.cs b/BPASmart.RecipeManagement/AssemblyInfo.cs new file mode 100644 index 00000000..8b5504ec --- /dev/null +++ b/BPASmart.RecipeManagement/AssemblyInfo.cs @@ -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) +)] diff --git a/BPASmart.RecipeManagement/BPASmart.RecipeManagement.csproj b/BPASmart.RecipeManagement/BPASmart.RecipeManagement.csproj new file mode 100644 index 00000000..42495326 --- /dev/null +++ b/BPASmart.RecipeManagement/BPASmart.RecipeManagement.csproj @@ -0,0 +1,23 @@ + + + + WinExe + net6.0-windows + enable + true + False + + + + + + + + + + + + + + + diff --git a/BPASmart.RecipeManagement/Globle/GlobleData.cs b/BPASmart.RecipeManagement/Globle/GlobleData.cs new file mode 100644 index 00000000..12fb80ef --- /dev/null +++ b/BPASmart.RecipeManagement/Globle/GlobleData.cs @@ -0,0 +1,14 @@ +using BPASmart.Model.配方; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BPASmart.RecipeManagement.Globle +{ + public class GlobleData + { + public static RecipeMaterials ChangeMaterail; + } +} diff --git a/BPASmart.RecipeManagement/MainWindow.xaml b/BPASmart.RecipeManagement/MainWindow.xaml new file mode 100644 index 00000000..8b37e09d --- /dev/null +++ b/BPASmart.RecipeManagement/MainWindow.xaml @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/BPASmart.RecipeManagement/MainWindow.xaml.cs b/BPASmart.RecipeManagement/MainWindow.xaml.cs new file mode 100644 index 00000000..dbceef5b --- /dev/null +++ b/BPASmart.RecipeManagement/MainWindow.xaml.cs @@ -0,0 +1,61 @@ +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.RecipeManagement +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + + } + + private void mylistview_MouseDown(object sender, MouseButtonEventArgs e) + { + this.DragMove(); + } + + private void Button_Click(object sender, RoutedEventArgs e) + { + this.Close(); + } + + + private void NavButton_Click(object sender, RoutedEventArgs e) + { + + + try + { + if (sender is Button bt) + { + Type type = Type.GetType($"BPASmartClient.MilkWithTea.View.{bt.Tag?.ToString()}"); + ConstructorInfo cti = type.GetConstructor(System.Type.EmptyTypes); + contentRegion.Content = (FrameworkElement)cti.Invoke(null); + + } + } + catch (Exception ex) + { + + } + } + } +} diff --git a/BPASmart.RecipeManagement/View/MaterialConfigure.xaml b/BPASmart.RecipeManagement/View/MaterialConfigure.xaml new file mode 100644 index 00000000..5f753932 --- /dev/null +++ b/BPASmart.RecipeManagement/View/MaterialConfigure.xaml @@ -0,0 +1,212 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +