/// <summary> /// Prepare for saving the configuration to disk. None of the /// modifications in this method need to be rolled back /// (for rollback, use <c>OnSavePre</c> / <c>OnSavePost</c>). /// </summary> private void PrepareSave() { AceMeta aceMeta = this.Meta; // m_meta might be null AceApplication aceApp = this.Application; // m_aceApp might be null AceDefaults aceDef = this.Defaults; // m_def might be null aceMeta.OmitItemsWithDefaultValues = true; aceMeta.DpiFactorX = DpiUtil.FactorX; // For new (not loaded) cfgs. aceMeta.DpiFactorY = DpiUtil.FactorY; aceApp.LastUsedFile.ClearCredentials(true); foreach (IOConnectionInfo iocMru in aceApp.MostRecentlyUsed.Items) { iocMru.ClearCredentials(true); } if (aceDef.RememberKeySources == false) { aceDef.KeySources.Clear(); } aceApp.TriggerSystem = Program.TriggerSystem; SearchUtil.PrepareForSerialize(aceDef.SearchParameters); }
/// <summary> /// Prepare for saving the configuration to disk. None of the /// modifications in this method need to be rolled back /// (for rollback, use <c>OnSavePre</c> / <c>OnSavePost</c>). /// </summary> private void PrepareSave() { AceMeta aceMeta = this.Meta; // m_meta might be null AceApplication aceApp = this.Application; // m_aceApp might be null AceDefaults aceDef = this.Defaults; // m_def might be null aceMeta.OmitItemsWithDefaultValues = true; aceMeta.DpiFactorX = DpiUtil.FactorX; // For new (not loaded) cfgs. aceMeta.DpiFactorY = DpiUtil.FactorY; aceApp.LastUsedFile.ClearCredentials(true); foreach (IOConnectionInfo iocMru in aceApp.MostRecentlyUsed.Items) { iocMru.ClearCredentials(true); } if (aceDef.RememberKeySources == false) { aceDef.KeySources.Clear(); } aceApp.TriggerSystem = Program.TriggerSystem; SearchUtil.PrepareForSerialize(aceDef.SearchParameters); const int m = 64; // Maximum number of compatibility items List <string> l = aceApp.PluginCompatibility; if (l.Count > m) { l.RemoveRange(m, l.Count - m); // See reg. } }
/// <summary> /// Prepare for saving the configuration to disk. None of the /// modifications in this method need to be rolled back /// (for rollback, use <c>OnSavePre</c> / <c>OnSavePost</c>). /// </summary> private void PrepareSave() { m_meta.OmitItemsWithDefaultValues = true; m_aceApp.LastUsedFile.ClearCredentials(true); foreach (IOConnectionInfo iocMru in m_aceApp.MostRecentlyUsed.Items) { iocMru.ClearCredentials(true); } if (m_def.RememberKeySources == false) { m_def.KeySources.Clear(); } m_aceApp.TriggerSystem = Program.TriggerSystem; SearchUtil.PrepareForSerialize(m_def.SearchParameters); }