public AppendCommon() { InitializeComponent(); ShowFilterType = false; DialogName = "Append Common"; FilterTypes = null; AppendCommonData = new AppendCommonStructure(); InitClass(); }
private void _btnOk_Click(object sender, EventArgs e) { if (_txtJPEG2000.Text == "") { Messager.ShowError(this, "Please set the Jpeg2000 file"); return; } if (_txtSecond.Text == "") { Messager.ShowError(this, "Please set the Data file"); return; } using (WaitCursor wait = new WaitCursor()) { try { AppendCommonStructure temp = new AppendCommonStructure(); if (ShowFilterType) { switch (_cbFilterType.SelectedIndex) { case 0: temp.type.Id = pGZIP; break; case 1: temp.type.Id = pDES; break; } } temp.data = File.ReadAllBytes(_txtSecond.Text); AppendCommonData = temp; this.DialogResult = DialogResult.OK; this.Close(); } catch (Exception ex) { Messager.ShowError(this, ex); } } }