Beispiel #1
0
 public void RemoveTab(ImageTabPanel tab)
 {
     if (_openTabs.ContainsKey(tab.DenshaImage.Id))
     {
         _openTabs.Remove(tab.DenshaImage.Id);
         this.TabPages.Remove(tab);
         tab.Dispose();
     }
 }
Beispiel #2
0
 void closeTabItem_Click(object sender, EventArgs e)
 {
     if (_imageTabPage != null)
     {
         ImageTabControl ctrl = _imageTabPage.Parent as ImageTabControl;
         ctrl.RemoveTab(_imageTabPage);
         _imageTabPage = null;
     }
 }
Beispiel #3
0
 void closeAllTabsItem_Click(object sender, EventArgs e)
 {
     if (_imageTabPage != null)
     {
         ImageTabControl ctrl = _imageTabPage.Parent as ImageTabControl;
         ctrl.ClearTabs();
         _imageTabPage = null;
     }
 }
Beispiel #4
0
 public void AddTab(DenshaImage image)
 {
     if (_openTabs.ContainsKey(image.Id))
     {
         ImageTabPanel tab = _openTabs[image.Id];
         this.SelectTab(tab);
     }
     else
     {
         ImageTabPanel tab = new ImageTabPanel(image);
         this.TabPages.Add(tab);
         this.SelectTab(tab);
         _openTabs.Add(image.Id, tab);
     }
 }