示例#1
0
 public void RemoveTab(ImageTabPanel tab)
 {
     if (_openTabs.ContainsKey(tab.DenshaImage.Id))
     {
         _openTabs.Remove(tab.DenshaImage.Id);
         this.TabPages.Remove(tab);
         tab.Dispose();
     }
 }
示例#2
0
 void closeTabItem_Click(object sender, EventArgs e)
 {
     if (_imageTabPage != null)
     {
         ImageTabControl ctrl = _imageTabPage.Parent as ImageTabControl;
         ctrl.RemoveTab(_imageTabPage);
         _imageTabPage = null;
     }
 }
示例#3
0
 void closeAllTabsItem_Click(object sender, EventArgs e)
 {
     if (_imageTabPage != null)
     {
         ImageTabControl ctrl = _imageTabPage.Parent as ImageTabControl;
         ctrl.ClearTabs();
         _imageTabPage = null;
     }
 }
示例#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);
     }
 }