30 lines
932 B
C#
30 lines
932 B
C#
|
using DesktopTools.Forms;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Windows.Forms;
|
|||
|
|
|||
|
namespace DesktopTools.BusinessLogics
|
|||
|
{
|
|||
|
/// <summary>
|
|||
|
/// Класс, отвечающий за вывод сообщения с ошибками
|
|||
|
/// </summary>
|
|||
|
public static class ErrorMessanger
|
|||
|
{
|
|||
|
/// <summary>
|
|||
|
/// Вывод сообщения
|
|||
|
/// </summary>
|
|||
|
/// <param name="text"></param>
|
|||
|
/// <param name="result"></param>
|
|||
|
public static void PrintErrorMessage(string text, List<KeyValuePair<string, string>> result)
|
|||
|
{
|
|||
|
if (result.Count == 1)
|
|||
|
{
|
|||
|
MessageBox.Show(result[0].Value, result[0].Key, MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
FormDisplayErrors form = new FormDisplayErrors();
|
|||
|
form.LoadData(text, result);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|