diff --git a/SunlightCentralizedControlManagement_SCCM_.csproj b/SunlightCentralizedControlManagement_SCCM_.csproj index ac0596a..50e7684 100644 --- a/SunlightCentralizedControlManagement_SCCM_.csproj +++ b/SunlightCentralizedControlManagement_SCCM_.csproj @@ -172,6 +172,9 @@ InputBox.xaml + + MachineSelection.xaml + ViewStep.xaml @@ -257,6 +260,10 @@ MSBuild:Compile Designer + + Designer + MSBuild:Compile + MSBuild:Compile Designer diff --git a/View/ProductionPlanningEdit.xaml.cs b/View/ProductionPlanningEdit.xaml.cs index 57c238b..3019046 100644 --- a/View/ProductionPlanningEdit.xaml.cs +++ b/View/ProductionPlanningEdit.xaml.cs @@ -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("name")).ToList();//转换机台 comboBoxProgram.ItemsSource = ProgramName.AsEnumerable().Select(rowdata => rowdata.Field("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) diff --git a/WindowsView/MachineSelection.xaml b/WindowsView/MachineSelection.xaml new file mode 100644 index 0000000..5ddc7f2 --- /dev/null +++ b/WindowsView/MachineSelection.xaml @@ -0,0 +1,27 @@ + + + + + + + +