示例#1
0
        static void MergeUpdateSettings(string UpdateConfigFile, ref string UpdatePath, ref string UpdateSpawn)
        {
            try
            {
                ConfigFile UpdateConfig = new ConfigFile();
                if (File.Exists(UpdateConfigFile))
                {
                    UpdateConfig.Load(UpdateConfigFile);
                }

                if (UpdatePath == null)
                {
                    UpdatePath = UpdateConfig.GetValue("Update.Path", null);
                }
                else
                {
                    UpdateConfig.SetValue("Update.Path", UpdatePath);
                }

                if (UpdateSpawn == null)
                {
                    UpdateSpawn = UpdateConfig.GetValue("Update.Spawn", null);
                }
                else
                {
                    UpdateConfig.SetValue("Update.Spawn", UpdateSpawn);
                }

                UpdateConfig.Save(UpdateConfigFile);
            }
            catch (Exception)
            {
            }
        }
示例#2
0
		static void MergeUpdateSettings(string UpdateConfigFile, ref string UpdatePath, ref string UpdateSpawn)
		{
			try
			{
				ConfigFile UpdateConfig = new ConfigFile();
				if(File.Exists(UpdateConfigFile))
				{
					UpdateConfig.Load(UpdateConfigFile);
				}

				if(UpdatePath == null)
				{
					UpdatePath = UpdateConfig.GetValue("Update.Path", null);
				}
				else
				{
					UpdateConfig.SetValue("Update.Path", UpdatePath);
				}

				if(UpdateSpawn == null)
				{
					UpdateSpawn = UpdateConfig.GetValue("Update.Spawn", null);
				}
				else
				{
					UpdateConfig.SetValue("Update.Spawn", UpdateSpawn);
				}

				UpdateConfig.Save(UpdateConfigFile);
			}
			catch(Exception)
			{
			}
		}