Beispiel #1
0
        public override bool Equals(object o)
        {
            if (!(o is PdfCreatorSettings))
            {
                return(false);
            }
            PdfCreatorSettings v = o as PdfCreatorSettings;

            if (!ApplicationProperties.Equals(v.ApplicationProperties))
            {
                return(false);
            }
            if (!ApplicationSettings.Equals(v.ApplicationSettings))
            {
                return(false);
            }

            if (ConversionProfiles.Count != v.ConversionProfiles.Count)
            {
                return(false);
            }
            for (int i = 0; i < ConversionProfiles.Count; i++)
            {
                if (!ConversionProfiles[i].Equals(v.ConversionProfiles[i]))
                {
                    return(false);
                }
            }


            return(true);
        }
Beispiel #2
0
        public PdfCreatorSettings Copy()
        {
            PdfCreatorSettings copy = new PdfCreatorSettings(_storage);

            copy.ApplicationProperties = ApplicationProperties.Copy();
            copy.ApplicationSettings   = ApplicationSettings.Copy();

            copy.ConversionProfiles = new ObservableCollection <ConversionProfile>();
            for (int i = 0; i < ConversionProfiles.Count; i++)
            {
                copy.ConversionProfiles.Add(ConversionProfiles[i].Copy());
            }


            return(copy);
        }
Beispiel #3
0
        public void ReplaceWith(PdfCreatorSettings source)
        {
            ApplicationSettings.ReplaceWith(source.ApplicationSettings);

            ConversionProfiles.Clear();
            for (int i = 0; i < source.ConversionProfiles.Count; i++)
            {
                ConversionProfiles.Add(source.ConversionProfiles[i].Copy());
            }

            CreatorAppSettings.ReplaceWith(source.CreatorAppSettings);

            DefaultViewers.Clear();
            for (int i = 0; i < source.DefaultViewers.Count; i++)
            {
                DefaultViewers.Add(source.DefaultViewers[i].Copy());
            }
        }
Beispiel #4
0
        public PdfCreatorSettings Copy()
        {
            PdfCreatorSettings copy = new PdfCreatorSettings();

            copy.ApplicationSettings = ApplicationSettings.Copy();

            copy.ConversionProfiles = new ObservableCollection <ConversionProfile>();
            for (int i = 0; i < ConversionProfiles.Count; i++)
            {
                copy.ConversionProfiles.Add(ConversionProfiles[i].Copy());
            }

            copy.CreatorAppSettings = CreatorAppSettings.Copy();

            copy.DefaultViewers = new ObservableCollection <DefaultViewer>();
            for (int i = 0; i < DefaultViewers.Count; i++)
            {
                copy.DefaultViewers.Add(DefaultViewers[i].Copy());
            }

            return(copy);
        }