private void BtnOK_Click(object sender, EventArgs e) { settings.SetImageWidth((int)NumericUpDownWidth.Value); settings.SetImageHeight((int)NumericUpDownHeight.Value); drawingEngine.NewImageSize(); this.Close(); }