Ejemplo n.º 1
0
        static void Main()
        {
            System.Windows.Forms.Application.EnableVisualStyles();
            System.Windows.Forms.Application.DoEvents();
            WMSBrowser me = new WMSBrowser();

            me.MapSize = new System.Drawing.Size(1024, 512);
            me.MapFormatPreferences = new string[] { @"image/png", @"image/gif" };
            System.Windows.Forms.Application.Run(me);
            me.initializeServerDescriptors();
        }
Ejemplo n.º 2
0
        private void AddInternalPluginMenuButtons()
        {
            if (this.worldWindow.CurrentWorld.IsEarth)
            {
                this.rapidFireModisManager      = new RapidFireModisManager(this.worldWindow);
                this.rapidFireModisManager.Icon = this.Icon;
            }
            this.wmsBrowser      = new WMSBrowser(this.worldWindow);
            this.wmsBrowser.Icon = this.Icon;

            if (this.worldWindow.CurrentWorld.IsEarth)
            {
                this.animatedEarthMananger      = new AnimatedEarthManager(this.worldWindow);
                this.animatedEarthMananger.Icon = this.Icon;
            }
        }
Ejemplo n.º 3
0
 private void OpenWorld(string worldXmlFile)
 {
     if (this.worldWindow.CurrentWorld != null)
     {
         foreach (PluginInfo p in this.compiler.Plugins)
         {
             try
             {
                 if (p.Plugin.IsLoaded)
                 {
                     p.Plugin.Unload();
                 }
             }
             catch
             { }
         }
         try
         {
             this.worldWindow.CurrentWorld.Dispose();
         }
         catch
         { }
     }
     if (this.rapidFireModisManager != null)
     {
         this.rapidFireModisManager.Dispose();
         this.rapidFireModisManager = null;
     }
     if (this.animatedEarthMananger != null)
     {
         this.animatedEarthMananger.Dispose();
         this.animatedEarthMananger = null;
     }
     if (this.wmsBrowser != null)
     {
         this.wmsBrowser.Dispose();
         this.wmsBrowser = null;
     }
     worldWindow.CurrentWorld = MFW3D.ConfigurationLoader.Load(worldXmlFile, worldWindow.Cache);
     InitializePluginCompiler();
     foreach (RenderableObject worldRootObject in this.worldWindow.CurrentWorld.RenderableObjects.ChildObjects)
     {
         //添加图层
     }
 }
Ejemplo n.º 4
0
        private void OpenWorld(string worldXmlFile)
        {
            if (this.worldWindow.CurrentWorld != null)
            {
                try
                {
                    // this.worldWindow.ResetToolbar();
                }
                catch
                { }
                try
                {
                    foreach (PluginInfo p in this.compiler.Plugins)
                    {
                        try
                        {
                            if (p.Plugin.IsLoaded)
                            {
                                p.Plugin.Unload();
                            }
                        }
                        catch
                        { }
                    }
                }
                catch
                { }

                try
                {
                    this.worldWindow.CurrentWorld.Dispose();
                }
                catch
                { }
            }
            if (this.gotoDialog != null)
            {
                this.gotoDialog.Dispose();
                this.gotoDialog = null;
            }
            if (this.rapidFireModisManager != null)
            {
                this.rapidFireModisManager.Dispose();
                this.rapidFireModisManager = null;
            }
            if (this.animatedEarthMananger != null)
            {
                this.animatedEarthMananger.Dispose();
                this.animatedEarthMananger = null;
            }
            if (this.wmsBrowser != null)
            {
                this.wmsBrowser.Dispose();
                this.wmsBrowser = null;
            }
            worldWindow.CurrentWorld = WorldWind.ConfigurationLoader.Load(worldXmlFile, worldWindow.Cache);
            this.splashScreen.SetText("Initializing menus...");
            InitializePluginCompiler();
            foreach (RenderableObject worldRootObject in this.worldWindow.CurrentWorld.RenderableObjects.ChildObjects)
            {
                this.AddLayerMenuButtons(this.worldWindow, worldRootObject);
            }
            this.AddInternalPluginMenuButtons();
        }