Beispiel #1
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\");
     DropboxSettings.ReadValues(data, path + @"DropboxSettings\");
     EmailClientSettings.ReadValues(data, path + @"EmailClientSettings\");
     EmailSmtpSettings.ReadValues(data, path + @"EmailSmtpSettings\");
     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\");
     TextSettings.ReadValues(data, path + @"TextSettings\");
     TiffSettings.ReadValues(data, path + @"TiffSettings\");
     UserTokens.ReadValues(data, path + @"UserTokens\");
     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 { KeywordTemplate = Data.UnescapeString(data.GetValue(@"" + path + @"KeywordTemplate")); } catch { KeywordTemplate = ""; }
     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 { SubjectTemplate = Data.UnescapeString(data.GetValue(@"" + path + @"SubjectTemplate")); } catch { SubjectTemplate = ""; }
     try { TitleTemplate = Data.UnescapeString(data.GetValue(@"" + path + @"TitleTemplate")); } catch { TitleTemplate = "<PrintJobName>"; }
 }
 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\");
     CustomScript.ReadValues(data, path + @"CustomScript\");
     DropboxSettings.ReadValues(data, path + @"DropboxSettings\");
     EmailClientSettings.ReadValues(data, path + @"EmailClientSettings\");
     EmailSmtpSettings.ReadValues(data, path + @"EmailSmtpSettings\");
     ForwardToFurtherProfile.ReadValues(data, path + @"ForwardToFurtherProfile\");
     Ftp.ReadValues(data, path + @"Ftp\");
     Ghostscript.ReadValues(data, path + @"Ghostscript\");
     HttpSettings.ReadValues(data, path + @"HttpSettings\");
     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\");
     Scripting.ReadValues(data, path + @"Scripting\");
     Stamping.ReadValues(data, path + @"Stamping\");
     TextSettings.ReadValues(data, path + @"TextSettings\");
     TiffSettings.ReadValues(data, path + @"TiffSettings\");
     UserTokens.ReadValues(data, path + @"UserTokens\");
     Watermark.ReadValues(data, path + @"Watermark\");
     try{
         int numClasses = int.Parse(data.GetValue(@"" + path + @"ActionOrder\numClasses"));
         for (int i = 0; i < numClasses; i++)
         {
             try{
                 var value = Data.UnescapeString(data.GetValue(path + @"ActionOrder\" + i + @"\ActionOrder"));
                 ActionOrder.Add(value);
             }catch {}
         }
     }catch {}
     try { AuthorTemplate = Data.UnescapeString(data.GetValue(@"" + path + @"AuthorTemplate")); } catch { AuthorTemplate = "<PrintJobAuthor>"; }
     EnableWorkflowEditor = bool.TryParse(data.GetValue(@"" + path + @"EnableWorkflowEditor"), out var tmpEnableWorkflowEditor) ? tmpEnableWorkflowEditor : true;
     try { FileNameTemplate = Data.UnescapeString(data.GetValue(@"" + path + @"FileNameTemplate")); } catch { FileNameTemplate = "<Title>"; }
     try { Guid = Data.UnescapeString(data.GetValue(@"" + path + @"Guid")); } catch { Guid = ""; }
     try { KeywordTemplate = Data.UnescapeString(data.GetValue(@"" + path + @"KeywordTemplate")); } catch { KeywordTemplate = ""; }
     try { Name = Data.UnescapeString(data.GetValue(@"" + path + @"Name")); } catch { Name = "NewProfile"; }
     OpenViewer                 = bool.TryParse(data.GetValue(@"" + path + @"OpenViewer"), out var tmpOpenViewer) ? tmpOpenViewer : true;
     OpenWithPdfArchitect       = bool.TryParse(data.GetValue(@"" + path + @"OpenWithPdfArchitect"), out var tmpOpenWithPdfArchitect) ? tmpOpenWithPdfArchitect : true;
     OutputFormat               = Enum.TryParse <OutputFormat>(data.GetValue(@"" + path + @"OutputFormat"), out var tmpOutputFormat) ? tmpOutputFormat : OutputFormat.Pdf;
     SaveFileTemporary          = bool.TryParse(data.GetValue(@"" + path + @"SaveFileTemporary"), out var tmpSaveFileTemporary) ? tmpSaveFileTemporary : false;
     ShowAllNotifications       = bool.TryParse(data.GetValue(@"" + path + @"ShowAllNotifications"), out var tmpShowAllNotifications) ? tmpShowAllNotifications : true;
     ShowOnlyErrorNotifications = bool.TryParse(data.GetValue(@"" + path + @"ShowOnlyErrorNotifications"), out var tmpShowOnlyErrorNotifications) ? tmpShowOnlyErrorNotifications : false;
     ShowProgress               = bool.TryParse(data.GetValue(@"" + path + @"ShowProgress"), out var tmpShowProgress) ? tmpShowProgress : true;
     ShowQuickActions           = bool.TryParse(data.GetValue(@"" + path + @"ShowQuickActions"), out var tmpShowQuickActions) ? tmpShowQuickActions : true;
     SkipPrintDialog            = bool.TryParse(data.GetValue(@"" + path + @"SkipPrintDialog"), out var tmpSkipPrintDialog) ? tmpSkipPrintDialog : false;
     try { SubjectTemplate = Data.UnescapeString(data.GetValue(@"" + path + @"SubjectTemplate")); } catch { SubjectTemplate = ""; }
     try { TargetDirectory = Data.UnescapeString(data.GetValue(@"" + path + @"TargetDirectory")); } catch { TargetDirectory = ""; }
     try { TitleTemplate = Data.UnescapeString(data.GetValue(@"" + path + @"TitleTemplate")); } catch { TitleTemplate = "<PrintJobName>"; }
 }