public FrmNewPurpose(ObservableForm reference) { InitializeComponent(); this.receiver = reference; this.FormClosing += this.FrmNewPurpose_FormClosing; this.txtName.KeyPress += new System.Windows.Forms.KeyPressEventHandler(CheckKeys); }
public FrmNewPattern(ObservableForm reference) { InitializeComponent(); this.receiver = reference; this.FormClosing += this.FrmNewPattern_FormClosing; this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); // Set the file dialog to filter for graphics files. openFileDialog.Filter = "Images (*.BMP;*.JPG;*.GIF)|*.BMP;*.JPG;*.GIF|" + "All files (*.*)|*.*"; this.openFileDialog.Title = "Browse image"; this.txtName.KeyPress += new System.Windows.Forms.KeyPressEventHandler(CheckKeys); }