コード例 #1
0
 private void ThisAddIn_Startup(object sender, System.EventArgs e)
 {
     //event Microsoft.Office.Tools.Word.SelectionEventHandler SelectionChange;
     myUserControl            = new CustomTaskPanel.ScriptToolsPane();
     myCustomTaskPane         = Globals.ThisAddIn.CustomTaskPanes.Add(myUserControl, "Script Tools");
     myCustomTaskPane.Visible = true;
     // System.Windows.Forms.MessageBox.Show("Here in Startup");
 }
コード例 #2
0
 private void ScriptTools2_Click(object sender, RibbonControlEventArgs e)
 {
     if (Globals.ThisAddIn.CustomTaskPanes.Count() < 1)
     {
         CustomTaskPanel.ScriptToolsPane myUserControl = new CustomTaskPanel.ScriptToolsPane();
         myCustomTaskPane         = Globals.ThisAddIn.CustomTaskPanes.Add(myUserControl, "Script Tools");
         myCustomTaskPane.Visible = true;
         myUserControl.Visible    = true;
         // Globals.ThisAddIn.CustomTaskPanes.Remove(myCustomTaskPane);
     }
 }