コード例 #1
0
        private void gradesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmTraverseCalc frm = new frmTraverseCalc(this);

            frm.MdiParent = this;
            frm.add_pcid(1);
            frm.add_pcid(2);
            frm.add_pcid(3);

            frm.Show();
        }
コード例 #2
0
        private void traverseSurveyToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if ((fTraverseCalc != null) && (fTraverseCalc.IsDisposed))
            {
                fTraverseCalc = null;
            }

            if (fTraverseCalc == null)
            {   //Create New Form
                fTraverseCalc             = new frmTraverseCalc(this);
                fTraverseCalc.LoadingData = true;
                fTraverseCalc.MdiParent   = this;
                fTraverseCalc.prepare_dgvSetup();
                if (fTraverseCalc.check_ForBinData()) //if there is already data, load and show the first row
                {
                    fTraverseCalc.load_TmpTables();
                    fTraverseCalc.load_Lkps();
                }
                else                       // load new data
                {
                    dlgSelectBase dlg = new dlgSelectBase();
                    if (dlg.ShowDialog(this) == DialogResult.OK)
                    {
                        MessageBox.Show(dlg.p1.pcid.ToString());

                        MessageBox.Show("Base Selected");

                        fTraverseCalc.add_pcid(dlg.p1.pcid);
                        fTraverseCalc.add_pcid(dlg.p2.pcid);
                        fTraverseCalc.add_bcid(-1, dlg.bs, dlg.p3);
                        //frm.Add_Hor(1,1,1);
                        //frm.Add_Vert(1, 1, 1);
                    }
                    dlg.Dispose();
                }
                fTraverseCalc.LoadingData = false;
                fTraverseCalc.calc_Coords(false);
                fTraverseCalc.Show();
            }
            else
            {
                fTraverseCalc.BringToFront();
            }
        }