diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs index 651048c..03deb17 100644 --- a/Properties/Resources.Designer.cs +++ b/Properties/Resources.Designer.cs @@ -19,7 +19,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.Properties { // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen // (以 /str 作为命令选项),或重新生成 VS 项目。 - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "18.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class Resources { @@ -2400,6 +2400,15 @@ namespace SunlightCentralizedControlManagement_SCCM_.Properties { } } + /// + /// 查找类似 Start 的本地化字符串。 + /// + public static string Start { + get { + return ResourceManager.GetString("Start", resourceCulture); + } + } + /// /// 查找类似 StartDate 的本地化字符串。 /// diff --git a/Properties/Resources.en-US.resx b/Properties/Resources.en-US.resx index c6fa5d4..baabba5 100644 --- a/Properties/Resources.en-US.resx +++ b/Properties/Resources.en-US.resx @@ -1083,4 +1083,7 @@ Swing + + Start + \ No newline at end of file diff --git a/Properties/Resources.resx b/Properties/Resources.resx index bff6835..ca9ef7d 100644 --- a/Properties/Resources.resx +++ b/Properties/Resources.resx @@ -1083,4 +1083,7 @@ Swing + + Start + \ No newline at end of file diff --git a/Properties/Resources.zh-CN.resx b/Properties/Resources.zh-CN.resx index 50f8b9c..ce4a1ee 100644 --- a/Properties/Resources.zh-CN.resx +++ b/Properties/Resources.zh-CN.resx @@ -1083,4 +1083,7 @@ 摆布 + + 开始 + \ No newline at end of file diff --git a/Properties/Resources.zh-TW.resx b/Properties/Resources.zh-TW.resx index b66aaff..fabc61b 100644 --- a/Properties/Resources.zh-TW.resx +++ b/Properties/Resources.zh-TW.resx @@ -1080,11 +1080,10 @@ 手/自動 - - - - 擺佈 + + + \ No newline at end of file diff --git a/View/MonitorView.xaml b/View/MonitorView.xaml index f831eec..d07ed8d 100644 --- a/View/MonitorView.xaml +++ b/View/MonitorView.xaml @@ -20,6 +20,8 @@ + + diff --git a/View/MonitorView.xaml.cs b/View/MonitorView.xaml.cs index ca009a1..4753ca9 100644 --- a/View/MonitorView.xaml.cs +++ b/View/MonitorView.xaml.cs @@ -1,5 +1,5 @@ using LiveChartsCore.Geo; - using SkiaSharp; +using SkiaSharp; using SunlightCentralizedControlManagement_SCCM_.UserClass; using SunlightCentralizedControlManagement_SCCM_.ViewModel; using SunlightCentralizedControlManagement_SCCM_.WindowsView; @@ -140,6 +140,93 @@ namespace SunlightCentralizedControlManagement_SCCM_.View } } + private void MenuItem_LOCK_XML(object sender, RoutedEventArgs e) + { + bool mode = MainWindowViewModel.Machines.Select("NAME='" + machine + "'").First().Field("LOCK"); + + Dictionary dat_ = new Dictionary(); + dat_.Clear(); + + if (!mode) + { + dat_.Add("NAME", "LOCK"); + dat_.Add("VALUE", "True"); + MainWindowViewModel.Updata_Machines(MainWindowViewModel.Machines, "LOCK", "Name='" + machine + "'", "True"); + } + else + { + dat_.Add("NAME", "LOCK"); + dat_.Add("VALUE", "False"); + MainWindowViewModel.Updata_Machines(MainWindowViewModel.Machines, "LOCK", "Name='" + machine + "'", "False"); + } + + DataRow drEmployee = MainWindowViewModel.Machines.Select("NAME='" + machine + "'").First(); + int index = Convert.ToInt16(drEmployee.Field("ID")); + MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString + { + ID = index, + DAT = "SC829" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_.ToJsonString() + }); + + if (!mode) + { + MessageBox.Show(machine + Properties.Resources.user_lock, "800", MessageBoxButton.OK, MessageBoxImage.Information); + } + else + { + MessageBox.Show(machine + Properties.Resources.user_unlock, "800", MessageBoxButton.OK, MessageBoxImage.Information); + } + }//锁定 + private void MenuItem_AUTO_XML(object sender, RoutedEventArgs e) + { + bool mode = MainWindowViewModel.Machines.Select("NAME='" + machine + "'").First().Field("AUTO"); + + Dictionary dat_ = new Dictionary(); + dat_.Clear(); + + if (!mode) + { + dat_.Add("NAME", "AUTO"); + dat_.Add("VALUE", "True"); + MainWindowViewModel.Updata_Machines(MainWindowViewModel.Machines, "AUTO", "Name='" + machine + "'", "True"); + } + else + { + dat_.Add("NAME", "AUTO"); + dat_.Add("VALUE", "FALSE"); + MainWindowViewModel.Updata_Machines(MainWindowViewModel.Machines, "AUTO", "Name='" + machine + "'", "False"); + } + + DataRow drEmployee = MainWindowViewModel.Machines.Select("NAME='" + machine + "'").First(); + int index = Convert.ToInt16(drEmployee.Field("ID")); + MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString + { + ID = index, + DAT = "SC829" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_.ToJsonString() + }); + + }//手自动 + private void MenuItem_Stop_XML(object sender, RoutedEventArgs e) + { + if (!string.IsNullOrEmpty(machine)) + { + Dictionary dat_821 = new Dictionary(); + dat_821.Clear(); + dat_821.Add("INSTRUCTION", "STOP"); + DataRow drEmployee = MainWindowViewModel.Machines.Select("NAME='" + machine + "'").First(); + int index = Convert.ToInt16(drEmployee.Field("ID")); + MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString + { + ID = index, + DAT = "SC821" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_821.ToJsonString() + }); + } + }//停止 + private void MenuItem_Start_XML(object sender, RoutedEventArgs e) + { + + + }//开始 private void ListViewItem_DyeingMachine(object sender, MouseButtonEventArgs e) { if (rdp.IsConnected)rdp.Disconnect(); @@ -225,68 +312,6 @@ namespace SunlightCentralizedControlManagement_SCCM_.View dyelotView.DyelotDatatable(Product_DAT); Picture.Content = dyelotView; }//单据 - private void MenuItem_LOCK_XML(object sender, RoutedEventArgs e) - { - bool mode = MainWindowViewModel.Machines.Select("NAME='" + machine + "'").First().Field("LOCK"); - - Dictionary dat_ = new Dictionary(); - dat_.Clear(); - - if (!mode) - { - dat_.Add("NAME", "LOCK"); - dat_.Add("VALUE", "True"); - MainWindowViewModel.Updata_Machines(MainWindowViewModel.Machines, "LOCK", "Name='" + machine + "'", "True"); - } - else - { - dat_.Add("NAME", "LOCK"); - dat_.Add("VALUE", "False"); - MainWindowViewModel.Updata_Machines(MainWindowViewModel.Machines, "LOCK", "Name='" + machine + "'", "False"); - } - - DataRow drEmployee = MainWindowViewModel.Machines.Select("NAME='" + machine + "'").First(); - int index = Convert.ToInt16(drEmployee.Field("ID")); - MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString - { - ID = index, - DAT = "SC829" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_.ToJsonString() - }); - - if (!mode) { MessageBox.Show(machine + Properties.Resources.user_lock, "800", MessageBoxButton.OK, MessageBoxImage.Information); - } else { - MessageBox.Show(machine + Properties.Resources.user_unlock, "800", MessageBoxButton.OK, MessageBoxImage.Information); - } - }//锁定 - private void MenuItem_AUTO_XML(object sender, RoutedEventArgs e) - { - bool mode = MainWindowViewModel.Machines.Select("NAME='" + machine + "'").First().Field("AUTO"); - - Dictionary dat_ = new Dictionary(); - dat_.Clear(); - - if (!mode) - { - dat_.Add("NAME", "AUTO"); - dat_.Add("VALUE", "True"); - MainWindowViewModel.Updata_Machines(MainWindowViewModel.Machines, "AUTO", "Name='" + machine + "'", "True"); - } - else - { - dat_.Add("NAME", "AUTO"); - dat_.Add("VALUE", "FALSE"); - MainWindowViewModel.Updata_Machines(MainWindowViewModel.Machines, "AUTO", "Name='" + machine + "'", "False"); - } - - DataRow drEmployee = MainWindowViewModel.Machines.Select("NAME='" + machine + "'").First(); - int index = Convert.ToInt16(drEmployee.Field("ID")); - MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString - { - ID = index, - DAT = "SC829" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_.ToJsonString() - }); - - }//手自动 private void ListViewItem_Curve(object sender, MouseButtonEventArgs e) { if (rdp.IsConnected) rdp.Disconnect(); @@ -296,7 +321,6 @@ namespace SunlightCentralizedControlManagement_SCCM_.View Picture.Content = new View.CurveDiagram(false, machine, DateTime.Now.AddHours(-8).ToString("yyyy/MM/dd HH:mm:ss"), DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"), workOrder); machines_info = 3; }//曲线 - private void ListViewItem_Resume(object sender, MouseButtonEventArgs e) { IsInteractive = false;