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); }
private static void TryFireEvents(string fname) { try { ISmartSessionEvents evts = _session as ISmartSessionEvents; if (evts.OnFileOpended != null) { evts.OnFileOpended(_session, fname); } } catch { } }
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); } }