Beispiel #1
0
        public static void LoadSettings()
        {
            try
            {
                Global.Settings = (WorldWindSettings)SettingsBase.Load(Global.Settings, SettingsBase.LocationType.User);

                if (!File.Exists(Global.Settings.FileName))
                {
                    MFW3D.Global.Settings.PluginsLoadedOnStartup.Add("ShapeFileInfoTool");
                    MFW3D.Global.Settings.PluginsLoadedOnStartup.Add("OverviewFormLoader");
                    MFW3D.Global.Settings.PluginsLoadedOnStartup.Add("Atmosphere");
                    MFW3D.Global.Settings.PluginsLoadedOnStartup.Add("SkyGradient");
                    MFW3D.Global.Settings.PluginsLoadedOnStartup.Add("BmngLoader");
                    MFW3D.Global.Settings.PluginsLoadedOnStartup.Add("Compass");
                    MFW3D.Global.Settings.PluginsLoadedOnStartup.Add("ExternalLayerManagerLoader");
                    MFW3D.Global.Settings.PluginsLoadedOnStartup.Add("MeasureTool");
                    MFW3D.Global.Settings.PluginsLoadedOnStartup.Add("MovieRecorder");
                    MFW3D.Global.Settings.PluginsLoadedOnStartup.Add("NRLWeatherLoader");
                    MFW3D.Global.Settings.PluginsLoadedOnStartup.Add("ShapeFileLoader");
                    MFW3D.Global.Settings.PluginsLoadedOnStartup.Add("Stars3D");
                    MFW3D.Global.Settings.PluginsLoadedOnStartup.Add("GlobalClouds");
                    MFW3D.Global.Settings.PluginsLoadedOnStartup.Add("PlaceFinderLoader");
                    MFW3D.Global.Settings.PluginsLoadedOnStartup.Add("LightController");

                    MFW3D.Global.Settings.PluginsLoadedOnStartup.Add("KMLImporter");
                    MFW3D.Global.Settings.PluginsLoadedOnStartup.Add("doublezoom");
                    MFW3D.Global.Settings.PluginsLoadedOnStartup.Add("PlanetaryRings");
                    MFW3D.Global.Settings.PluginsLoadedOnStartup.Add("TimeController");
                    MFW3D.Global.Settings.PluginsLoadedOnStartup.Add("WavingFlags");
                    MFW3D.Global.Settings.PluginsLoadedOnStartup.Add("ScaleBarLegend");
                    MFW3D.Global.Settings.PluginsLoadedOnStartup.Add("Compass3D");
                    MFW3D.Global.Settings.PluginsLoadedOnStartup.Add("AnaglyphStereo");
                }
                DataProtector dp = new DataProtector(DataProtector.Store.USE_USER_STORE);
                if (Global.Settings.ProxyUsername.Length > 0)
                {
                    Global.Settings.ProxyUsername = dp.TransparentDecrypt(Global.Settings.ProxyUsername);
                }
                if (Global.Settings.ProxyPassword.Length > 0)
                {
                    Global.Settings.ProxyPassword = dp.TransparentDecrypt(Global.Settings.ProxyPassword);
                }
            }
            catch (Exception caught)
            {
                Log.Write(caught);
            }
        }
Beispiel #2
0
 public static void LoadSettings(string directory)
 {
     try
     {
         Global.Settings = (WorldWindSettings)SettingsBase.LoadFromPath(Global.Settings, directory);
         DataProtector dp = new DataProtector(DataProtector.Store.USE_USER_STORE);
         if (Global.Settings.ProxyUsername.Length > 0)
         {
             Global.Settings.ProxyUsername = dp.TransparentDecrypt(Global.Settings.ProxyUsername);
         }
         if (Global.Settings.ProxyPassword.Length > 0)
         {
             Global.Settings.ProxyPassword = dp.TransparentDecrypt(Global.Settings.ProxyPassword);
         }
     }
     catch (Exception caught)
     {
         Log.Write(caught);
     }
 }