alielie
2026-06-15 f08871fe7d148d667f2f11f80f64de71a0d9504c
Plugin.TsSupport/TsExecutionWrapper.cs
@@ -40,23 +40,37 @@
        /// </summary>
        public AxApplicationMgr AxApplicationMgr { get; private set; }
        public event _ApplicationMgrEvents_EndExecutionEventHandler OnEndExecution;
        public event EventHandler<UIMessageEvent> UIMessageEvent;
        public event EventHandler<ExecutionEndEvent> EndExecutionEvent;
        public TsExecutionWrapper()
        {
            AxApplicationMgr = TestAppManager.GetAxApplicationMgr();
            //AxApplicationMgr.EndExecution += AxApplicationMgr_EndExecution;
            AxApplicationMgr.EndExecution += AxApplicationMgr_EndExecution;
            //AxApplicationMgr.ExitApplication += new EventHandler(this.AxApplicationMgr_ExitApplication);
            //AxApplicationMgr.UIMessageEvent +=
            //    new _ApplicationMgrEvents_UIMessageEventEventHandler(this.AxApplicationMgr_UIMessageEvent);
            AxApplicationMgr.UIMessageEvent += AxApplicationMgr_UIMessageEvent;
            //AxApplicationMgr.ExecutionClosed +=
            //    new _ApplicationMgrEvents_ExecutionClosedEventHandler(this.AxApplicationMgr_ExecutionClosed);
        }
        #endregion
        private void AxApplicationMgr_EndExecution(object sender, _ApplicationMgrEvents_EndExecutionEvent e)
        {
            EndExecutionEvent?.Invoke(this, new ExecutionEndEvent() { Origin = e });
        }
        private void AxApplicationMgr_UIMessageEvent(object sender, _ApplicationMgrEvents_UIMessageEventEvent e)
        {
            UIMessageEvent?.Invoke(this, new UIMessageEvent()
            {
                Origin = e,
                EventCode = Convert.ToInt32(e.uiMsg.Event),
                NumberData = e.uiMsg.NumericData,
                Data = e.uiMsg.ActiveXData,
                StrData = e.uiMsg.StringData
            });
        }
        public object Init()
        {
@@ -208,7 +222,7 @@
        public void SetContext(object context)
        {
            this.context = (SequenceContext)context;
        }
    }
}