示例#1
0
        protected internal virtual void OnCompleted(MachineWideProcessResults result)
        {
            var handler = Completed;
            if (handler == null)
                return;

            handler(result);
        }
示例#2
0
        protected internal virtual void OnCompleted(MachineWideProcessResults result)
        {
            var handler = Completed;

            if (handler == null)
            {
                return;
            }

            handler(result);
        }
示例#3
0
        protected virtual void OnCompletedRegisterPrig(ConsoleViewModel vm, MachineWideProcessResults result)
        {
            switch (result)
            {
            case MachineWideProcessResults.Skipped:
                vm.ShowSkippedMachineWideProcessMessage(SkippedReasons.AlreadyRegistered);
                vm.EndSkippedMachineWideProcessProgress(SkippedReasons.AlreadyRegistered);
                break;

            case MachineWideProcessResults.Completed:
                vm.ShowCompletedMachineWideProcessMessage();
                vm.EndCompletedMachineWideProcessProgress();
                break;
            }
        }
示例#4
0
        protected virtual void OnCompletedUnregisterPrig(PrigViewModel vm, MachineWideProcessResults result)
        {
            switch (result)
            {
            case MachineWideProcessResults.Skipped:
                vm.ShowSkippedMachineWideProcessMessage(SkippedReasons.AlreadyRegistered);
                vm.EndSkippedMachineWideProcessProgress(SkippedReasons.AlreadyRegistered);
                break;

            case MachineWideProcessResults.Completed:
                var restarts = vm.ConfirmRestartingVisualStudioToTakeEffect();
                vm.EndCompletedMachineWideProcessProgress();
                if (!restarts)
                {
                    return;
                }

                ProcessMixin.RestartCurrentProcess();
                break;
            }
        }
示例#5
0
        protected virtual void OnCompletedUnregisterPrig(PrigViewModel vm, MachineWideProcessResults result)
        {
            switch (result)
            {
                case MachineWideProcessResults.Skipped:
                    vm.ShowSkippedMachineWideProcessMessage(SkippedReasons.AlreadyRegistered);
                    vm.EndSkippedMachineWideProcessProgress(SkippedReasons.AlreadyRegistered);
                    break;
                case MachineWideProcessResults.Completed:
                    var restarts = vm.ConfirmRestartingVisualStudioToTakeEffect();
                    vm.EndCompletedMachineWideProcessProgress();
                    if (!restarts)
                        return;

                    ProcessMixin.RestartCurrentProcess();
                    break;
            }
        }