private void txtPeg3_TextChanged(object sender, EventArgs e) { Clear_Peg3(p3); Clear_Base_SF(sf); p3.Peg = txtPeg3.Text.Trim(); p3.Mine = lsMineVal[cboMine.SelectedIndex]; p3.Trav = lsTravVal[cboTrav.SelectedIndex]; p3.MineID = lsMineID[cboMine.SelectedIndex]; p3.TravID = lsTravID[cboTrav.SelectedIndex]; p3.MTID = dmMain.Get_MTID(p3.MineID, p3.TravID); if ((p3.Peg != "")) { if (dmMain.Get_PegCoords(p3)) { lblPeg3.ForeColor = Color.Red; lblPeg3F.ForeColor = Color.Red; lblPeg3F.Text = "New Peg Exists"; lblMine3.Text = p3.Mine; lblTrav3.Text = p3.Trav; lblPeg3X.Text = CommonStr.d2s(p3.coord.X); lblPeg3Y.Text = CommonStr.d2s(p3.coord.Y); lblPeg3Z.Text = CommonStr.d2s(p3.coord.Z); lblLP3.Text = CommonStr.LP_Text(p3.LP); lblPeg3G.Text = CommonStr.d2s(p3.coord.G); lblPeg3E.Text = p3.E; lblPeg3C.Text = p3.C; Check_IfBaseExists_SF(); } } }
private void txtPeg2_TextChanged(object sender, EventArgs e) { ClearPeg2(fs); ClearBase(bf); fs.Peg = txtPeg2.Text.Trim(); if (fs.Peg != "") { if (dmMain.Get_PegCoords(fs)) { lblPeg2.ForeColor = Color.Green; lblMine2.Text = fs.Mine; lblTrav2.Text = fs.Trav; lblPeg2X.Text = CommonStr.d2s(fs.coord.X); lblPeg2Y.Text = CommonStr.d2s(fs.coord.Y); lblPeg2Z.Text = CommonStr.d2s(fs.coord.Z); lblLP2.Text = CommonStr.LP_Text(fs.LP); lblMineB.Text = fs.Mine; lblTravB.Text = fs.Trav; CalcJoin(); } } }
private void txtPeg2_TextChanged(object sender, EventArgs e) { Clear_Peg2(p2); Clear_Base_BS(bs); Clear_Base_SF(sf); p2.Peg = txtPeg2.Text.Trim(); if (p2.Peg != "") { if (dmMain.Get_PegCoords(p2)) { lblPeg2.ForeColor = Color.Green; lblMine2.Text = p2.Mine; lblTrav2.Text = p2.Trav; lblPeg2X.Text = CommonStr.d2s(p2.coord.X); lblPeg2Y.Text = CommonStr.d2s(p2.coord.Y); lblPeg2Z.Text = CommonStr.d2s(p2.coord.Z); lblLP2.Text = CommonStr.LP_Text(p2.LP); lblPeg2G.Text = CommonStr.d2s(p2.coord.G); lblPeg2E.Text = p2.E; lblPeg2C.Text = p2.C; lblMineSF.Text = p2.Mine; lblTravSF.Text = p2.Trav; cboMine.Text = p2.Mine; cboTrav.Text = p2.Trav; Check_IfBaseExists_BS(); Check_IfBaseExists_SF(); } } }
private void txtPeg1_TextChanged(object sender, EventArgs e) { Clear_Peg1(p1); Clear_Base_BS(bs); p1.Peg = txtPeg1.Text.Trim(); if ((p1.Peg != "")) { if (dmMain.Get_PegCoords(p1)) { lblPeg1.ForeColor = Color.Green; lblMine1.Text = p1.Mine; lblTrav1.Text = p1.Trav; lblPeg1X.Text = CommonStr.d2s(p1.coord.X); lblPeg1Y.Text = CommonStr.d2s(p1.coord.Y); lblPeg1Z.Text = CommonStr.d2s(p1.coord.Z); lblLP1.Text = CommonStr.LP_Text(p1.LP); lblPeg3G.Text = CommonStr.d2s(p1.coord.G); lblPeg3E.Text = p1.E; lblPeg3C.Text = p1.C; Check_IfBaseExists_BS(); } } }
private void CalcJoin() { if (CheckInput()) { Read_Val_GUI(-1); lblBase.ForeColor = Color.Green; lblLPB.Text = CommonStr.LP_Text(bf.LP); lblBear.Text = CommonStr.ConvertDecToDMS(bf.sfs.Bear); lblBear180.Text = CommonStr.ConvertDecToDMS(bf.sfs.Bear180()); lblHD.Text = CommonStr.d2s(bf.sfs.HD); lblED.Text = CommonStr.d2s(bf.sfs.ED); CheckIfBaseExists(); } }
private void CheckIfBaseExists() { pnlBaseExist.Visible = false; ExistingBase.clear(); if (dmMain.Get_bc3_ByNames(st.Peg, fs.Peg, ExistingBase) > -1) { pnlBaseExist.Visible = true; lblMineEB.Text = ExistingBase.Mine; lblTravEB.Text = ExistingBase.Trav; lblBearEB.Text = CommonStr.ConvertDecToDMS(ExistingBase.sfs.Bear); lblBear180EB.Text = CommonStr.ConvertDecToDMS(ExistingBase.sfs.Bear180()); lblBearErrEB.Text = CommonStr.ConvertDecToDMS(ExistingBase.HAFLErr); lblHDEB.Text = CommonStr.d2s(ExistingBase.sfs.HD); lblEDEB.Text = CommonStr.d2s(ExistingBase.sfs.ED); lblLPEB.Text = CommonStr.LP_Text(ExistingBase.LP); } }
private void Check_IfBaseExists_SF() // STN FS { sf.clear(); if (dmMain.Get_bc2_ByNames(p2.Peg, p3.Peg, sf) > -1) { lblBaseSF.Text = "STN to FS Base Exists"; lblBaseSF.ForeColor = Color.Red; lblMineSF.Text = sf.Mine; lblTravSF.Text = sf.Trav; lblBearSF.Text = CommonStr.ConvertDecToDMS(sf.polar.Bear); lblBear180SF.Text = CommonStr.ConvertDecToDMS(sf.polar.Bear180()); lblBearErrSF.Text = CommonStr.ConvertDecToDMS(sf.polar.BearErr); lblHDSF.Text = CommonStr.d2s(sf.polar.HD); lblEDSF.Text = CommonStr.d2s(sf.polar.ED); lblLPSF.Text = CommonStr.LP_Text(sf.LP); lblESF.Text = sf.E; lblCSF.Text = sf.C; } }
private void Check_IfBaseExists_BS() // BS ST - Remember to reverse - STN to BS { bs.clear(); if (dmMain.Get_bc2_ByNames(p2.Peg, p1.Peg, bs) > -1) // Reverse base??? { lblBaseBS.Text = "STN to BS Base Exists"; lblBaseBS.ForeColor = Color.Green; lblMineBS.Text = bs.Mine; lblTravBS.Text = bs.Trav; lblBearBS.Text = CommonStr.ConvertDecToDMS(bs.polar.Bear); lblBear180BS.Text = CommonStr.ConvertDecToDMS(bs.polar.Bear180()); lblBearErrBS.Text = CommonStr.ConvertDecToDMS(bs.polar.BearErr); lblHDBS.Text = CommonStr.d2s(bs.polar.HD); lblEDBS.Text = CommonStr.d2s(bs.polar.ED); lblLPBS.Text = CommonStr.LP_Text(bs.LP); lblEBS.Text = bs.E; lblCBS.Text = bs.C; } }
private void txtPeg1_TextChanged(object sender, EventArgs e) { ClearPeg1(st); ClearBase(bf); st.Peg = txtPeg1.Text.Trim(); if ((st.Peg != "")) { if (dmMain.Get_PegCoords(st)) { lblPeg1.ForeColor = Color.Green; lblMine1.Text = st.Mine; lblTrav1.Text = st.Trav; lblPeg1X.Text = CommonStr.d2s(st.coord.X); lblPeg1Y.Text = CommonStr.d2s(st.coord.Y); lblPeg1Z.Text = CommonStr.d2s(st.coord.Z); lblLP2.Text = CommonStr.LP_Text(st.LP); CalcJoin(); } } }