Exemplo n.º 1
0
        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);
                }
            }
        }
Exemplo n.º 2
0
        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;
            }
        }
Exemplo n.º 3
0
 public void AddTaskPane(Document doc)
 {
     ctpML         = this.CustomTaskPanes.Add(new UserControl1(doc), ac.getCTPTitleLabel(), doc.ActiveWindow);
     ctpML.Visible = true;
     ctpML.Width   = 400;
 }