public bool Equals(ApplicationSetting other) { return (SkipFirstBlankRows == other.skipFirstBlankRows && SkipFirstBlankColumns == other.SkipFirstBlankColumns && TrimLastBlankRows == other.TrimLastBlankRows && TrimLastBlankColumns == other.TrimLastBlankColumns && ExternalCommands.SequenceEqual(other.ExternalCommands) && FileSettings.SequenceEqual(other.FileSettings) && RecentFileSets.SequenceEqual(other.RecentFileSets) && CellWidth == other.cellWidth && AlternatingColorStrings.SequenceEqual(other.AlternatingColorStrings) && ColumnHeaderColorString.Equals(other.ColumnHeaderColorString) && RowHeaderColorString.Equals(other.RowHeaderColorString) && AddedColorString.Equals(other.AddedColorString) && RemovedColorString.Equals(other.RemovedColorString) && ModifiedColorString.Equals(other.ModifiedColorString) && ModifiedRowColorString.Equals(other.ModifiedRowColorString) && ColorModifiedRow.Equals(other.ColorModifiedRow) && SearchHistory.Equals(other.SearchHistory) && FontName.Equals(other.FontName) && LogFormat.Equals(other.LogFormat) && AddedRowLogFormat.Equals(other.AddedRowLogFormat) && RemovedRowLogFormat.Equals(other.RemovedRowLogFormat)); }
public bool Ensure() { bool changed = EnsureCulture(); if (AlternatingColorStrings == null || !AlternatingColorStrings.Any()) { AlternatingColorStrings = new ObservableCollection <string> { "#FFFFFF" }; changed |= true; } if (string.IsNullOrEmpty(ColumnHeaderColorString)) { ColumnHeaderColorString = EMColor.LightBlue.ToString(); changed |= true; } if (string.IsNullOrEmpty(RowHeaderColorString)) { RowHeaderColorString = EMColor.LightBlue.ToString(); changed |= true; } if (string.IsNullOrEmpty(AddedColorString)) { AddedColorString = EMColor.Orange.ToString(); changed |= true; } if (string.IsNullOrEmpty(RemovedColorString)) { RemovedColorString = EMColor.LightGray.ToString(); changed |= true; } if (string.IsNullOrEmpty(ModifiedColorString)) { ModifiedColorString = EMColor.Orange.ToString(); changed |= true; } if (string.IsNullOrEmpty(ModifiedRowColorString)) { ModifiedRowColorString = EMColor.PaleOrange.ToString(); changed |= true; } foreach (var ec in ExternalCommands) { changed |= ec.Ensure(); } foreach (var fs in FileSettings) { changed |= fs.Ensure(); } if (string.IsNullOrEmpty(FontName)) { FontName = "Arial"; changed |= true; } if (string.IsNullOrEmpty(LogFormat)) { LogFormat = Properties.Resources.DefaultLogFormat; changed |= true; } if (string.IsNullOrEmpty(AddedRowLogFormat)) { AddedRowLogFormat = Properties.Resources.DefaultLogFormatAddedRow; changed |= true; } if (string.IsNullOrEmpty(RemovedRowLogFormat)) { RemovedRowLogFormat = Properties.Resources.DefaultLogFormatRemovedRow; changed |= true; } return(changed); }