/// <summary> /// Updates the arch with the values currently entered in the dialog /// </summary> private void UpdateArch() { double t = theta.GetResultFloat(originaltheta); double o = offset.GetResultFloat(originaloffset); double s = scale.GetResultFloat(originalscale * 100.0) / 100.0; // Flip the scale if "down" is checked if (!up.Checked) { s *= -1.0; } slopearcher.Theta = Angle2D.DegToRad(t); slopearcher.OffsetAngle = Angle2D.DegToRad(o); slopearcher.Scale = s; slopearcher.HeightOffset = heightoffset.GetResultFloat(originalheightoffset); slopearcher.ApplySlope(); // BaseVisualMode added a event handler to the dialog, so BaseVisualMode will update the geometry when we tell it to UpdateChangedObjects?.Invoke(this, EventArgs.Empty); }
/// <summary> /// Immediately apply the arch when the form is shown /// </summary> /// <param name="sender">sender</param> /// <param name="e">event arguments</param> private void SlopeArchForm_Shown(object sender, EventArgs e) { slopearcher.ApplySlope(); UpdateChangedObjects?.Invoke(this, EventArgs.Empty); }