Example #1
0
        public GISForm()
        {
            //GlobalSettings.LoadConfig();

            LoginForm login = new LoginForm();

            if (login.ShowDialog() != DialogResult.OK)
            {
                Application.Exit();
            }
            WelcomeFormJQ wf = new WelcomeFormJQ();

            wf.Show(this);

            //GlobalSettings.InitGlobal();

            gRWScene = new CRailwayScene();
            //GlobalVar.gScene = new ModelInformation.CRailwayScene();


            InitializeComponent();
            sgworld = new SGWorld66();
            this.axTE3DWindow1.Text = "新建济青高速铁路";

            //axTE3DWindow1.ProductName = "蒙内标轨铁路";
            axTE3DWindow1.Caption = "新建济青高速铁路";
            //sgworld.Project.set_Settings("RemoveSkylineCopyright", 1);
            //sgworld.Project.set_Settings("DisplaySun", 0);
            if (mTEScene == null)
            {
                mTEScene = new CTEScene(gRWScene);
            }
            mNavTrain = new CTENavTrain(gRWScene);
            //mNavTrain.OnFlyTo += mNavTrain_OnFlyTo;

            gMapControl1.MapProvider     = GMap.NET.MapProviders.OpenCycleMapProvider.Instance;
            gMapControl1.Zoom            = 6D;
            GMap.NET.GMaps.Instance.Mode = GMap.NET.AccessMode.ServerOnly;
            gMapControl1.Position        = new GMap.NET.PointLatLng(36.6, 118.6);
            gMapControl1.Visible         = true;


            //GlobalSettings.gGForm = this;

            showProject();
            addDVG_Event();
            //bar1.Visible = false;
            //bar1.Hide();
            createMenuSG();
            menuSG.Visible = false;
            mainContainer.Panel2Collapsed = true;
            trackTime.Text = curTime.ToLongDateString();


            wf.Close();
        }
Example #2
0
        void OnProjectLoadFinished(bool bSuccess)
        {
            mCurPos = sgworld.Creator.CreatePosition(118.6, 36.6, 0, AltitudeTypeCode.ATC_TERRAIN_RELATIVE,
                                                     341, -90.0, 0, 445000);
            //Camera.initial_latitude, Camera.initial_longitude, Camera.initial_heading, Camera., Camera.initial_tilt
            sgworld.Navigate.FlyTo(mCurPos, ActionCode.AC_FLYTO);
            if (mTEScene == null)
            {
                mTEScene = new CTEScene(gRWScene);
            }
            mTEScene.createProjectTree();



            // mTEScene = new CTEScene()
            //GlobalVar.gScene.createProjectTree();
            timerSyncronize.Start();
        }
Example #3
0
        void OnProjectLoadFinished(bool bSuccess)
        {
            mInitialPosition = sgworld.Creator.CreatePosition(118.6, 36.6, 0, AltitudeTypeCode.ATC_TERRAIN_RELATIVE,
                                                              341, -90.0, 0, 445000);
            //Camera.initial_latitude, Camera.initial_longitude, Camera.initial_heading, Camera., Camera.initial_tilt
            sgworld.Navigate.FlyTo(mInitialPosition, ActionCode.AC_FLYTO);
            if (mTEScene == null)
            {
                mTEScene = new CTEScene(gRWScene, timerFlyaround);
            }
            //mTEScene.ShowFinished += MTEScene_ShowFinished;
            //mTEScene.createProjectTree();

            //sgworld.OnMouseWheel += new _ISGWorld66Events_OnMouseWheelEventHandler(OnMouseWheel);
            //sgworld.OnProjectTreeAction += new _ISGWorld66Events_OnProjectTreeActionEventHandler(OnProjectTreeAction);

            //sgworld.OnLButtonUp += OnLButtonUp;
            //sgworld.OnRButtonUp += sgworld_OnRButtonUp;
            //sgworld.OnDateTimeChanged += sgworld_OnDateTimeChanged;
            //sgworld.OnSGWorldMessage += sgworld_OnSGWorldMessage;
            //sgworld.OnObjectAction += sgworld_OnObjectAction;
            //sgworld.OnDrawHUD += sgworld_OnDrawHUD;
            timer2DSyncronize.Start();

            mNavigatioinList = gRWScene.GetDefaultNavPathByMileage();
            //curNavList.RemoveAt(0); // FIXME
            //mNavigatioinList.AddRange( gRWScene.GetContBeamNavPath());
            //mNavigatioinList = gRWScene.GetContBeamNavPath();
            mNavigationControl = new CTEPresentation(gRWScene, mTEScene, m2DProgressPanel, panelInfo1, timerFlyaround, mNavigatioinList);//,timerPresentation

            //mNavigationControl.OnToOnePlace += nav_ToOnePlace;
            //sgworld.OnPresentationFlyToReachedDestination += Sgworld_OnPresentationFlyToReachedDestination;

            //mContbeamNav.startPresentation();
            //auto_Nav(ls);
        }