예제 #1
0
        public MenuItemProvider(KeeTrayTOTPExt plugin, IPluginHost pluginHost)
        {
            if (plugin.Settings.LegacyTrayMenuProviderEnable)
            {
                TrayMenuItemProvider = new LegacyTrayMenuItemProvider(plugin, pluginHost);
            }
            else
            {
                TrayMenuItemProvider = new TrayMenuItemProvider(plugin, pluginHost);
            }

            EntryMenuItemProvider = new EntryMenuItemProvider(plugin, pluginHost);
            MainMenuItemProvider  = new MainMenuItemProvider(plugin);
        }
예제 #2
0
        internal ToolStripMenuItem GetMenuItem(PluginMenuType type)
        {
            switch (type)
            {
            // Provide a menu item for the main location(s)
            case PluginMenuType.Main:
                return(MainMenuItemProvider.ProvideMenuItem());

            case PluginMenuType.Entry:
                return(EntryMenuItemProvider.ProvideMenuItem());

            case PluginMenuType.Tray:
                return(TrayMenuItemProvider.ProvideMenuItem());

            default:
                return(null);    // No menu items in other locations
            }
        }