Ejemplo n.º 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);
        }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 4
0
 void IPlugin.OnLoad(ActApplication application)
 {
     this.application = application;
     //TODO Plug in event handlers here
     application.ViewLoaded += new ViewEventHandler(Application_ViewLoaded);
 }