private void buttonGet_Click(object sender, EventArgs e) { Forms.FormGetDistress getDistress = new Forms.FormGetDistress(); getDistress.Title = this.Label; getDistress.textDescription.Text = Description; getDistress.MaxDistress = MaxDistress; if (!String.IsNullOrWhiteSpace(IllustrationName)) { Object image = Properties.Resources.ResourceManager.GetObject(IllustrationName); getDistress.setIllustration((Bitmap)image); } //distressForm.Style = Form; if (getDistress.ShowDialog() == DialogResult.OK) { try { this.Value = getDistress.DistressValue; } catch { // TODO: } // TODO: Raise change event } else { // TODO: (Nothing?) } //// cancel will return a different DialogResult (.CANCEL IIRC) //if (distressForm.ShowDialog() == DialogResult.OK) //{ // try // { // this.Value = distressForm.DistressValue.ToString(); // distressForm.Dispose(); // OnValueChanged(new CustomEventArgs()); // } // catch (Exception Get_Click_e) // { // MessageBox.Show("Unknown Error\n" + Get_Click_e); // } //} // else do nothing }
private void buttonGet_Click(object sender, EventArgs e) { Forms.FormGetDistress getDistress = new Forms.FormGetDistress(); getDistress.Title = this.Label; getDistress.textDescription.Text = Description; getDistress.MaxDistress = MaxDistress; if (!String.IsNullOrWhiteSpace(IllustrationName)) { Object image = Properties.Resources.ResourceManager.GetObject(IllustrationName); getDistress.setIllustration((Bitmap)image); } //distressForm.Style = Form; if (getDistress.ShowDialog() == DialogResult.OK) { try { this.Value = getDistress.DistressValue; } catch { // TODO: } } }