示例#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));
        }