/// <summary> /// Initializes a new instance of the <see cref="CommandItem" /> class. /// </summary> /// <param name="id">The unique command id.</param> /// <param name="sortIndex">The sort index, defining the sequence of the items to appear.</param> /// <param name="text">The text.</param> /// <param name="description">The description.</param> /// <param name="doProc">The do proc.</param> public CommandItem(string id, int sortIndex, ITranslatableString text, ITranslatableString description, CommandProc doProc) { this.Id = id; this.sortIndex = sortIndex; this.text = text; this.description = description; this.doProc = doProc; }
/// <summary> /// Initializes a new instance of the <see cref="TranslatableString" /> class. /// </summary> /// <param name="source">The source.</param> public TranslatableString(ITranslatableString source) { if (source == null) { throw new ArgumentNullException(@"source"); } this.formatResourceName = source.FormatResourceName; this.baseName = source.BaseName; this.assemblyName = source.AssemblyName; this.args = source.Args; }
/// <summary> /// Sets the text. /// </summary> /// <param name="text">The text.</param> public void SetText(ITranslatableString text) { if (!this.IsProgressActive) { // progress is not active anymore, don't change it return; } if (Logger.IsDebugEnabled) { var message = string.Format(CultureInfo.CurrentUICulture, Resources.SettingTextPropertyOfProgressItemWithTitle_To_, this.Title, text); Logger.Debug(message); } lock (this.textLock) { this.translatableText = new TranslatableString(text); this.OnChanged(); } }
public ICommandItem AddCommand(string id, int commandSortIndex, ITranslatableString commandText, ITranslatableString commandDescription, CommandProc commandDoProc) { var newItem = new CommandItem(id, commandSortIndex, commandText, commandDescription, commandDoProc); return(this.AddCommand(newItem)); }
/// <summary> /// Adds the command. /// </summary> /// <param name="id">The unique command id.</param> /// <param name="commandSortIndex">The sort index, defining the sequence of the items to appear.</param> /// <param name="commandText">The commandText.</param> /// <param name="commandDescription">The commandDescription.</param> /// <param name="commandDoProc">The command procedure to be called to execute the command.</param> /// <returns>The new command item.</returns> public ICommandItem AddCommand(string id, int commandSortIndex, ITranslatableString commandText, ITranslatableString commandDescription, CommandProc commandDoProc) { return(this.commandProvider.AddCommand(id, commandSortIndex, commandText, commandDescription, commandDoProc)); }
/// <summary> /// Moves the progress bar another step and updates the current text /// </summary> /// <param name="textUpdate">Text to be displayed.</param> public void StepUpdate(ITranslatableString textUpdate) { this.SetText(textUpdate); this.StepUpdate(); }
/// <summary> /// Sets the text. /// </summary> /// <param name="newText">The text to set.</param> public void SetText(ITranslatableString newText) { this.commandItemBase.SetText(newText); }
/// <summary> /// Sets the description. /// </summary> /// <param name="newDescription">The description to set.</param> public void SetDescription(ITranslatableString newDescription) { this.commandItemBase.SetDescription(newDescription); }
/// <summary> /// Sets the text. /// </summary> /// <param name="newText">The text.</param> public void SetText(ITranslatableString newText) { this.text = newText; }
/// <summary> /// Sets the description. /// </summary> /// <param name="newDescription">The description to set.</param> public void SetDescription(ITranslatableString newDescription) { this.description = newDescription; }