private void RemoveOrphanedTaskPanes() { //MessageBox.Show("In this remove orphaned task panes"); for (int i = this.CustomTaskPanes.Count; i > 0; i--) { ctp = this.CustomTaskPanes[i - 1]; if (ctp.Window == null) { this.CustomTaskPanes.Remove(ctp); } } }
public void RemoveAllTaskPanes() { if (debug) { MessageBox.Show("RemoveAllTaskPanes()"); } if (Globals.ThisAddIn.Application.Documents.Count > 0) { for (int i = this.CustomTaskPanes.Count; i > 0; i--) { ctp = this.CustomTaskPanes[i - 1]; if (ctp.Title == ac.getCTPTitleLabel()) { this.CustomTaskPanes.RemoveAt(i - 1); } } mlPaneDisplayed = false; } }
public void AddTaskPane(Document doc) { ctpML = this.CustomTaskPanes.Add(new UserControl1(doc), ac.getCTPTitleLabel(), doc.ActiveWindow); ctpML.Visible = true; ctpML.Width = 400; }