protected void SaveFolderInfo(DecoupledStorage storage) { if (storage == null) { return; } storage.WriteBoolean("FolderInfo", "Enabled", Enabled); //string lDescription = TextUtils.EncodeText(Description); string lDescription = CodeRush.StrUtil.EncodeText(Description); storage.WriteString("FolderInfo", "Description", lDescription); storage.WriteEnum("FolderInfo", "FolderState", FolderState); }
public override void Save(DecoupledStorage storage, string section, int index) { base.Save(storage, section, index); storage.WriteBoolean(section, "IsGroup" + index, true); // Use later to determine if this is a group on loading. storage.WriteInt32(section, "GroupCount" + index, keys.Count); // Use later to determine number of elements in this group. storage.WriteEnum(section, "Type" + index, Type); for (int i = 0; i < keys.Count; i++) { keys[i].Save(storage, String.Format("{0}.Group{1}", section, index), i); } }
/// <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(); }