添加排程页面机组选择

This commit is contained in:
sc committed 2025-01-05 01:01:18 +08:00
commit 2263777da5
4 files changed
+147 -2

No files matched your search

+11 -2
View File
@@ -1,4 +1,5 @@
using SunlightCentralizedControlManagement_SCCM_.ViewModel;
using SunlightCentralizedControlManagement_SCCM_.WindowsView;
using System;
using System.Collections.Generic;
using System.Data;
@@ -17,6 +18,7 @@ using System.Windows.Navigation;
using System.Windows.Shapes;
using TouchSocket.Core;
using static SunlightCentralizedControlManagement_SCCM_.UserClass.SqliteHelper;
using static SunlightCentralizedControlManagement_SCCM_.WindowsView.MachineSelection;
namespace SunlightCentralizedControlManagement_SCCM_.View
{
@@ -40,9 +42,16 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
comboBoxMachine.ItemsSource = MainWindowViewModel.Machines.AsEnumerable().Select(rowdata => rowdata.Field<string>("name")).ToList();//转换机台
comboBoxProgram.ItemsSource = ProgramName.AsEnumerable().Select(rowdata => rowdata.Field<string>("ProgramName")).ToList();//转换工艺代码
}
private void Multi_Click(object sender, RoutedEventArgs e)
private void Multi_Click(object sender, RoutedEventArgs e)//机台组
{
MachineSelection machineSelection = new MachineSelection();
machineSelection.AddressUpdated += new MachineSelection.AddressUpdateHandler(Address_ButtonClicked);
//machineSelection.data = "ID";
machineSelection.ShowDialog();
}
private void Address_ButtonClicked(object sender, AddressUpdateEventArgs e)//机台组返回结果
{
if(!string.IsNullOrEmpty(e.Groups)) comboBoxMachine.Text = e.Groups;
}
private void Button_Click(object sender, RoutedEventArgs e)