29 lines
749 B
C#
29 lines
749 B
C#
|
using System.Collections.Generic;
|
|||
|
using System.Windows.Forms;
|
|||
|
|
|||
|
namespace DepartmentPortalDesctop
|
|||
|
{
|
|||
|
/// <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);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|