Пример #1
0
        internal bool ConfirmRemovingPrigAssembly(string deletionalInclude)
        {
            var msg = string.Format(PrigResources.GetString("AreYouSureYouWantToRemovePrigAssembly_0_MessageFormat"), deletionalInclude);
            var ret = ShowMessageBox(msg, OLEMSGBUTTON.OLEMSGBUTTON_YESNO, OLEMSGICON.OLEMSGICON_QUERY);

            return(ret == VSConstants.MessageBoxResult.IDYES);
        }
Пример #2
0
        internal void ReportPrigSourceProcessingProgress(uint prog, string pkgName, string src)
        {
            Debug.Assert(m_mwProc != MachineWideProcesses.None);
            var resName = string.Format("ProcessingDefaultSource_0_AsPackage_1_{0}_MessageFormat", m_mwProc);
            var msg     = string.Format(PrigResources.GetString(resName), src, pkgName);

            Statusbar.ReportProgress(msg, prog);
        }
Пример #3
0
        internal void ReportProfilerProcessingProgress(uint prog, ProfilerLocation profLoc)
        {
            Debug.Assert(m_mwProc != MachineWideProcesses.None);
            var resName = string.Format("ProcessingProfiler_0_ToRegistry_{0}_MessageFormat", m_mwProc);
            var msg     = string.Format(PrigResources.GetString(resName), profLoc.PathOfInstalling);

            Statusbar.ReportProgress(msg, prog);
        }
Пример #4
0
        internal void ReportEnvironmentVariableProcessedProgress(uint prog)
        {
            Debug.Assert(m_mwProc != MachineWideProcesses.None);
            var resName = string.Format("ProcessedEnvironmentVariable_{0}_Message", m_mwProc);
            var msg     = PrigResources.GetString(resName);

            Statusbar.ReportProgress(msg, prog);
        }
Пример #5
0
        internal void ReportEnvironmentVariableProcessingProgress(uint prog, string name, string value)
        {
            Debug.Assert(m_mwProc != MachineWideProcesses.None);
            var resName = string.Format("ProcessingEnvironmentVariable_0_As_1_{0}_MessageFormat", m_mwProc);
            var msg     = string.Format(PrigResources.GetString(resName), value, name);

            Statusbar.ReportProgress(msg, prog);
        }
Пример #6
0
        internal void ReportNuGetSourceProcessingProgress(uint prog, string path, string name)
        {
            Debug.Assert(m_mwProc != MachineWideProcesses.None);
            var resName = string.Format("ProcessingNugetSource_0_As_1_{0}_MessageFormat", m_mwProc);
            var msg     = string.Format(PrigResources.GetString(resName), path, name);

            Statusbar.ReportProgress(msg, prog);
        }
Пример #7
0
        internal void ReportProcessingProjectWideProcessProgress(uint prog, string include)
        {
            Debug.Assert(m_pwProc != ProjectWideProcesses.None);
            var resName = string.Format("ProcessingProjectWideProcess_0_{0}_MessageFormat", m_pwProc);
            var msg     = string.Format(PrigResources.GetString(resName), include);

            Statusbar.ReportProgress(msg, prog);
        }
Пример #8
0
        internal bool ConfirmRestartingVisualStudioToTakeEffect()
        {
            Debug.Assert(m_mwProc != MachineWideProcesses.None);
            var msg    = GetCompletedMachineWideProcessMessage(m_mwProc);
            var cfmMsg = string.Format(PrigResources.GetString("_0_YouMustRestartVisualStudioForTheseChangesToTakeEffectMessageFormat"), msg);
            var ret    = ShowMessageBox(cfmMsg, OLEMSGBUTTON.OLEMSGBUTTON_YESNO, OLEMSGICON.OLEMSGICON_WARNING);

            return(ret == VSConstants.MessageBoxResult.IDYES);
        }
Пример #9
0
        public Project GetCurrentProjectOrException()
        {
            var proj = CurrentProject.Value;

            if (proj == null)
            {
                throw new InvalidOperationException(PrigResources.GetString("CurrentProjectIsntSelectedMessage"));
            }
            return(proj);
        }
Пример #10
0
        internal static OleMenuCommand NewDisableTestAdapterCommand(PrigViewModel vm)
        {
            var commandId   = new CommandID(GuidList.MainMenuGroup, (int)PkgCmdIDList.DisableTestAdapterCommand);
            var handler     = new EventHandler((sender, e) => vm.DisableTestAdapterCommand.Execute(sender));
            var menuCommand = new OleMenuCommand(handler, commandId);

            vm.DisableTestAdapterCommand.CanExecuteChanged += (sender, e) => menuCommand.Enabled = ((ICommand)sender).CanExecute(menuCommand);
            menuCommand.Enabled = false;
            var text = PrigResources.GetString("DisableTestAdapterMenu");

            vm.CurrentProject.Subscribe(
                proj => menuCommand.Text = proj == null ? text : string.Format(PrigResources.GetString("_0_For_1_MenuFormat"), text, proj.Name));
            return(menuCommand);
        }
Пример #11
0
        static string GetCompletedMachineWideProcessMessage(MachineWideProcesses mwProc)
        {
            var resName = string.Format("CompletedMachineWideProcess_{0}_Message", mwProc);

            return(PrigResources.GetString(resName));
        }
Пример #12
0
        static string GetSkippedProjectWideProcessMessage(ProjectWideProcesses pwProc, SkippedReasons reason, string include)
        {
            var resName = string.Format("SkippedProjectWideProcessFor_0_{0}_{1}_MessageFormat", pwProc, reason);

            return(string.Format(PrigResources.GetString(resName), include));
        }
Пример #13
0
        static string GetCompletedProjectWideProcessMessage(ProjectWideProcesses pwProc, string include)
        {
            var resName = string.Format("CompletedProjectWideProcessFor_0_{0}_MessageFormat", pwProc);

            return(string.Format(PrigResources.GetString(resName), include));
        }
Пример #14
0
        internal void ReportPackageReferenceAddedProgress(uint prog, IVsPackageMetadata metadata)
        {
            var msg = string.Format(PrigResources.GetString("ReferenceAdded_0_MessageFormat"), metadata.Id);

            Statusbar.ReportProgress(msg, prog);
        }
Пример #15
0
        internal void ReportProfilerStatusCheckingProgress(uint prog, ProfilerLocation profLoc)
        {
            var msg = string.Format(PrigResources.GetString("CheckingInstallationStatusForProfiler_0_MessageFormat"), profLoc.PathOfInstalling);

            Statusbar.ReportProgress(msg, prog);
        }
Пример #16
0
        internal void ReportPackageInstallingProgress(uint prog, IVsPackageMetadata metadata)
        {
            var msg = string.Format(PrigResources.GetString("Installing_0_MessageFormat"), metadata.Id);

            Statusbar.ReportProgress(msg, prog);
        }
Пример #17
0
        internal void ReportPackagePreparingProgress(uint prog)
        {
            var msg = PrigResources.GetString("CheckingCurrentProjectsPackagesMessage");

            Statusbar.ReportProgress(msg, prog);
        }
Пример #18
0
        internal void ShowVisualStudioHasNotBeenElevatedYetMessage()
        {
            var msg = PrigResources.GetString("VisualStudioHasNotBeenElevatedYetMessage");

            ShowMessageBox(msg, OLEMSGBUTTON.OLEMSGBUTTON_OK, OLEMSGICON.OLEMSGICON_INFO);
        }
Пример #19
0
        internal void ReportNuGetPackageCreatingProgress(uint prog, string pkgName)
        {
            var msg = string.Format(PrigResources.GetString("CreatingNugetPackage_0_MessageFormat"), pkgName);

            Statusbar.ReportProgress(msg, prog);
        }
Пример #20
0
        static string GetSkippedMachineWideProcessMessage(MachineWideProcesses mwProc, SkippedReasons reason)
        {
            var resName = string.Format("SkippedMachineWideProcess_{0}_{1}_Message", mwProc, reason);

            return(PrigResources.GetString(resName));
        }