using DataEntity.Share; using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Data; 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.Shapes; using System.Xml; using XCommon.Log; using XHandler.Class; using XHandler.Class.DataEx; using XHandler.View.ManualCoating; using XHandler.View.ManualPick; namespace XHandler.View.ElectroCutGum { /// /// ChoiceConfirmNext.xaml 的交互逻辑 /// public partial class ChoiceConfirmNext : Window { public event EventHandler closeEvent; public event EventHandler okEvent; public ManualPickGum manualPickGum = null; public RunWnd launchView; public XmlNode methodNode; public DataTable dtChoiceParams; public bool cancelFlg = false; public ObservableCollection dgBacteriaCoordinates = null; public ChoiceConfirmNext() { InitializeComponent(); this.Owner = (Window)Shared.Main; } private void Window_Load(object sender, RoutedEventArgs e) { // 1:人工挑选菌落;0:成像系统自动挑选菌落 string choicemode = dtChoiceParams==null?"1":dtChoiceParams.Rows[9]["属性值"].ToString(); if (choicemode.Equals("0")) { btnConfirm_Click(null, null); } } private void btnConfirm_Click(object sender, RoutedEventArgs e) { if (radiobtnDoNext.IsChecked == true) { ConfirmNext_okEvent(); } else if (radiobtnCancel.IsChecked == true) { cancelFlg = true; } this.Close(); } /// /// 执行下一个命令 /// public void ConfirmNext_okEvent() { try { if (manualPickGum != null) { this.Close(); CutSetting cutSetting = new CutSetting(); cutSetting.Height = this.ActualHeight; cutSetting.Width = this.ActualWidth; cutSetting.launchView = launchView; cutSetting.methodNode = methodNode; cutSetting.dtChoiceParams = dtChoiceParams; SolidColorBrush mybtn1_Brush = new SolidColorBrush(System.Windows.Media.Color.FromArgb(0, 0, 0, 0)); cutSetting.Background = (System.Windows.Media.Brush)mybtn1_Brush; cutSetting.dgBacteriaCoordinates = dgBacteriaCoordinates; cutSetting.ShowDialog(); } } catch (Exception ex) { LoggerHelper.ErrorLog("ERROR:", ex); } } private void Button_Click(object sender, RoutedEventArgs e) { if (EventResponseController.Instance.CanExecute() == false) return; cancelFlg = true; closeEvent?.Invoke(this, EventArgs.Empty); } } }