public override void Expand() { try { Expansion expansion = new Expansion(this); this.Update(expansion.Strands); } catch(ApplicationException ex) { throw ex; } }
protected void ExpandButton_Click(object sender, EventArgs e) { if (!PointGroupParameters.Busy) // because GetPointGroupParameters() is called... { PointGroupParameters.Busy = true; try { GetPointGroupParameters(); SetPointGroupParameterValues(); _expander.SetAllPointGroupsVisible(); RedrawFieldPanel(); RemoveStrands(); CheckExpanderAndInputValidity(); // throws exception on failure Expansion expansion = new Expansion(_strandNodeList, _expander); _outputKrystal.Update(expansion.Strands); _expansionTreeView.DisplayStrands(_outputKrystal.Strands); // appends the strand values to the existing tree display of the input values _outputKrystal.Name = K.UntitledKrystalName; // force a new name to take account of MaxValue; //_krystalIsSaved = false; this.ExpandButton.Enabled = false; EnableSaving(); SetStatusText(); } catch (ApplicationException ae) { MessageBox.Show(ae.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } PointGroupParameters.Busy = false; } }