public CTEObject showTEObject(CHotSpot hs1, CHotSpot hs2, bool isStopping = false) { CTEObject obj = null; switch (hs1.ObjectType) { case "Project": CRailwayProject rp = (CRailwayProject)(hs1.ObjectRef); //string s = "当前位置: " + rp.ToString() + "\t\t"; //labelRoll2.Text = s; //labelRoll2.Refresh(); obj = showTEProject(rp, isStopping); break; case "Firm": CRailwayFirm rf = (CRailwayFirm)(hs1.ObjectRef); obj = showTEFirms(rf, isStopping); break; case "Cons": ConsLocation cl = (ConsLocation)(hs1.ObjectRef); obj = showTECons(cl, isStopping); break; } return(obj); }
public CTEFirm(CRailwayFirm f, CRailwayScene s, CTEScene ss) : base(s, ss) { firm = f; sgworld = new SGWorld66(); if (!string.IsNullOrEmpty(firm.mPresentation)) { var id = sgworld.ProjectTree.FindItem("\\Presentation\\" + firm.mPresentation); mPresentation = (IPresentation66)(sgworld.ProjectTree.GetObject(id)); //if (CGisDataSettings.AppSpeed <= 2) // mPresentation.PlaySpeedFactor = PresentationPlaySpeed.PPS_VERYSLOW; //else if (CGisDataSettings.AppSpeed < 5) // mPresentation.PlaySpeedFactor = PresentationPlaySpeed.PPS_SLOW; //else if (CGisDataSettings.AppSpeed < 7) // mPresentation.PlaySpeedFactor = PresentationPlaySpeed.PPS_NORMAL; //else if (CGisDataSettings.AppSpeed < 9) // mPresentation.PlaySpeedFactor = PresentationPlaySpeed.PPS_FAST; //else // mPresentation.PlaySpeedFactor = PresentationPlaySpeed.PPS_VERYFAST; } ILabelStyle66 cLabelStyle; IPosition66 cp = sgworld.Creator.CreatePosition(f.CenterLongitude, f.CenterLatitude, 0, AltitudeTypeCode.ATC_TERRAIN_RELATIVE); circlePeople = sgworld.Creator.CreateCircle(cp, f.NumStaff * 2 + 200, 0xFFFFFFFF, 0x00FF00FF, mGroupIDStatic, f.FirmName + " " + f.NumStaff); circlePeople.LineStyle.Width = -3.0; circlePeople.Visibility.MinVisibilityDistance = 5000; if (f.FirmType.Equals("制梁场") || f.FirmType.Equals("项目部") || f.FirmType.Equals("监理单位")) { cLabelStyle = CRWTEStandard.mLabelStyleL2; } else { cLabelStyle = CRWTEStandard.mLabelStyleL1; } labelSign = sgworld.Creator.CreateLabel(cp, f.FirmName, CGisDataSettings.gDataPath + @"Common\地标图片\" + f.mLabelImage, cLabelStyle, mGroupIDStatic, "Fir|" + f.FirmName); labelSign.Message.MessageID = sgworld.Creator.CreateMessage(MsgTargetPosition.MTP_POPUP, f.ToString(), MsgType.TYPE_TEXT, true).ID; }
private CTEObject showTEFirms(CRailwayFirm rf, bool isStopping = false) { CTEFirm tf = mTEFirmList.Find(delegate(CTEFirm tff) { return(tff.firm == rf); }); return(tf); }