示例#1
0
 public SmartSession(ISmartWindowManager smartWindowManager)
 {
     _smartWindowManager     = smartWindowManager;
     _commandEnvironment     = new CommandEnvironment(this);
     _configer               = new Configer();
     _progressMonitorManager = new ProgressMonitorManager(smartWindowManager.MainForm as Form);
     _recentFilesManager     = new RecentFilesManager(20);
     _temporalFileManager    = new TemporalFileManager();
     AttachEvents();
     CreatePythonEngine();
     CreateMonitoringSession();
 }
示例#2
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);
        }
示例#3
0
        void ExtractPanelWindow_Disposed(object sender, EventArgs e)
        {
            ISmartWindowManager mgr = _session.SmartWindowManager;

            if (_activeWindowChanged != null)
            {
                mgr.OnActiveWindowChanged -= _activeWindowChanged;
                _activeWindowChanged       = null;
            }
            if (_extratPanelWindowContent != null)
            {
                _extratPanelWindowContent.Dispose();
                _extratPanelWindowContent.Free();
                _extratPanelWindowContent = null;
                _session = null;
            }
        }
示例#4
0
        public void Init(ISmartSession session, params object[] arguments)
        {
            _session = session;

            _extratPanelWindowContent      = new ExtractPanelWindowContent();
            _extratPanelWindowContent.Dock = DockStyle.Fill;
            this.Controls.Add(_extratPanelWindowContent);

            //AddFlowPanel();

            _activeWindowChanged = ActiveWindowChanged;
            Disposed            += ExtractPanelWindow_Disposed;

            _extratPanelWindowContent.Apply(session);
            ISmartWindowManager mgr = _session.SmartWindowManager;

            mgr.OnActiveWindowChanged += _activeWindowChanged;
        }