public override bool Equals(object o) { if (!(o is clawPDFSettings)) { return(false); } var v = o as clawPDFSettings; if (!ApplicationProperties.Equals(v.ApplicationProperties)) { return(false); } if (!ApplicationSettings.Equals(v.ApplicationSettings)) { return(false); } if (ConversionProfiles.Count != v.ConversionProfiles.Count) { return(false); } for (var i = 0; i < ConversionProfiles.Count; i++) { if (!ConversionProfiles[i].Equals(v.ConversionProfiles[i])) { return(false); } } return(true); }
public ApplicationProperties Copy() { var copy = new ApplicationProperties(); copy.NextUpdate = NextUpdate; copy.SettingsVersion = SettingsVersion; return(copy); }
public void StoreValues(Data data, string path) { ApplicationProperties.StoreValues(data, path + @"ApplicationProperties\"); ApplicationSettings.StoreValues(data, path + @"ApplicationSettings\"); for (var i = 0; i < ConversionProfiles.Count; i++) { var tmp = ConversionProfiles[i]; tmp.StoreValues(data, @"" + path + @"ConversionProfiles\" + i + @"\"); } data.SetValue(@"" + path + @"ConversionProfiles\numClasses", ConversionProfiles.Count.ToString()); }
public clawPDFSettings Copy() { var copy = new clawPDFSettings(storage); copy.ApplicationProperties = ApplicationProperties.Copy(); copy.ApplicationSettings = ApplicationSettings.Copy(); copy.ConversionProfiles = new List <ConversionProfile>(); for (var i = 0; i < ConversionProfiles.Count; i++) { copy.ConversionProfiles.Add(ConversionProfiles[i].Copy()); } return(copy); }
public override string ToString() { var sb = new StringBuilder(); sb.AppendLine("[ApplicationProperties]"); sb.AppendLine(ApplicationProperties.ToString()); sb.AppendLine("[ApplicationSettings]"); sb.AppendLine(ApplicationSettings.ToString()); for (var i = 0; i < ConversionProfiles.Count; i++) { sb.AppendLine(ConversionProfiles.ToString()); } return(sb.ToString()); }
public void ReadValues(Data data, string path) { ApplicationProperties.ReadValues(data, path + @"ApplicationProperties\"); ApplicationSettings.ReadValues(data, path + @"ApplicationSettings\"); try { var numClasses = int.Parse(data.GetValue(@"" + path + @"ConversionProfiles\numClasses")); for (var i = 0; i < numClasses; i++) { var tmp = new ConversionProfile(); tmp.ReadValues(data, @"" + path + @"ConversionProfiles\" + i + @"\"); ConversionProfiles.Add(tmp); } } catch { } }
private void Init() { ApplicationProperties = new ApplicationProperties(); ApplicationSettings = new ApplicationSettings(); ConversionProfiles = new List <ConversionProfile>(); }