/
comavp
/
CSharp
Обзор
Документация
Войти
/
comavp
/
CSharp
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
text-editor/TextEditor/MessageService.cs
27 строк
843 B
comavp
Add text-editor
22 авг 2022, 21:26
22 авг 2022, 21:26
04e0cd9
Код
Авторство
О чём код?
using System.Windows.Forms; namespace TextEditor { public interface IMessageService { void ShowMessage(string message); void ShowExclamation(string exclamation); void ShowError(string error); } class MessageService: IMessageService { public void ShowMessage(string message) { MessageBox.Show(message, "Сообщение", MessageBoxButtons.OK, MessageBoxIcon.Information); } public void ShowExclamation(string exclamation) { MessageBox.Show(exclamation, "Предупреждение", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } public void ShowError(string error) { MessageBox.Show(error, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }