コード例 #1
0
ファイル: FormEditAB.cs プロジェクト: gaslypierre/Drive
        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();
        }
コード例 #2
0
ファイル: FormABLine.cs プロジェクト: gaslypierre/Drive
        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();
        }