Пример #1
0
        public HelpToolbarEntries(OleMenuCommandService menuService, LUFAPackage LUFAPkg)
        {
            _DTE         = Package.GetGlobalService(typeof(DTE)) as DTE;
            _helpService = Package.GetGlobalService(typeof(SVsHelp)) as Help;
            _menuService = menuService;
            _LUFAPkg     = LUFAPkg;

            AddToolbarButtonHandler(
                CommandIDs.btnGettingStarted,
                (c, a) => {
                _LUFAPkg.ShowGettingStartedPage();
            }
                );

            AddToolbarButtonHandler(
                CommandIDs.btnShowLocalHelp,
                (c, a) => {
                _helpService.DisplayTopicFromF1Keyword("LUFA.Index");
            }
                );

            AddToolbarButtonHandler(
                CommandIDs.btnProjectPage,
                (c, a) => {
                _DTE.ItemOperations.Navigate(@"http://www.lufa-lib.org");
            }
                );

            AddToolbarButtonHandler(
                CommandIDs.btnMailingList,
                (c, a) => {
                _DTE.ItemOperations.Navigate(@"http://www.lufa-lib.org/support");
            }
                );

            AddToolbarButtonHandler(
                CommandIDs.btnDocumentation,
                (c, a) => {
                ExtensionInformation.LUFA.ReleaseTypes releaseType;
                string versionString = ExtensionInformation.LUFA.GetVersion(out releaseType);

                _DTE.ItemOperations.Navigate(string.Format(@"http://www.lufa-lib.org/documentation/{0}/html", versionString));
            }
                );

            AddToolbarButtonHandler(
                CommandIDs.btnReinstallLocalHelp,
                (c, a) => {
                HelpInstallManager.DoHelpAction(HelpInstallManager.HelpAction.REINSTALL_HELP);
            }
                );
        }
Пример #2
0
        private void DTEEvents_OnStartupComplete()
        {
            ExtensionInformation.LUFA.ReleaseTypes releaseType;
            string versionString = ExtensionInformation.LUFA.GetVersion(out releaseType);

            if (ExtensionInformation.LUFA.Updated)
            {
                Logging.Log(Logging.Severity.Information, "LUFA updated to version {0} ({1}), showing getting started and installing help", versionString, releaseType);

                WarnIfOldASFVersion();
                ShowGettingStartedPage();

                HelpInstallManager.DoHelpAction(HelpInstallManager.HelpAction.INSTALL_HELP);
            }
            else
            {
                Logging.Log(Logging.Severity.Information, "LUFA not updated, installed version {0} ({1})", versionString, releaseType);
            }
        }