Пример #1
0
        private static void AttachEvents()
        {
            ISmartSessionEvents evts = Session as ISmartSessionEvents;

            evts.OnSmartSessionLoaded += new SmartSessionLoadedHandler(SmartSessionIsLoaded);
            evts.OnFileOpended        += new FileOpenedHandler(FileOpened);
            ISmartWindowManager mgr = Session.SmartWindowManager;

            mgr.OnActiveWindowChanged += new OnActiveWindowChangedHandler(ActiveViewerChanged);
            IMonitoringSessionEvents msevts = Session.MonitoringSession as IMonitoringSessionEvents;

            msevts.OnMonitoringProductLoaded    += new MonitoringProductLoadedHandler(ProductLoaded);
            msevts.OnMonitoringSubProductLoaded += new MonitoringSubProductLoadedHandler(SubProductLoaded);
        }
Пример #2
0
 private static void TryFireEvents(string fname)
 {
     try
     {
         ISmartSessionEvents evts = _session as ISmartSessionEvents;
         if (evts.OnFileOpended != null)
         {
             evts.OnFileOpended(_session, fname);
         }
     }
     catch
     {
     }
 }
Пример #3
0
        void frmMainForm_Load(object sender, EventArgs e)
        {
            AdjustSizeAndLocation();
            _radRibbonBar.Expanded = false;
            Application.DoEvents();
            _radRibbonBar.Visible = true;
            Application.DoEvents();
            _radRibbonBar.Expanded = true;
            //
            ISmartSessionEvents evts = _session as ISmartSessionEvents;

            if (evts.OnSmartSessionLoaded != null)
            {
                evts.OnSmartSessionLoaded(_session);
            }
        }