Exemple #1
0
 /// <summary>
 /// Saves the options to storage.
 /// </summary>
 /// <param name="storage">A storage object to which the options should be saved.</param>
 /// <exception cref="System.ArgumentNullException">
 /// Thrown if <paramref name="storage" /> is <see langword="null" />.
 /// </exception>
 public void Save(DecoupledStorage storage)
 {
     if (storage == null)
     {
         throw new ArgumentNullException("storage");
     }
     Log.SendMsg("Saving 'format on save' options.");
     storage.LanguageID = "";
     storage.WriteBoolean(SectionGeneral, KeyEnabled, this.Enabled);
     Log.SendBool("Enabled", this.Enabled);
     storage.WriteEnum(SectionGeneral, KeyLanguagesToFormat, this.LanguagesToFormat);
     Log.SendEnum("Languages to format", this.LanguagesToFormat);
     storage.UpdateStorage();
 }
		/// <summary>
		/// Saves the options to storage.
		/// </summary>
		/// <param name="storage">A storage object to which the options should be saved.</param>
		/// <exception cref="System.ArgumentNullException">
		/// Thrown if <paramref name="storage" /> is <see langword="null" />.
		/// </exception>
		public void Save(DecoupledStorage storage)
		{
			if (storage == null)
			{
				throw new ArgumentNullException("storage");
			}
			Log.SendMsg("Saving 'format on save' options.");
			storage.LanguageID = "";
			storage.WriteBoolean(SectionGeneral, KeyEnabled, this.Enabled);
			Log.SendBool("Enabled", this.Enabled);
			storage.WriteEnum(SectionGeneral, KeyLanguagesToFormat, this.LanguagesToFormat);
			Log.SendEnum("Languages to format", this.LanguagesToFormat);
			storage.UpdateStorage();
		}