public void onResizeTest() { BMPLogic logic = new BMPLogic(300, 300); Bitmap bmp = logic.onResize(new Size(400, 400)); Assert.Equal(bmp.Width, 400); Assert.Equal(bmp.Height, 400); }
/// <summary> /// Обработка изменения размера формы /// </summary> /// <param name="sender">Отправитель</param> /// <param name="e">Параметры</param> private void Form1_Resize(object sender, EventArgs e) { if (WindowState != LastState) { picture.Size = new Size(Size.Width - 90, Size.Height - 137); picture.Image = logic.onResize(picture.Size); LastState = WindowState; } }