Exemple #1
0
 public virtual void ShowView(IViewContentExtend content, bool bringToFront)
 {
     if (this.viewContentCollection.Contains(content))
     {
         this.SelectView((IViewContent)content);
     }
     else
     {
         this.viewContentCollection.Add(content);
         Xwt.Drawing.Image image          = (Xwt.Drawing.Image)null;
         DockNotebookTab   tabLabel       = this.tabControl.InsertTab(-1);
         DocumentWindow    documentWindow = new DocumentWindow(this, content, this.tabControl, tabLabel);
         documentWindow.Closed += new EventHandler <DocumentWindowEventArgs>(this.CloseWindowEvent);
         documentWindow.Show();
         tabLabel.Content = (Widget)documentWindow;
         if (image != null)
         {
             tabLabel.Icon = image;
         }
         if (bringToFront)
         {
             documentWindow.SelectWindow();
         }
         documentWindow.ShowAll();
         this.OnActiveWindowChanged((object)null, (EventArgs)null);
     }
 }