Exemplo n.º 1
0
 private void MenuItem_Activated(object sender, EventArgs e)
 {
     if (cc.IsPlugin((MenuItem)sender))
     {
         Common.IPlugin p = cc.GetPlugin((MenuItem)sender);
         p.Go(j);
     }
     else if (sender == cc.mniFileOpen)
     {
         Open();
     }
     else if (sender == cc.mniFileNew)
     {
         New();
     }
     else if (sender == cc.mniViewNone)
     {
         treeViewState = TreeViewStates.Hidden;
         UpdateTreeView();
     }
     else if (sender == cc.mniViewEntries)
     {
         treeViewState = TreeViewStates.Entries;
         UpdateTreeView();
     }
     else if (sender == cc.mniViewComments)
     {
         treeViewState = TreeViewStates.Comments;
         UpdateTreeView();
     }
     else if (sender == cc.mniHelpAbout)
     {
         AboutController.Go();
     }
     else if (sender == cc.mniFileQuit)
     {
         Application.Quit();
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Inserts a <see cref="Common.IPlugin"/> into the <see cref="PluginCollection"/> at the
 /// specified position.
 /// </summary>
 /// <param name="index">The zero-based index at which value should be inserted.</param>
 /// <param name="value">The <see cref="Common.IPlugin"/> to insert into the
 /// <see cref="PluginCollection"/>.</param>
 public void Insert(int index, Common.IPlugin value)
 {
     List.Insert(index, value);
 }