Beispiel #1
0
        void GetDlgED(int nED, int ncombo, int nID)
        {
            if (carED[nED] == null)
            {
                carED[nED] = new CElementData();
            }
            carED[nED].dStartChain    = this.txtStartInterval_.Value;
            carED[nED].dChainInterval = this.txtChainageInterval_.Value;
            carED[nED].dXvalue        = this.txtXVal_.Value;
            carED[nED].dYvalue        = this.txtYVal_.Value;
            carED[nED].nType          = ncombo;

            carED[nED].dBearings  = this.txtWCBearings_.Value;
            carED[nED].dLength    = this.txtLength_.Value;
            carED[nED].dRadius    = this.txtRadius_.Value;
            carED[nED].npLineID   = nID;
            carED[nED].nElementNo = this.StartEleNo;
        }
Beispiel #2
0
        void FillFromExistingData(CHIPInfo info)
        {
            if (info.IsHipData == false)
            {
                ViewerUtils.DeleteFileIfExists(System.IO.Path.Combine(this.m_app.AppDataPath, "halign.tmp"));

                int nidxED = 0;

                this.txtModelName_.Text   = info.ModelName;
                this.txtStringlabel_.Text = info.StringLabel;
                for (int iCnt = 0; iCnt < info.DataList.Count; iCnt++)
                {
                    CHalignFilData fildata = info.DataList[iCnt];
                    if (carED[nidxED] == null)
                    {
                        carED[nidxED] = new CElementData();
                    }
                    carED[nidxED].dBearings      = fildata.dB1;
                    carED[nidxED].dChainInterval = 10;
                    carED[nidxED].dLength        = fildata.dEllength;
                    if (fildata.iTurn == 1)
                    {
                        fildata.dRadius = -1 * fildata.dRadius;
                    }
                    carED[nidxED].dRadius     = fildata.dRadius;
                    carED[nidxED].dStartChain = fildata.dStartchn;
                    carED[nidxED].dXvalue     = fildata.dStartx;
                    carED[nidxED].dYvalue     = fildata.dStarty;
                    carED[nidxED].nElementNo  = nidxED + 1;
                    carED[nidxED].nType       = fildata.iEltype;

                    CHalignElementUtil code = new CHalignElementUtil();

                    code.Funcmain(this.m_app.AppDataPath, 2, 1, info.ModelName, info.StringLabel
                                  , (short)(nidxED + 1), fildata.iEltype, fildata.dStartchn
                                  , 10.0, fildata.dStartx, fildata.dStarty, fildata.dB1
                                  , fildata.dEllength, fildata.dRadius);

                    carED[nidxED].npLineID = DrawingUtil.DrawData(this.m_app, System.IO.Path.Combine(this.m_app.AppDataPath, "HAL2.TMP"), "ELE", true);

                    nidxED++;

                    this.SelectedElementType        = fildata.iEltype;
                    this.txtChainageInterval_.Value = 10.0;
                    this.txtLength_.Value           = fildata.dEllength;
                    this.txtModelName_.Text         = fildata.sMod;
                    this.txtRadius_.Value           = fildata.dRadius;
                    this.txtStartInterval_.Value    = fildata.dEndchn;
                    this.txtStringlabel_.Text       = fildata.sString;
                    this.txtWCBearings_.Value       = fildata.dB2;
                    this.txtXVal_.Value             = fildata.dEndx;
                    this.txtYVal_.Value             = fildata.dEndy;
                    this.StartEleNo = nidxED + 1;
                    ElementNo       = nidxED + 1;
                    nTotED          = ElementNo - 1;
                    TotalEleDrawn   = nidxED;

                    lastED.dStartChain    = this.txtStartInterval_.Value;
                    lastED.dChainInterval = this.txtChainageInterval_.Value;
                    lastED.dXvalue        = this.txtXVal_.Value;
                    lastED.dYvalue        = this.txtYVal_.Value;
                    lastED.nType          = this.SelectedElementType;
                    lastED.dBearings      = this.txtWCBearings_.Value;
                    lastED.dLength        = this.txtLength_.Value;
                    lastED.dRadius        = this.txtRadius_.Value;
                    lastED.nElementNo     = this.StartEleNo;
                }
                this.m_app.ActiveDocument.RefreshDocument();
                this.m_app.ZoomExtents();
                //ViewerUtils.DeleteFileIfExists(this.m_app.AppDataPath + @"\~halign.fil");
            }
        }