示例#1
0
        private void angleButton_Click(object sender, EventArgs e)
        {
            StraightLeg leg = (CurrentFace.Leg as StraightLeg);

            if (leg == null)
            {
                return;
            }

            using (AngleForm dial = new AngleForm(leg))
            {
                if (dial.ShowDialog() == DialogResult.OK)
                {
                    if (dial.IsDeflection)
                    {
                        leg.SetDeflection(dial.SignedAngle);
                    }
                    else
                    {
                        leg.StartAngle = dial.SignedAngle;
                    }

                    m_Edits.SetStartAngle(m_CurFaceIndex, dial.SignedAngle, dial.IsDeflection);
                    Rework();
                }
            }
        }
示例#2
0
        private void angleButton_Click(object sender, EventArgs e)
        {
            // Display angle dialog. On OK, replace current selection
            // (if any) with the result of formatting the dialog.

            AngleForm dial = new AngleForm();

            if (dial.ShowDialog() == DialogResult.OK)
            {
                ReplaceSel(dial.Format());
            }

            dial.Dispose();

            // Put focus back in the data entry box
            pathTextBox.Focus();
        }
示例#3
0
        private void angleButton_Click(object sender, EventArgs e)
        {
            StraightLeg leg = (CurrentFace.Leg as StraightLeg);
            if (leg == null)
                return;

            using (AngleForm dial = new AngleForm(leg))
            {
                if (dial.ShowDialog() == DialogResult.OK)
                {
                    if (dial.IsDeflection)
                        leg.SetDeflection(dial.SignedAngle);
                    else
                        leg.StartAngle = dial.SignedAngle;

                    m_Edits.SetStartAngle(m_CurFaceIndex, dial.SignedAngle, dial.IsDeflection);
                    Rework();
                }
            }
        }