コード例 #1
0
ファイル: ConversionProfile.cs プロジェクト: u001tag/clawPDF
        public override bool Equals(object o)
        {
            if (!(o is ConversionProfile))
            {
                return(false);
            }
            var v = o as ConversionProfile;

            if (!AttachmentPage.Equals(v.AttachmentPage))
            {
                return(false);
            }
            if (!AutoSave.Equals(v.AutoSave))
            {
                return(false);
            }
            if (!BackgroundPage.Equals(v.BackgroundPage))
            {
                return(false);
            }
            if (!CoverPage.Equals(v.CoverPage))
            {
                return(false);
            }
            if (!EmailClient.Equals(v.EmailClient))
            {
                return(false);
            }
            if (!EmailSmtp.Equals(v.EmailSmtp))
            {
                return(false);
            }
            if (!Ftp.Equals(v.Ftp))
            {
                return(false);
            }
            if (!Ghostscript.Equals(v.Ghostscript))
            {
                return(false);
            }
            if (!JpegSettings.Equals(v.JpegSettings))
            {
                return(false);
            }
            if (!PdfSettings.Equals(v.PdfSettings))
            {
                return(false);
            }
            if (!PngSettings.Equals(v.PngSettings))
            {
                return(false);
            }
            if (!Printing.Equals(v.Printing))
            {
                return(false);
            }
            if (!Properties.Equals(v.Properties))
            {
                return(false);
            }
            if (!SaveDialog.Equals(v.SaveDialog))
            {
                return(false);
            }
            if (!Scripting.Equals(v.Scripting))
            {
                return(false);
            }
            if (!Stamping.Equals(v.Stamping))
            {
                return(false);
            }
            if (!TiffSettings.Equals(v.TiffSettings))
            {
                return(false);
            }
            if (!AuthorTemplate.Equals(v.AuthorTemplate))
            {
                return(false);
            }
            if (!FileNameTemplate.Equals(v.FileNameTemplate))
            {
                return(false);
            }
            if (!Guid.Equals(v.Guid))
            {
                return(false);
            }
            if (!Name.Equals(v.Name))
            {
                return(false);
            }
            if (!OpenViewer.Equals(v.OpenViewer))
            {
                return(false);
            }
            if (!OutputFormat.Equals(v.OutputFormat))
            {
                return(false);
            }
            if (!ShowProgress.Equals(v.ShowProgress))
            {
                return(false);
            }
            if (!SkipPrintDialog.Equals(v.SkipPrintDialog))
            {
                return(false);
            }
            if (!TitleTemplate.Equals(v.TitleTemplate))
            {
                return(false);
            }

            return(true);
        }
コード例 #2
0
ファイル: ConversionProfile.cs プロジェクト: u001tag/clawPDF
        public void ReadValues(Data data, string path)
        {
            AttachmentPage.ReadValues(data, path + @"AttachmentPage\");
            AutoSave.ReadValues(data, path + @"AutoSave\");
            BackgroundPage.ReadValues(data, path + @"BackgroundPage\");
            CoverPage.ReadValues(data, path + @"CoverPage\");
            EmailClient.ReadValues(data, path + @"EmailClient\");
            EmailSmtp.ReadValues(data, path + @"EmailSmtp\");
            Ftp.ReadValues(data, path + @"Ftp\");
            Ghostscript.ReadValues(data, path + @"Ghostscript\");
            JpegSettings.ReadValues(data, path + @"JpegSettings\");
            PdfSettings.ReadValues(data, path + @"PdfSettings\");
            PngSettings.ReadValues(data, path + @"PngSettings\");
            Printing.ReadValues(data, path + @"Printing\");
            Properties.ReadValues(data, path + @"Properties\");
            SaveDialog.ReadValues(data, path + @"SaveDialog\");
            Scripting.ReadValues(data, path + @"Scripting\");
            Stamping.ReadValues(data, path + @"Stamping\");
            TiffSettings.ReadValues(data, path + @"TiffSettings\");
            try
            {
                AuthorTemplate = Data.UnescapeString(data.GetValue(@"" + path + @"AuthorTemplate"));
            }
            catch
            {
                AuthorTemplate = "<PrintJobAuthor>";
            }

            try
            {
                FileNameTemplate = Data.UnescapeString(data.GetValue(@"" + path + @"FileNameTemplate"));
            }
            catch
            {
                FileNameTemplate = "<Title>";
            }

            try
            {
                Guid = Data.UnescapeString(data.GetValue(@"" + path + @"Guid"));
            }
            catch
            {
                Guid = "";
            }

            try
            {
                Name = Data.UnescapeString(data.GetValue(@"" + path + @"Name"));
            }
            catch
            {
                Name = "NewProfile";
            }

            try
            {
                OpenViewer = bool.Parse(data.GetValue(@"" + path + @"OpenViewer"));
            }
            catch
            {
                OpenViewer = true;
            }

            try
            {
                OutputFormat =
                    (OutputFormat)Enum.Parse(typeof(OutputFormat), data.GetValue(@"" + path + @"OutputFormat"));
            }
            catch
            {
                OutputFormat = OutputFormat.Pdf;
            }

            try
            {
                ShowProgress = bool.Parse(data.GetValue(@"" + path + @"ShowProgress"));
            }
            catch
            {
                ShowProgress = true;
            }

            try
            {
                SkipPrintDialog = bool.Parse(data.GetValue(@"" + path + @"SkipPrintDialog"));
            }
            catch
            {
                SkipPrintDialog = false;
            }

            try
            {
                TitleTemplate = Data.UnescapeString(data.GetValue(@"" + path + @"TitleTemplate"));
            }
            catch
            {
                TitleTemplate = "<PrintJobName>";
            }
        }