Ejemplo n.º 1
0
        public void OnDisplayMenu(string MenuTitle, AgEUiPluginMenuBarKind MenuBarKind, IAgUiPluginMenuBuilder2 MenuBuilder)
        {
            stdole.IPictureDisp picture;
            Assembly            currentAssembly = Assembly.GetExecutingAssembly();
            Image icon = Image.FromStream(currentAssembly.GetManifestResourceStream(m_imageResource));

            picture = OlePictureHelper.OlePictureFromImage(icon);
        }
Ejemplo n.º 2
0
        public void OnInitializeToolbar(IAgUiPluginToolbarBuilder ToolbarBuilder)
        {
            //converting an ico file to be used as the image for toolbar button
            stdole.IPictureDisp picture;
            Assembly            currentAssembly = Assembly.GetExecutingAssembly();
            Image icon = Image.FromStream(currentAssembly.GetManifestResourceStream(m_imageResource));

            picture = OlePictureHelper.OlePictureFromImage(icon);
            //Add a Toolbar Button
            ToolbarBuilder.AddButton(m_commandText, m_pluginTitle, m_pluginDescription, AgEToolBarButtonOptions.eToolBarButtonOptionAlwaysOn, picture);
        }
Ejemplo n.º 3
0
 public void OnDisplayContextMenu(IAgUiPluginMenuBuilder MenuBuilder)
 {
     if (m_integrate)
     {
         stdole.IPictureDisp picture;
         Assembly            currentAssembly = Assembly.GetExecutingAssembly();
         Image icon = Image.FromStream(currentAssembly.GetManifestResourceStream(m_imageResource));
         picture = OlePictureHelper.OlePictureFromImage(icon);
         //Add a Menu Item
         MenuBuilder.AddMenuItem(m_commandText, m_pluginTitle, m_pluginDescription, picture);
     }
 }