| | |
| | | using HMI.Core.Util; |
| | | using HMI.ParameterManage.Entity; |
| | | using HMI.ParameterManage.Util; |
| | | using HMI.UI; |
| | | using HMI.UI.Util; |
| | | using log4net; |
| | | using NationalInstruments.TestStand.Interop.API; |
| | |
| | | using Plugin.TestResult_WPF.Util; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.IO; |
| | | using System.Linq; |
| | | using System.Windows; |
| | | using System.Windows.Controls; |
| | |
| | | testResultView.testApp.ExecutionClosed += new _ApplicationMgrEvents_ExecutionClosedEventHandler(this.axApplicationMgr_ExecutionClosed); |
| | | } |
| | | |
| | | public override void InitFinish() |
| | | { |
| | | base.InitFinish(); |
| | | string path = Path.Combine(BaseFolder, "Count.ini"); |
| | | testResultView.SetCountIniPath(path); |
| | | testResultView.InitMainGrid(); |
| | | LoadProduct(); |
| | | testResultView.InitTestStandEngine(); |
| | | } |
| | | |
| | | public override void DoClose(object sender, EventArgs e) |
| | | { |
| | | testResultView.ReleaseResource(); |
| | | } |
| | | |
| | | private void axApplicationMgr_ExitApplication(object sender, EventArgs e) |
| | | { |
| | | } |
| | |
| | | { } |
| | | } |
| | | |
| | | private bool isLoaded; |
| | | private void UserControl_Loaded(object sender, RoutedEventArgs e) |
| | | { |
| | | LoadProduct(); |
| | | testResultView.InitTestStandEngine(); |
| | | new MaskWindow(Window.GetWindow(this), |
| | | (win) => |
| | | { |
| | | Dispatcher.Invoke(() => |
| | | { |
| | | try |
| | | { |
| | | Start_Click(null, null); |
| | | Loaded -= UserControl_Loaded; |
| | | } |
| | | finally |
| | | { |
| | | win.Close(); |
| | | } |
| | | }); |
| | | }).Info(LangUtil.Get("Ts.SequenceIsStarting")); |
| | | } |
| | | |
| | | public void LoadProduct() |
| | | { |
| | | List<ProductData> products = ParameterManager.GetProducts<List<ProductData>>(); |
| | | List<ProductData> products = ParameterManager.GetProducts<List<ProductData>>() |
| | | ?? new List<ProductData>(); |
| | | this.modelSelect.Items.Clear(); |
| | | foreach (var prd in products) |
| | | { |
| | |
| | | { |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 计数清零按钮事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void BtnClear_Click(object sender, RoutedEventArgs e) |
| | | { |
| | | testResultView.ClearNumber(); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |