diff --git a/BPASmartClient.CustomResource/RecDictionarys/GlobalStyle.xaml b/BPASmartClient.CustomResource/RecDictionarys/GlobalStyle.xaml new file mode 100644 index 00000000..373c7848 --- /dev/null +++ b/BPASmartClient.CustomResource/RecDictionarys/GlobalStyle.xaml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/BPASmartClient.CustomResource/Themes/GenricStyle.xaml b/BPASmartClient.CustomResource/Themes/GenricStyle.xaml index 283ccbb2..7e92e855 100644 --- a/BPASmartClient.CustomResource/Themes/GenricStyle.xaml +++ b/BPASmartClient.CustomResource/Themes/GenricStyle.xaml @@ -1,46 +1,51 @@ - + - + - - - - - - + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - + + + + + - - + - - - - + - - - - + - - - + + + - - - - + VerticalAlignment="Center" + ContentSource="Header" + RecognizesAccessKey="True" /> + + + - + - + - - + + - + @@ -1729,129 +2283,132 @@ - - + + - + - - + + - + - - + + - + - + - + - + - - - + + + - + - - + + - - - + + + - - + + - + - + - - + + - + - + - + - + - + + - - + + - + - - + + - - - - - - - + + + + + + + - + @@ -1928,93 +2482,110 @@ - + - - + + - + - + - + - - + - + - + - + - + @@ -2086,32 +2684,36 @@ - + - + M 0 0 L 3.5 4 L 7 0 Z - + - - - - + + + + - + - - + + - + - + - - + + - + - - - + + + - - + + - - + + - + - - - + + + - + - + - + - + - - - - + - + - + - + - + - + - + - + - + - + @@ -293,17 +332,17 @@ - + - + - - + + @@ -542,7 +587,7 @@ - + @@ -552,7 +597,7 @@ - + @@ -562,7 +607,7 @@ - + @@ -572,7 +617,7 @@ - + @@ -580,13 +625,13 @@ - + - - + - - @@ -1273,7 +1431,7 @@ - + - + - + - - - - + + diff --git a/BPASmartClient.CustomResource/UserControls/Quadrilateral.xaml b/BPASmartClient.CustomResource/UserControls/Quadrilateral.xaml new file mode 100644 index 00000000..3d0a2b2b --- /dev/null +++ b/BPASmartClient.CustomResource/UserControls/Quadrilateral.xaml @@ -0,0 +1,20 @@ + + + + + + + diff --git a/BPASmartClient.CustomResource/UserControls/Quadrilateral.xaml.cs b/BPASmartClient.CustomResource/UserControls/Quadrilateral.xaml.cs new file mode 100644 index 00000000..19313904 --- /dev/null +++ b/BPASmartClient.CustomResource/UserControls/Quadrilateral.xaml.cs @@ -0,0 +1,96 @@ +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 BPASmartClient.CustomResource.UserControls +{ + /// + /// Quadrilateral.xaml 的交互逻辑 + /// + public partial class Quadrilateral : UserControl + { + public Quadrilateral() + { + InitializeComponent(); + } + + + public static void OnPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + (d as Quadrilateral).Refresh(); + } + + /// + /// 依赖属性更改的委托 + /// + private void Refresh() + { + this.poly.Fill = FillColor; + this.poly.StrokeThickness = StrokeThickness; + this.poly.Stroke = Stroke; + } + + #region FillColor:填充颜色 依赖属性 + /// + /// 填充颜色 + /// + public Brush FillColor + { + get { return (Brush)GetValue(FillColorProperty); } + set { SetValue(FillColorProperty, value); } + } + public static readonly DependencyProperty FillColorProperty = + DependencyProperty.Register("FillColor", typeof(Brush), typeof(Quadrilateral), + new PropertyMetadata(default(Brush), new PropertyChangedCallback(OnPropertyChanged))); + #endregion + + #region 外边线宽度 + /// + /// 外边线宽度 + /// + public int StrokeThickness + { + get { return (int)GetValue(StrokeThicknessProperty); } + set { SetValue(StrokeThicknessProperty, value); } + } + public static readonly DependencyProperty StrokeThicknessProperty = + DependencyProperty.Register("StrokeThickness", typeof(int), typeof(Quadrilateral), + new PropertyMetadata(0, new PropertyChangedCallback(OnPropertyChanged))); + #endregion + + #region 外边框颜色 + /// + /// 外边框颜色 + /// + public Brush Stroke + { + get { return (Brush)GetValue(StrokeProperty); } + set { SetValue(StrokeProperty, value); } + } + public static readonly DependencyProperty StrokeProperty = + DependencyProperty.Register("Stroke", typeof(Brush), typeof(Quadrilateral), + new PropertyMetadata(default(Brush), new PropertyChangedCallback(OnPropertyChanged))); + #endregion + + private void Canvas_SizeChanged(object sender, SizeChangedEventArgs e) + { + PointCollection points = new PointCollection(); + points.Add(new Point(0, 0)); + points.Add(new Point(e.NewSize.Width - (e.NewSize.Height / 2), 0)); + points.Add(new Point(e.NewSize.Width, e.NewSize.Height)); + points.Add(new Point(e.NewSize.Height / 2, e.NewSize.Height)); + this.poly.Points = points; + } + } +} diff --git a/BPASmartClient.CustomResource/UserControls/TitleTextBlock.xaml b/BPASmartClient.CustomResource/UserControls/TitleTextBlock.xaml new file mode 100644 index 00000000..a5220441 --- /dev/null +++ b/BPASmartClient.CustomResource/UserControls/TitleTextBlock.xaml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + diff --git a/BPASmartClient.CustomResource/UserControls/TitleTextBlock.xaml.cs b/BPASmartClient.CustomResource/UserControls/TitleTextBlock.xaml.cs new file mode 100644 index 00000000..a03ee96a --- /dev/null +++ b/BPASmartClient.CustomResource/UserControls/TitleTextBlock.xaml.cs @@ -0,0 +1,38 @@ +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 BPASmartClient.CustomResource.UserControls +{ + /// + /// TitleTextBlock.xaml 的交互逻辑 + /// + public partial class TitleTextBlock : UserControl + { + public TitleTextBlock() + { + InitializeComponent(); + } + + private void Canvas_SizeChanged(object sender, SizeChangedEventArgs e) + { + PointCollection points = new PointCollection(); + points.Add(new Point(0, 0)); + points.Add(new Point(e.NewSize.Width - (e.NewSize.Height / 2), 0)); + points.Add(new Point(e.NewSize.Width, e.NewSize.Height)); + points.Add(new Point(0, e.NewSize.Height)); + this.poly.Points = points; + } + } +} diff --git a/BPASmartClient.MorkS/Control.cs b/BPASmartClient.MorkS/Control.cs index f3ba21e6..4b7215f6 100644 --- a/BPASmartClient.MorkS/Control.cs +++ b/BPASmartClient.MorkS/Control.cs @@ -107,10 +107,8 @@ namespace BPASmartClient.MorkS { ThreadManage.GetInstance().StartLong(new Action(() => { - var bools = (bool[])peripheralStatus["M0.3"]; mORKS.RobotTakeNoodle = bools[0]; - mORKS.RobotTakeNoodle = bools[0]; mORKS.RobotOutMeal = bools[1]; mORKS.MoveTurntable = bools[2]; diff --git a/BPASmartClient.ViewModel/ShopDeviceConfigViewModel.cs b/BPASmartClient.ViewModel/ShopDeviceConfigViewModel.cs new file mode 100644 index 00000000..b6b6154e --- /dev/null +++ b/BPASmartClient.ViewModel/ShopDeviceConfigViewModel.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Microsoft.Toolkit.Mvvm.ComponentModel; + +namespace BPASmartClient.ViewModel +{ + public class ShopDeviceConfigViewModel : ObservableObject + { + } +} diff --git a/BPASmartClient/App.xaml b/BPASmartClient/App.xaml index bb21ce47..c335986f 100644 --- a/BPASmartClient/App.xaml +++ b/BPASmartClient/App.xaml @@ -10,6 +10,8 @@ + + diff --git a/BPASmartClient/Control/ShopDeviceConfigView.xaml b/BPASmartClient/Control/ShopDeviceConfigView.xaml index 991df0c6..edc2e135 100644 --- a/BPASmartClient/Control/ShopDeviceConfigView.xaml +++ b/BPASmartClient/Control/ShopDeviceConfigView.xaml @@ -1,12 +1,513 @@ - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +