コード例 #1
0
        protected virtual void ExecutingStep(InstallInformationStep step)
        {
            var installStep = this.StepManager.GetInstallStep(step.StepCode);
            var args        = new Core.ServiceEventArgs(string.Format("正在执行步骤[{0}]", step.StepName));

            this.MessageManager.OnUpdateInstallationSchedule(this, args); //更新界面进度
            this.MessageManager.OnWriteFileLog(this, args);               //写入日志文件
            installStep.Excute();
        }
コード例 #2
0
        protected virtual void ExecutingStepDone(InstallInformationStep step)
        {
            step.Completed = true;
            var total = this.AppSetting.Steps.Count;
            var index = this.AppSetting.Steps.IndexOf(step);

            if (index > -1)
            {
                var args = new Core.ServiceEventArgs();
                args.ScheduleValue = (index + 1) * 100 / total;
                args.Message       = string.Format("执行步骤[{0}]完成", step.StepName);
                args.MessageType   = Plugin.Messages.emMessageType.success;
                this.MessageManager.OnUpdateInstallationSchedule(this, args); //更新界面进度
                this.MessageManager.OnWriteFileLog(this, args);               //写入日志文件
            }
        }