Beispiel #1
0
        public CTECons(ConsLocation cl, CRailwayScene s, CTEScene ss)
            : base(s, ss)
        {
            sgworld = new SGWorld66();
            consLoc = cl;
            IPosition66 p = sgworld.Creator.CreatePosition(cl.Longitude, cl.Latitude, 30, AltitudeTypeCode.ATC_TERRAIN_RELATIVE,
                                                           0, -90.0, 0, 0);

            circlePeople = sgworld.Creator.CreateCircle(p, cl.Number * 2 + 200, 0xFF0000FF, 0x00FF00FF, mGroupIDDynamic, cl.ProjName + cl.Number);
            //  circle.de
            circlePeople.LineStyle.Width = -3.0;
            circlePeople.Visibility.MinVisibilityDistance = 2000;
            //circle.SetParam

            labelSign = sgworld.Creator.CreateLabel(p, cl.Number + "", CGisDataSettings.gDataPath + @"Common\Textures\working.gif", CRWTEStandard.mLabelStyleL2, mGroupIDDynamic, "Con|" + cl.ProjName);
            //labelSign.Message.MessageID = sgworld.Creator.CreateMessage(MsgTargetPosition.MTP_POPUP, cl.ToString(), MsgType.TYPE_TEXT, true).ID;
        }
Beispiel #2
0
        public CTEConsPhoto(CRailwayScene s, CTEScene ss)
            : base(s, ss)
        {
            //string[] fileName;
            //string[] photoTime;
            //string[] sNo;
            //string[] person;
            //string[] remark;

            //var sgworld = new SGWorld66();
            //if (string.IsNullOrEmpty(mGroupIDStatic))
            //    mGroupIDStatic = sgworld.ProjectTree.CreateGroup("Photo");

            //int num;
            //num = CConsPhoto.findLatestPhotos(5, out fileName, out photoTime, out sNo, out person, out remark);
            ////num = CConsLog.findLast365Cons(out usrName, out projName, out consDate, out x, out y);
            //for (int i = 0; i < num; i++)
            //{
            //    Console.WriteLine("{0} #\t: fileName {1}\t  Date {2}", i,  fileName[i], photoTime[i]);
            //}
        }
Beispiel #3
0
        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;
        }
Beispiel #4
0
 public CTEPier(CRailwayScene s, CTEScene ss)
     : base(s, ss)
 {
 }
Beispiel #5
0
 public CTEObject(CRailwayScene s, CTEScene ss)
 {
     mSceneData = s;
     mTEScene   = ss;
 }
Beispiel #6
0
 public CTEMiddleLine(CRailwayScene s, CTEScene ss, CRWTEStandard t)
     : base(s, ss)
 {
 }
Beispiel #7
0
 public CTEFactory(CRailwayScene s, CTEScene ss, CRWTEStandard t)
     : base(s, ss, t)
 {
 }
Beispiel #8
0
 public CTEProject(CRailwayScene s, CTEScene ss, CRWTEStandard t)
     : base(s, ss, t)
 {
 }
Beispiel #9
0
        public CTEProject(CRailwayProject p, CRailwayScene s, CTEScene ss)
            : base(s, ss)
        {
            proj = p;

            if (!proj.mIsValid)
            {
                return;
            }
            double lat, lon, z, dir;

            //double cx, cy;

            sgworld = new SGWorld66();
            double[] cVerticesArray = null;
            //double[] cVA2 = null;
            int count;

            proj.getSpecialPoint(1, out lon, out lat, out z, out dir);
            //double[] xx,yy,zz,ddir;

            //CoordinateConverter.LatLonOffest(lat, lon, dir, 90, 20, out cy, out cx);

            var cPos2 = sgworld.Creator.CreatePosition(lon, lat, 0, AltitudeTypeCode.ATC_TERRAIN_RELATIVE, 0, -75, 0, 2000);

            //sgworld.Creator.CreateCircle(cPos2, 140, sgworld.Creator.CreateColor(127, 127, 127, 127), sgworld.Creator.CreateColor(127, 127, 127, 127), mGroupIDStatic);
            labelSign = sgworld.Creator.CreateTextLabel(cPos2, proj.ProjectName, CRWTEStandard.mLabelStyleL3, mGroupIDDynamic, "Prj|" + proj.ProjectName);
            //ilabel.Message = sgworld.Creator.CreateMessage();
            labelSign.ImageFileName = CGisDataSettings.gDataPath + @"Common\progress\Pie" + proj.AvgProgress + ".png";
            labelSign.Visibility.MaxVisibilityDistance = 20000;
            labelSign.Style.LineToGround = true;
            //labelSign.Message.MessageID = sgworld.Creator.CreateMessage(MsgTargetPosition.MTP_POPUP, proj.ToString(), MsgType.TYPE_TEXT, true).ID;

            if (proj.mAvgProgress < 0.01)
            {
                return;
            }

            //count = proj.getSubLine(out cVerticesArray);
            double[] xx, yy, zz;
            count          = proj.getMiddleLine(out xx, out yy, out zz);
            cVerticesArray = getVerArray(xx, yy, zz);
            //proj.getMiddleLine(out cVA2);

            if (count > 1)
            {
                polylineDone = sgworld.Creator.CreatePolylineFromArray(cVerticesArray, sgworld.Creator.CreateColor((int)(255 * proj.mAvgProgress), (int)(255 - 255 * proj.mAvgProgress), 0, 255),
                                                                       AltitudeTypeCode.ATC_TERRAIN_ABSOLUTE, mGroupIDDynamic, "Done" + proj.ProjectName);
                //sgworld.Creator.CreatePolylineFromArray(cVA2, sgworld.Creator.CreateColor((int)(255 ), (int)(255 ), 255, 255),
                //    AltitudeTypeCode.ATC_TERRAIN_ABSOLUTE, mGroupIDDynamic, "Middle" + proj.ProjectName);
                polylineDone.Spline = true;
                polylineDone.Visibility.MaxVisibilityDistance = 10000000;
                polylineDone.Visibility.MinVisibilityDistance = 100000;
                if (proj is CContBeam)
                {
                    polylineDone.LineStyle.Width = -5;
                }
                else
                {
                    polylineDone.LineStyle.Width = -2;
                }
            }
            //count = proj.getSubLine(out cVerticesArray);

            //polylineTodo = sgworld.Creator.CreatePolylineFromArray(cVerticesArray, sgworld.Creator.CreateColor(255, 255, 0, 255),
            //    AltitudeTypeCode.ATC_TERRAIN_ABSOLUTE, mGroupIDDynamic, "ToDo" + proj.ProjectName);
            //polylineTodo.Spline = true;
            //polylineTodo.Visibility.MaxVisibilityDistance = 10000000;
            //polylineTodo.Visibility.MinVisibilityDistance = 10;
            //polylineTodo.LineStyle.Width = -2;
        }
Beispiel #10
0
 public CTEKML(CRailwayScene s, CTEScene ss, CRWTEStandard t)
     : base(s, ss, t)
 {
 }
Beispiel #11
0
        //CRailwayScene mSceneData;
        //CRailwayProject st = null;
        //List<CRailwayProject> mStList = null;

        public CTEStation(CRailwayScene s, CTEScene ss)
            : base(s, ss)
        {
            //mSceneData = s;
            //mStList = s.mStationList;
        }
Beispiel #12
0
        // .ToString("u")
        //public DateTime fromDate = DateTime.Now.AddDays(-7);
        //public DateTime toDate = DateTime.Now;
        //private CRailwayScene s;
        //private CRWTEStandard t;

        public CTERWItem(CRailwayScene s, CTEScene ss, CRWTEStandard t)
        {
            mSceneData  = s;
            mTEScene    = ss;
            mTEStandard = t;
        }
Beispiel #13
0
        // .ToString("u")
        //public DateTime fromDate = DateTime.Now.AddDays(-7);
        //public DateTime toDate = DateTime.Now;
        //private CRailwayScene s;
        //private CRWTEStandard t;

        public CTERWItem(CRailwayScene s, CTEScene ss)
        {
            mSceneData = s;
            mTEScene   = ss;
        }
Beispiel #14
0
        public CTEPresentation(CRailwayScene s, CTEScene tes, PanelProgress2D p2, PanelInfo p3, Timer timer, List <CHotSpot> hp = null)//
        {
            mSceneData      = s;
            mTEScene        = tes;
            mNavigationList = hp;
            panel2D         = p2;
            panelInfo       = p3;
            if (mNavigationList == null || mNavigationList.Count <= 1)
            {
                return;
            }
            mNavIndex = mNavigationList.Count - 1;
            //mNavIndex = Math.Max(0, mNavIndex);
            mNavNextIndex = (mNavIndex + 1) % mNavigationList.Count;

            sgworld = new SGWorld66();

            timerWaitingForNext       = timer;
            timerWaitingForNext.Tick += TimerWaitingForNext_Tick;

            if (string.IsNullOrEmpty(mNavObjGroupID))
            {
                mNavObjGroupID = sgworld.ProjectTree.CreateGroup("TrainGroup");
            }
            else
            {
                sgworld.ProjectTree.DeleteItem(mNavObjGroupID);
                mNavObjGroupID = sgworld.ProjectTree.CreateGroup("TrainGroup");
            }

            mPresentationGroupID = sgworld.ProjectTree.FindItem("Presentation");
            if (string.IsNullOrEmpty(mPresentationGroupID))
            {
                mPresentationGroupID = sgworld.ProjectTree.CreateGroup("Presentation");
            }

            mPresentation = sgworld.Creator.CreatePresentation(mPresentationGroupID, "Navigating");

            mPresentation.PlayAlgorithm = PresentationPlayAlgorithm.PPA_SPLINE;
            mPresentation.PlayMode      = PresentationPlayMode.PPM_AUTOMATIC;
            mPresentation.LoopRoute     = true;

            //mPresentation.CaptionHeight = 50;

            //mWorker = (ITerrainModel66)(sgworld.ProjectTree.GetObject(sgworld.ProjectTree.FindItem("worker")));
            //mDynamicWorker =(ITerrainDynamicObject66)(sgworld.ProjectTree.GetObject(sgworld.ProjectTree.FindItem("dynamicCamera")));
            mDynamicTrain[0] = sgworld.Creator.CreateDynamicObject(0, DynamicMotionStyle.MOTION_AIRPLANE, DynamicObjectType.DYNAMIC_3D_MODEL,
                                                                   mModelName[0], 1, AltitudeTypeCode.ATC_TERRAIN_ABSOLUTE, mNavObjGroupID, "TrainObj0");
            mDynamicTrain[1] = sgworld.Creator.CreateDynamicObject(0, DynamicMotionStyle.MOTION_AIRPLANE, DynamicObjectType.DYNAMIC_3D_MODEL,
                                                                   mModelName[1], 1, AltitudeTypeCode.ATC_TERRAIN_ABSOLUTE, mNavObjGroupID, "TrainObj1");
            mDynamicTrain[2] = sgworld.Creator.CreateDynamicObject(0, DynamicMotionStyle.MOTION_AIRPLANE, DynamicObjectType.DYNAMIC_3D_MODEL,
                                                                   mModelName[1], 1, AltitudeTypeCode.ATC_TERRAIN_ABSOLUTE, mNavObjGroupID, "TrainObj2");
            mDynamicTrain[3] = sgworld.Creator.CreateDynamicObject(0, DynamicMotionStyle.MOTION_AIRPLANE, DynamicObjectType.DYNAMIC_3D_MODEL,
                                                                   mModelName[1], 1, AltitudeTypeCode.ATC_TERRAIN_ABSOLUTE, mNavObjGroupID, "TrainObj3");
            mDynamicTrain[4] = sgworld.Creator.CreateDynamicObject(0, DynamicMotionStyle.MOTION_AIRPLANE, DynamicObjectType.DYNAMIC_3D_MODEL,
                                                                   mModelName[2], 1, AltitudeTypeCode.ATC_TERRAIN_ABSOLUTE, mNavObjGroupID, "TrainObj4");
            //mDynamicTrain.Acceleration =
            mVirtualObj = sgworld.Creator.CreateDynamicObject(0, DynamicMotionStyle.MOTION_MANUAL, DynamicObjectType.DYNAMIC_VIRTUAL,
                                                              "", 1, AltitudeTypeCode.ATC_TERRAIN_ABSOLUTE, mNavObjGroupID, "VirtualObj");

            if (!isTEEventRegistered)
            {
                sgworld.OnObjectAction += Sgworld_OnObjectAction;
                sgworld.OnPresentationFlyToReachedDestination += Sgworld_OnPresentationFlyToReachedDestination;
                isTEEventRegistered = true;
            }
        }
Beispiel #15
0
 public CTEConsPhoto(CRailwayScene s, CTEScene ss, CRWTEStandard t)
     : base(s, ss, t)
 {
 }