Exemple #1
0
        runApp()
        {
            PPF_APP.getFileToProcess();
            if ((TXTFILE == null))
            {
                return;
            }

            //FILEOUT = PPF_Process.procPntFile(TXTFILE);
            PPF_Process.procPntFile(TXTFILE);
            PPF_PostProcess.postProcPntFile();

            fPntDesc = null;

            fPntDesc = PPF_PntDesc.frmPntDesc;
            PPF_PntDesc.loadForm();
            Application.ShowModelessDialog(fPntDesc);
            //fPntDesc.ShowDialog();
            //Point Description form
            //Application.ShowModalDialog(fPntDesc);
        }
Exemple #2
0
        loadForm()
        {
            List <string> pntDescs = PPF_APP.DESCLIST;

            pntDescs.Sort();

            int       n    = pntDescs.Count;
            const int rows = 30;
            int       cols = 1;

            for (int i = 1; i < 10; i++)
            {
                if (n <= i * rows)
                {
                    cols = i;
                    break;
                }
            }

            GroupBox gBox = fPntDesc.groupBox1;

            gBox.Controls.Clear();

            int k = -1;

            try
            {
                for (int j = 0; j < cols; j++)
                {
                    for (int i = 0; i < rows; i++)
                    {
                        ++k;
                        if (k < n)
                        {
                            CheckBox chkBox = new CheckBox();
                            int      i1     = i;
                            int      j1     = j;
                            int      k1     = k;
                            chkBox.With(cb =>
                            {
                                cb.Name  = string.Format("chkBox{0}", k1.ToString("00"));
                                cb.Text  = pntDescs[k1];
                                cb.Top   = i1 * 20 + 5;
                                cb.Left  = j1 * 220 + 5;
                                cb.Width = 200;
                            });
                            if (PPF_PostProcess.testDesc(pntDescs[k]))
                            {
                                chkBox.CheckState = CheckState.Checked;
                            }
                            gBox.Controls.Add(chkBox);
                        }
                        else
                        {
                            break;
                        }
                    }
                }
            }
            catch (System.Exception ex)
            {
                BaseObjs.writeDebug(ex.Message + " PPF_PntDesc.cs: line: 70");
            }

            gBox.Height = rows * 20 + 30;
            if (cols > 3)
            {
                gBox.Width              = cols * 220 + 12;
                fPntDesc.Width          = gBox.Width + 48;
                fPntDesc.cmdOK.Left     = gBox.Left + gBox.Width - 112;
                fPntDesc.cmdCancel.Left = gBox.Left + gBox.Width - 234;
                fPntDesc.cmdPrint.Left  = gBox.Left;
            }

            fPntDesc.Height        = rows * 20 + 130;
            fPntDesc.cmdOK.Top     = rows * 20 + 50;
            fPntDesc.cmdCancel.Top = rows * 20 + 50;
            fPntDesc.cmdPrint.Top  = rows * 20 + 50;
        }