Ejemplo n.º 1
0
 public virtual void Init(ISmartSession session, params object[] arguments)
 {
     _session = session;
     if (_session.SmartWindowManager.OnActiveWindowChanged != null)
     {
         _session.SmartWindowManager.OnActiveWindowChanged -= _viewerChangedHandler;
     }
     _session.SmartWindowManager.OnActiveWindowChanged += _viewerChangedHandler;
     if (_content != null)
     {
         _content.Apply(_session);
     }
 }
Ejemplo n.º 2
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);
 }