using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace FCC_Uber_MDX_Configurator { public partial class ErrorForm : Form { #region Initialize public ErrorForm(string _title, string _error) { InitializeComponent(); LBL_TITLE.Text = _title; TXT_AREA.Text = _error; BTN_CANCEL_ERROR.Focus(); this.Text = "Error..."; this.Update(); } public ErrorForm(string _title, string _error, bool isWarning) { InitializeComponent(); LBL_TITLE.Text = _title; TXT_AREA.Text = _error; BTN_CANCEL_ERROR.Focus(); if (isWarning) { this.IMAGE_BOX.Image = global::FCC_Uber_MDX_Configurator.Properties.Resources.WarningIconBlue; this.Text = "Warning..."; } else { this.IMAGE_BOX.Image = global::FCC_Uber_MDX_Configurator.Properties.Resources.WarningIcon; this.Text = "Error..."; } this.Update(); } public void MakeBigger(int width, int height) { this.Size = new Size(width, height); this.BTN_CANCEL_ERROR.Location = new Point(width - 68, height - 86); this.LBL_TITLE.MinimumSize = new Size(width - 175, 0); this.TXT_AREA.MinimumSize = new Size(width - 175, height - 130); this.TXT_AREA.MaximumSize = new Size(width - 175, height - 130); } #endregion #region Exit Error Form private void BTN_CANCEL_Click(object sender, EventArgs e) { this.DialogResult = DialogResult.Cancel; this.Close(); } #endregion } }