using RestaurantContracts.BusinessLogicsContracts; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace RestaurantView { public partial class FormTests : Form { private readonly IOrderLogic _orderLogic; public FormTests(IOrderLogic orderLogic) { InitializeComponent(); _orderLogic = orderLogic; } private void ButtonGetTest_Click(object sender, EventArgs e) { textBoxGetTest.Text = _orderLogic.GetTest(Convert.ToInt32(numericUpDownGetTest.Value)) + "мс"; } private void ButtonDiffGetTest_Click(object sender, EventArgs e) { textBoxGetDiffTest.Text = _orderLogic.DiffGetTest(Convert.ToInt32(numericUpDownGetDiffTest.Value)) + "мс"; } private void ButtonSetTest_Click(object sender, EventArgs e) { textBoxSetTest.Text = _orderLogic.SetTest(Convert.ToInt32(numericUpDownSetTest.Value)) + "мс"; } private void ButtonClear_Click(object sender, EventArgs e) { if (_orderLogic.ClearList()) { MessageBox.Show("Удаление записей завершено", "Успешно", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } MessageBox.Show("Удаление записей провалилось", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }