Пример #1
0
 public frmLayerManager()
 {
     InitializeComponent();
     _id  = 9002;
     Text = "层管理器";
     _viewIsChangedHandler = new OnActiveWindowChangedHandler(ViewIsChanged);
     Disposed += new EventHandler(frmLayerManager_Disposed);
 }
Пример #2
0
 void UCSmartWindowManager_Disposed(object sender, EventArgs e)
 {
     ReleaseEvents();
     if (_linkableViewerManager != null)
     {
         _linkableViewerManager.Reset();
         _linkableViewerManager = null;
     }
     _activeWindowChangedHandler = null;
     _smartToolWindowFactory     = null;
 }
Пример #3
0
 void Window_Disposed(object sender, EventArgs e)
 {
     if (_session != null)
     {
         _session.SmartWindowManager.OnActiveWindowChanged -= _viewerChangedHandler;
     }
     _viewerChangedHandler = null;
     _onWindowClosed       = null;
     if (_content != null)
     {
         _content.Free();
         _content = null;
     }
 }
Пример #4
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;
            }
        }
Пример #5
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;
        }
Пример #6
0
 public ToolWindowBase()
 {
     InitializeComponent();
     _content = GetToolWindowContent();
     if (_content != null)
     {
         (_content as Control).Dock = DockStyle.Fill;
         this.Controls.Add(_content as Control);
         //_content.Apply(_session);
         _viewerChangedHandler = new OnActiveWindowChangedHandler(
             (sender, oldv, newv) =>
         {
             _content.Apply(_session);
         }
             );
     }
     this.Disposed += new EventHandler(Window_Disposed);
 }