Beispiel #1
0
        void IPlugin.OnLoad(ActApplication application)
        {
            // hold on to the application
            this.application = application;

            // be sure to keep track of when a user logs in or is logged out
            application.AfterLogon   += new EventHandler(Application_AfterLogon);
            application.BeforeLogoff += new EventHandler(Application_BeforeLogoff);
        }
Beispiel #2
0
 private bool menuItemExists(string urn, ActApplication actApplication)
 {
     try
     {
         if (actApplication.Explorer.CommandBarCollection["Connected Menus"] == null)
         {
             return(!(actApplication.Explorer.CommandBarCollection["Connected Menus"].ControlCollection[urn] == null));
         }
     }
     catch (Exception e)
     {
         MessageBox.Show(e.Message);
     }
     return(false);
 }
Beispiel #3
0
 private void removeMenuItem(string urn, ActApplication actApplication)
 {
     try
     {
         if (actApplication.Explorer.CommandBarCollection["Connected Menus"] == null)
         {
             return;
         }
         actApplication.RevokeCommand(urn);
         CommandBarControl removeMenu = actApplication.Explorer.CommandBarCollection["Connected Menus"].ControlCollection[urn];
         if (!(removeMenu == null))
         {
             actApplication.Explorer.CommandBarCollection["Connected Menus"].ControlCollection[getParentControlURN(urn)].RemoveSubItem(removeMenu);
         }
     }
     catch (Exception e)
     {
         MessageBox.Show(e.Message);
     }
 }
Beispiel #4
0
 void IPlugin.OnLoad(ActApplication application)
 {
     this.application = application;
     //TODO Plug in event handlers here
     application.ViewLoaded += new ViewEventHandler(Application_ViewLoaded);
 }