예제 #1
0
 private void cmdClear_Click(object eventSender, EventArgs eventArgs)
 {
     txtHeight.Clear();
     txtCH.Clear();
     txtMTR.Clear();
     txtMTL.Clear();
     txtCD.Clear();
     txtDraft.Clear();
     txtBH.Clear();
     VerticalTxtBx.Clear();
     DepthTxtBx.Clear();
     return;
 }
예제 #2
0
        private void FormVertical_Load(object eventSender, EventArgs eventArgs)
        {
            if (My.MyProject.Forms.FormTides.Flag == false)
            {
                txtHeight.Clear();
            }

            txtCH.Clear();
            txtMTR.Clear();
            txtMTL.Clear();
            txtCD.Clear();
            txtDraft.Clear();
            txtBH.Clear();
            VerticalTxtBx.Clear();
            DepthTxtBx.Clear();
        }
예제 #3
0
 private void cmdCalcVert_Click(object eventSender, EventArgs eventArgs)
 {
     H1 = (float)(0.5d * Conversion.Val(txtMTR.Text) + Conversion.Val(txtMTL.Text)); // H1 is height of MHW above MLLW
     H1 = (float)(Convert.ToInt32(H1 * 10f + 0.5d) / 10d);
     VC = (float)(Conversion.Val(txtCH.Text) + H1 - Conversion.Val(txtHeight.Text));
     AC = (float)(VC - Conversion.Val(txtBH.Text));
     AC = (float)(Convert.ToInt32(AC * 10f + 0.5d) / 10d);
     DC = (float)(Conversion.Val(txtCD.Text) + Conversion.Val(txtHeight.Text) - Conversion.Val(txtDraft.Text));
     VerticalTxtBx.SelectionAlignment = HorizontalAlignment.Center;
     VerticalTxtBx.AppendText("Height of MHW above MLLW = 1/2 Mean Range + Mean Tide");
     VerticalTxtBx.AppendText(" = 1/2 (" + Conversion.Val(txtMTR.Text) + ") + " + Conversion.Val(txtMTL.Text).ToString() + " = " + H1.ToString() + Environment.NewLine);
     VerticalTxtBx.AppendText("Vertical Clearance = Charted Height + Height of MHW above MLLW - Height of Tide above MLLW");
     VerticalTxtBx.AppendText(" = " + Conversion.Val(txtCH.Text) + " + " + H1.ToString() + " - " + Conversion.Val(txtHeight.Text).ToString() + " = " + VC.ToString() + Environment.NewLine);
     VerticalTxtBx.AppendText("Actual Clearance = Vertical Clearance - Boat Height");
     VerticalTxtBx.AppendText(" = " + VC + " - " + Conversion.Val(txtBH.Text).ToString() + " = " + AC.ToString() + Environment.NewLine);
     DepthTxtBx.SelectionAlignment = HorizontalAlignment.Center;
     DepthTxtBx.AppendText("Depth Clearance (under keel) = Charted Depth + Height of Tide above MLLW - Boat's Draft");
     DepthTxtBx.AppendText(" = " + Conversion.Val(txtCD.Text) + " + " + Conversion.Val(txtHeight.Text).ToString() + " - " + Conversion.Val(txtDraft.Text).ToString() + " = " + DC.ToString());
 }