示例#1
0
        public ConversionProfile Copy()
        {
            ConversionProfile copy = new ConversionProfile();

            copy.AttachmentPage       = AttachmentPage.Copy();
            copy.AutoSave             = AutoSave.Copy();
            copy.BackgroundPage       = BackgroundPage.Copy();
            copy.CoverPage            = CoverPage.Copy();
            copy.EmailClient          = EmailClient.Copy();
            copy.EmailSmtp            = EmailSmtp.Copy();
            copy.Ftp                  = Ftp.Copy();
            copy.Ghostscript          = Ghostscript.Copy();
            copy.JpegSettings         = JpegSettings.Copy();
            copy.PdfSettings          = PdfSettings.Copy();
            copy.PngSettings          = PngSettings.Copy();
            copy.Printing             = Printing.Copy();
            copy.Properties           = Properties.Copy();
            copy.SaveDialog           = SaveDialog.Copy();
            copy.Scripting            = Scripting.Copy();
            copy.Stamping             = Stamping.Copy();
            copy.TiffSettings         = TiffSettings.Copy();
            copy.AuthorTemplate       = AuthorTemplate;
            copy.FileNameTemplate     = FileNameTemplate;
            copy.Guid                 = Guid;
            copy.Name                 = Name;
            copy.OpenViewer           = OpenViewer;
            copy.OpenWithPdfArchitect = OpenWithPdfArchitect;
            copy.OutputFormat         = OutputFormat;
            copy.ShowProgress         = ShowProgress;
            copy.SkipPrintDialog      = SkipPrintDialog;
            copy.TitleTemplate        = TitleTemplate;

            return(copy);
        }
示例#2
0
文件: Ftp.cs 项目: zsy960/PDFCreator
        public override bool Equals(object o)
        {
            if (!(o is Ftp))
            {
                return(false);
            }
            Ftp v = o as Ftp;

            if (!Directory.Equals(v.Directory))
            {
                return(false);
            }
            if (!Enabled.Equals(v.Enabled))
            {
                return(false);
            }
            if (!EnsureUniqueFilenames.Equals(v.EnsureUniqueFilenames))
            {
                return(false);
            }
            if (!Password.Equals(v.Password))
            {
                return(false);
            }
            if (!Server.Equals(v.Server))
            {
                return(false);
            }
            if (!UserName.Equals(v.UserName))
            {
                return(false);
            }

            return(true);
        }
示例#3
0
 public void StoreValues(Data data, string path)
 {
     AttachmentPage.StoreValues(data, path + @"AttachmentPage\");
     AutoSave.StoreValues(data, path + @"AutoSave\");
     BackgroundPage.StoreValues(data, path + @"BackgroundPage\");
     CoverPage.StoreValues(data, path + @"CoverPage\");
     EmailClient.StoreValues(data, path + @"EmailClient\");
     EmailSmtp.StoreValues(data, path + @"EmailSmtp\");
     Ftp.StoreValues(data, path + @"Ftp\");
     Ghostscript.StoreValues(data, path + @"Ghostscript\");
     JpegSettings.StoreValues(data, path + @"JpegSettings\");
     PdfSettings.StoreValues(data, path + @"PdfSettings\");
     PngSettings.StoreValues(data, path + @"PngSettings\");
     Printing.StoreValues(data, path + @"Printing\");
     Properties.StoreValues(data, path + @"Properties\");
     SaveDialog.StoreValues(data, path + @"SaveDialog\");
     Scripting.StoreValues(data, path + @"Scripting\");
     Stamping.StoreValues(data, path + @"Stamping\");
     TiffSettings.StoreValues(data, path + @"TiffSettings\");
     data.SetValue(@"" + path + @"AuthorTemplate", Data.EscapeString(AuthorTemplate));
     data.SetValue(@"" + path + @"FileNameTemplate", Data.EscapeString(FileNameTemplate));
     data.SetValue(@"" + path + @"Guid", Data.EscapeString(Guid));
     data.SetValue(@"" + path + @"Name", Data.EscapeString(Name));
     data.SetValue(@"" + path + @"OpenViewer", OpenViewer.ToString());
     data.SetValue(@"" + path + @"OpenWithPdfArchitect", OpenWithPdfArchitect.ToString());
     data.SetValue(@"" + path + @"OutputFormat", OutputFormat.ToString());
     data.SetValue(@"" + path + @"ShowProgress", ShowProgress.ToString());
     data.SetValue(@"" + path + @"SkipPrintDialog", SkipPrintDialog.ToString());
     data.SetValue(@"" + path + @"TitleTemplate", Data.EscapeString(TitleTemplate));
 }
示例#4
0
 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 { OpenWithPdfArchitect = bool.Parse(data.GetValue(@"" + path + @"OpenWithPdfArchitect")); } catch { OpenWithPdfArchitect = 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>"; }
 }
示例#5
0
 private void Init()
 {
     AttachmentPage       = new AttachmentPage();
     AutoSave             = new AutoSave();
     BackgroundPage       = new BackgroundPage();
     CoverPage            = new CoverPage();
     EmailClient          = new EmailClient();
     EmailSmtp            = new EmailSmtp();
     Ftp                  = new Ftp();
     Ghostscript          = new Ghostscript();
     JpegSettings         = new JpegSettings();
     PdfSettings          = new PdfSettings();
     PngSettings          = new PngSettings();
     Printing             = new Printing();
     Properties           = new Properties();
     SaveDialog           = new SaveDialog();
     Scripting            = new Scripting();
     Stamping             = new Stamping();
     TiffSettings         = new TiffSettings();
     AuthorTemplate       = "<PrintJobAuthor>";
     FileNameTemplate     = "<Title>";
     Guid                 = "";
     Name                 = "NewProfile";
     OpenViewer           = true;
     OpenWithPdfArchitect = true;
     OutputFormat         = OutputFormat.Pdf;
     ShowProgress         = true;
     SkipPrintDialog      = false;
     TitleTemplate        = "<PrintJobName>";
 }
示例#6
0
文件: Ftp.cs 项目: zsy960/PDFCreator
        public Ftp Copy()
        {
            Ftp copy = new Ftp();

            copy.Directory             = Directory;
            copy.Enabled               = Enabled;
            copy.EnsureUniqueFilenames = EnsureUniqueFilenames;
            copy.Password              = Password;
            copy.Server   = Server;
            copy.UserName = UserName;

            return(copy);
        }
示例#7
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("[AttachmentPage]");
            sb.AppendLine(AttachmentPage.ToString());
            sb.AppendLine("[AutoSave]");
            sb.AppendLine(AutoSave.ToString());
            sb.AppendLine("[BackgroundPage]");
            sb.AppendLine(BackgroundPage.ToString());
            sb.AppendLine("[CoverPage]");
            sb.AppendLine(CoverPage.ToString());
            sb.AppendLine("[EmailClient]");
            sb.AppendLine(EmailClient.ToString());
            sb.AppendLine("[EmailSmtp]");
            sb.AppendLine(EmailSmtp.ToString());
            sb.AppendLine("[Ftp]");
            sb.AppendLine(Ftp.ToString());
            sb.AppendLine("[Ghostscript]");
            sb.AppendLine(Ghostscript.ToString());
            sb.AppendLine("[JpegSettings]");
            sb.AppendLine(JpegSettings.ToString());
            sb.AppendLine("[PdfSettings]");
            sb.AppendLine(PdfSettings.ToString());
            sb.AppendLine("[PngSettings]");
            sb.AppendLine(PngSettings.ToString());
            sb.AppendLine("[Printing]");
            sb.AppendLine(Printing.ToString());
            sb.AppendLine("[Properties]");
            sb.AppendLine(Properties.ToString());
            sb.AppendLine("[SaveDialog]");
            sb.AppendLine(SaveDialog.ToString());
            sb.AppendLine("[Scripting]");
            sb.AppendLine(Scripting.ToString());
            sb.AppendLine("[Stamping]");
            sb.AppendLine(Stamping.ToString());
            sb.AppendLine("[TiffSettings]");
            sb.AppendLine(TiffSettings.ToString());
            sb.AppendLine("AuthorTemplate=" + AuthorTemplate.ToString());
            sb.AppendLine("FileNameTemplate=" + FileNameTemplate.ToString());
            sb.AppendLine("Guid=" + Guid.ToString());
            sb.AppendLine("Name=" + Name.ToString());
            sb.AppendLine("OpenViewer=" + OpenViewer.ToString());
            sb.AppendLine("OpenWithPdfArchitect=" + OpenWithPdfArchitect.ToString());
            sb.AppendLine("OutputFormat=" + OutputFormat.ToString());
            sb.AppendLine("ShowProgress=" + ShowProgress.ToString());
            sb.AppendLine("SkipPrintDialog=" + SkipPrintDialog.ToString());
            sb.AppendLine("TitleTemplate=" + TitleTemplate.ToString());

            return(sb.ToString());
        }
示例#8
0
        public override bool Equals(object o)
        {
            if (!(o is ConversionProfile))
            {
                return(false);
            }
            ConversionProfile 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 (!OpenWithPdfArchitect.Equals(v.OpenWithPdfArchitect))
            {
                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);
        }