コード例 #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
ファイル: PathForm.cs プロジェクト: 15831944/backsight
        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();
                }
            }
        }