private void otherButton_Click(object sender, EventArgs e) { bool oldDefault = m_IsDefault; try { IntersectForm parent = GetIntersectForm(); m_IsDefault = !m_IsDefault; IPosition other = parent.CalculateIntersect(); if (other == null || other.IsAt(m_Intersect, Constants.TINY)) { throw new Exception("There isn't another intersection"); } m_Intersect = other; ShowIntersection(); EditingController.Current.ActiveDisplay.RestoreLastDraw(); } catch (Exception ex) { m_IsDefault = oldDefault; MessageBox.Show(ex.Message); } }
void RecalculateIntersection() { IntersectForm parent = GetIntersectForm(); if (parent != null) { m_Intersect = parent.CalculateIntersect(); ShowIntersection(); } }