| | |
| | | using HMI.Core.Manager; |
| | | using HMI.Core.Setting; |
| | | using HMI.Core.Util; |
| | | using HMI.UI.Util; |
| | | using HMI.Util; |
| | | using NationalInstruments.TestStand.Interop.API; |
| | | using NPOI.HSSF.UserModel; |
| | | using NPOI.SS.Formula.Functions; |
| | | using NPOI.SS.UserModel; |
| | | using Plugin.TsExecution.Entity; |
| | | using System; |
| | | using System.Collections.Generic; |
| | |
| | | using System.Timers; |
| | | using System.Windows; |
| | | using System.Windows.Controls; |
| | | using Util.ManualDebug; |
| | | |
| | | namespace Plugin.TsExecution |
| | | { |
| | |
| | | Set(ref totalNum, value); |
| | | } |
| | | } |
| | | |
| | | public TsExecution parent { get; set; } |
| | | |
| | | private int passNum; |
| | | public int PassNum |
| | |
| | | try |
| | | { |
| | | var value = ParameterManager.GetCommonParameterByName("AutoTestMode"); |
| | | IsAutoMode = bool.Parse(value.Value); |
| | | IsAutoMode = value == null ? true : bool.Parse(value.Value); |
| | | } |
| | | catch |
| | | { |
| | |
| | | |
| | | public void IniTestData() |
| | | { |
| | | Dispatcher.Invoke(() => |
| | | { |
| | | Datasource.Clear(); |
| | | }); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | }.ShowDialog(); |
| | | } |
| | | } |
| | | |
| | | private void control_PreviewMouseRightButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e) |
| | | { |
| | | if (parent.EnableManualDebug) |
| | | { |
| | | ContextMenu contextMenu = new ContextMenu(); |
| | | contextMenu.Closed += ContextMenu_Closed; |
| | | var item = new MenuItem |
| | | { |
| | | IsCheckable = false, |
| | | Name = "manualDebugItem", |
| | | Header = this.lang("手动调试"), |
| | | }; |
| | | item.Click += Item_Click; ; |
| | | contextMenu.Items.Add(item); |
| | | this.ContextMenu = contextMenu; |
| | | } |
| | | else |
| | | { |
| | | |
| | | this.ContextMenu = null; |
| | | } |
| | | } |
| | | |
| | | private void Item_Click(object sender, RoutedEventArgs e) |
| | | { |
| | | string manualDebugSeq = ParameterManager.GetCommonParameterByName("ManualDebugSeqPath")?.Value; |
| | | if (string.IsNullOrEmpty(manualDebugSeq)) |
| | | { |
| | | MsgBoxHelper2.Error("请先设置手动调试序列路径[ManualDebugSeqPath]!"); |
| | | return; |
| | | } |
| | | string modelPath = parent.tsModelPath; |
| | | var win = new ManualDebugWindow(manualDebugSeq, modelPath, false) |
| | | { |
| | | Title = $"工位{this.index}手动调试", |
| | | |
| | | Owner = Window.GetWindow(this), |
| | | OvenIndex = 0, |
| | | OvenName = "", |
| | | CellCount = parent.tsSockets.Count, |
| | | |
| | | CellIndex = this.index, |
| | | CellName = "", |
| | | }; |
| | | win.ShowDialog(); |
| | | } |
| | | |
| | | private void ContextMenu_Closed(object sender, RoutedEventArgs e) |
| | | { |
| | | this.ContextMenu = null; |
| | | } |
| | | } |
| | | } |