Exemplo n.º 1
0
        /// <summary>
        /// Handles help system progress events
        /// </summary>
        /// <param name="sender">event sender</param>
        /// <param name="e">event arguments</param>
        private void HandleProgressChanged(object sender, UpdatableHelpProgressEventArgs e)
        {
            Debug.Assert(e.CommandType == UpdatableHelpCommandType.UpdateHelpCommand
                || e.CommandType == UpdatableHelpCommandType.SaveHelpCommand);

            string activity = (e.CommandType == UpdatableHelpCommandType.UpdateHelpCommand) ?
                HelpDisplayStrings.UpdateProgressActivityForModule : HelpDisplayStrings.SaveProgressActivityForModule;

            ProgressRecord progress = new ProgressRecord(activityId, StringUtil.Format(activity, e.ModuleName), e.ProgressStatus);

            progress.PercentComplete = e.ProgressPercent;

            WriteProgress(progress);
        }
Exemplo n.º 2
0
 private void HandleProgressChanged(object sender, UpdatableHelpProgressEventArgs e)
 {
     string formatSpec = (e.CommandType == UpdatableHelpCommandType.UpdateHelpCommand) ? HelpDisplayStrings.UpdateProgressActivityForModule : HelpDisplayStrings.SaveProgressActivityForModule;
     ProgressRecord progressRecord = new ProgressRecord(this.activityId, StringUtil.Format(formatSpec, e.ModuleName), e.ProgressStatus) {
         PercentComplete = e.ProgressPercent
     };
     base.WriteProgress(progressRecord);
 }