Beispiel #1
0
        private void tboxHeading_Enter(object sender, EventArgs e)
        {
            tboxHeading.Text = "";

            using (var form = new FormNumeric(0, 360, Math.Round(glm.toDegrees(mf.ABLine.abHeading), 5)))
            {
                var result = form.ShowDialog();
                if (result == DialogResult.OK)
                {
                    tboxHeading.Text    = ((double)form.ReturnValue).ToString("N3");
                    mf.ABLine.abHeading = glm.toRadians((double)form.ReturnValue);
                    mf.ABLine.SetABLineByHeading();
                }
            }

            btnCancel.Focus();
        }
        private void TboxHeading_Enter(object sender, EventArgs e)
        {
            tboxHeading.Text = "";

            using (var form = new FormNumeric(0, 360, upDnHeading))
            {
                var result = form.ShowDialog();
                if (result == DialogResult.OK)
                {
                    upDnHeading      = form.ReturnValue;
                    tboxHeading.Text = upDnHeading.ToString();
                    //mf.ABLine.abHeading = glm.toRadians(Math.Round(upDnHeading, 6));
                    //mf.ABLine.SetABLineByHeading();
                }
            }

            btnTurnOffAB.Focus();
        }
Beispiel #3
0
        private void tboxHeading_Click(object sender, EventArgs e)
        {
            tboxHeading.Text = "";

            using (FormNumeric form = new FormNumeric(0, 360, Math.Round(glm.toDegrees(mf.ABLine.abHeading), 5)))
            {
                if (form.ShowDialog(this) == DialogResult.OK)
                {
                    tboxHeading.Text    = ((double)form.ReturnValue).ToString();
                    mf.ABLine.abHeading = glm.toRadians((double)form.ReturnValue);
                    mf.ABLine.SetABLineByHeading();
                }
                else
                {
                    tboxHeading.Text = Math.Round(glm.toDegrees(mf.ABLine.abHeading), 5).ToString();
                }
            }

            mf.ABLine.isABValid = false;
        }