Пример #1
0
        /// <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));
        }
Пример #2
0
 /// <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);
 }