/// <summary> /// Appends the error text to the string builder. /// </summary> public static void AppendError(this StringBuilder stringBuilder, Label label, string text, params object[] args) { if (label == null) { throw new ArgumentNullException(nameof(label)); } stringBuilder.Append(label.Text).Append(": ").AppendLine(ScadaUtils.FormatText(text, args)); }
/// <summary> /// Shows a warning message. /// </summary> public static void ShowWarning(string text, params object[] args) { MessageBox.Show(ScadaUtils.FormatText(text, args).Trim(), CommonPhrases.WarningCaption, MessageBoxButtons.OK, MessageBoxIcon.Warning); }