Exemplo n.º 1
0
        /// <summary>
        /// Deserializes and optionally decrypts settings, using specified location
        /// </summary>
        protected virtual void LoadSettings(string directory)
        {
            try
             {
            Settings = (WorldWindSettings)SettingsBase.LoadFromPath(Settings, directory);

            // decrypt encoded user credentials
            DataProtector dp = new DataProtector(DataProtector.Store.USE_USER_STORE);

            if (Settings.ProxyUsername.Length > 0) Settings.ProxyUsername = dp.TransparentDecrypt(Settings.ProxyUsername);
            if (Settings.ProxyPassword.Length > 0) Settings.ProxyPassword = dp.TransparentDecrypt(Settings.ProxyPassword);
             }
             catch (Exception caught)
             {
            Log.Write(caught);
             }
        }
Exemplo n.º 2
0
		/// <summary>
		/// Deserializes and optionally decrypts settings
		/// </summary>
		private static void LoadSettings()
		{
			try
			{
				Settings = (WorldWindSettings) SettingsBase.Load(Settings, SettingsBase.LocationType.User);

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

					Settings.PluginsLoadedOnStartup.Add("Earthquake_2.0.2.1");
					Settings.PluginsLoadedOnStartup.Add("Historical_Earthquake_2.0.2.2");
					Settings.PluginsLoadedOnStartup.Add("KMLImporter");
					//Settings.PluginsLoadedOnStartup.Add("doublezoom");
					//Settings.PluginsLoadedOnStartup.Add("PlanetaryRings");
                    Settings.PluginsLoadedOnStartup.Add("TimeController");
                    //Settings.PluginsLoadedOnStartup.Add("WavingFlags");
                    Settings.PluginsLoadedOnStartup.Add("ScaleBarLegend");
                    Settings.PluginsLoadedOnStartup.Add("Compass3D");
                    Settings.PluginsLoadedOnStartup.Add("AnaglyphStereo");
                    Settings.PluginsLoadedOnStartup.Add("GlobeIcon");

				}
				// decrypt encoded user credentials
				DataProtector dp = new DataProtector(DataProtector.Store.USE_USER_STORE);

				if(Settings.ProxyUsername.Length > 0) Settings.ProxyUsername = dp.TransparentDecrypt(Settings.ProxyUsername);
				if(Settings.ProxyPassword.Length > 0) Settings.ProxyPassword = dp.TransparentDecrypt(Settings.ProxyPassword);
			}
			catch(Exception caught)
			{
				Log.Write(caught);
			}
		}