public ForwardToFurtherProfile Copy()
        {
            ForwardToFurtherProfile copy = new ForwardToFurtherProfile();

            copy.Enabled     = Enabled;
            copy.ProfileGuid = ProfileGuid;
            return(copy);
        }
Esempio n. 2
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\");
     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>"; }
 }
        public void ReplaceWith(ForwardToFurtherProfile source)
        {
            if (Enabled != source.Enabled)
            {
                Enabled = source.Enabled;
            }

            if (ProfileGuid != source.ProfileGuid)
            {
                ProfileGuid = source.ProfileGuid;
            }
        }
Esempio n. 4
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\");
     CustomScript.StoreValues(data, path + @"CustomScript\");
     DropboxSettings.StoreValues(data, path + @"DropboxSettings\");
     EmailClientSettings.StoreValues(data, path + @"EmailClientSettings\");
     EmailSmtpSettings.StoreValues(data, path + @"EmailSmtpSettings\");
     ForwardToFurtherProfile.StoreValues(data, path + @"ForwardToFurtherProfile\");
     Ftp.StoreValues(data, path + @"Ftp\");
     Ghostscript.StoreValues(data, path + @"Ghostscript\");
     HttpSettings.StoreValues(data, path + @"HttpSettings\");
     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\");
     Scripting.StoreValues(data, path + @"Scripting\");
     Stamping.StoreValues(data, path + @"Stamping\");
     TextSettings.StoreValues(data, path + @"TextSettings\");
     TiffSettings.StoreValues(data, path + @"TiffSettings\");
     UserTokens.StoreValues(data, path + @"UserTokens\");
     Watermark.StoreValues(data, path + @"Watermark\");
     for (int i = 0; i < ActionOrder.Count; i++)
     {
         data.SetValue(path + @"ActionOrder\" + i + @"\ActionOrder", Data.EscapeString(ActionOrder[i]));
     }
     data.SetValue(path + @"ActionOrder\numClasses", ActionOrder.Count.ToString());
     data.SetValue(@"" + path + @"AuthorTemplate", Data.EscapeString(AuthorTemplate));
     data.SetValue(@"" + path + @"EnableWorkflowEditor", EnableWorkflowEditor.ToString());
     data.SetValue(@"" + path + @"FileNameTemplate", Data.EscapeString(FileNameTemplate));
     data.SetValue(@"" + path + @"Guid", Data.EscapeString(Guid));
     data.SetValue(@"" + path + @"KeywordTemplate", Data.EscapeString(KeywordTemplate));
     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 + @"SaveFileTemporary", SaveFileTemporary.ToString());
     data.SetValue(@"" + path + @"ShowAllNotifications", ShowAllNotifications.ToString());
     data.SetValue(@"" + path + @"ShowOnlyErrorNotifications", ShowOnlyErrorNotifications.ToString());
     data.SetValue(@"" + path + @"ShowProgress", ShowProgress.ToString());
     data.SetValue(@"" + path + @"ShowQuickActions", ShowQuickActions.ToString());
     data.SetValue(@"" + path + @"SkipPrintDialog", SkipPrintDialog.ToString());
     data.SetValue(@"" + path + @"SubjectTemplate", Data.EscapeString(SubjectTemplate));
     data.SetValue(@"" + path + @"TargetDirectory", Data.EscapeString(TargetDirectory));
     data.SetValue(@"" + path + @"TitleTemplate", Data.EscapeString(TitleTemplate));
 }
Esempio n. 5
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.CustomScript            = CustomScript.Copy();
            copy.DropboxSettings         = DropboxSettings.Copy();
            copy.EmailClientSettings     = EmailClientSettings.Copy();
            copy.EmailSmtpSettings       = EmailSmtpSettings.Copy();
            copy.ForwardToFurtherProfile = ForwardToFurtherProfile.Copy();
            copy.Ftp                        = Ftp.Copy();
            copy.Ghostscript                = Ghostscript.Copy();
            copy.HttpSettings               = HttpSettings.Copy();
            copy.JpegSettings               = JpegSettings.Copy();
            copy.PdfSettings                = PdfSettings.Copy();
            copy.PngSettings                = PngSettings.Copy();
            copy.Printing                   = Printing.Copy();
            copy.Properties                 = Properties.Copy();
            copy.Scripting                  = Scripting.Copy();
            copy.Stamping                   = Stamping.Copy();
            copy.TextSettings               = TextSettings.Copy();
            copy.TiffSettings               = TiffSettings.Copy();
            copy.UserTokens                 = UserTokens.Copy();
            copy.Watermark                  = Watermark.Copy();
            copy.ActionOrder                = new List <string>(ActionOrder);
            copy.AuthorTemplate             = AuthorTemplate;
            copy.EnableWorkflowEditor       = EnableWorkflowEditor;
            copy.FileNameTemplate           = FileNameTemplate;
            copy.Guid                       = Guid;
            copy.KeywordTemplate            = KeywordTemplate;
            copy.Name                       = Name;
            copy.OpenViewer                 = OpenViewer;
            copy.OpenWithPdfArchitect       = OpenWithPdfArchitect;
            copy.OutputFormat               = OutputFormat;
            copy.SaveFileTemporary          = SaveFileTemporary;
            copy.ShowAllNotifications       = ShowAllNotifications;
            copy.ShowOnlyErrorNotifications = ShowOnlyErrorNotifications;
            copy.ShowProgress               = ShowProgress;
            copy.ShowQuickActions           = ShowQuickActions;
            copy.SkipPrintDialog            = SkipPrintDialog;
            copy.SubjectTemplate            = SubjectTemplate;
            copy.TargetDirectory            = TargetDirectory;
            copy.TitleTemplate              = TitleTemplate;
            return(copy);
        }
        public override bool Equals(object o)
        {
            if (!(o is ForwardToFurtherProfile))
            {
                return(false);
            }
            ForwardToFurtherProfile v = o as ForwardToFurtherProfile;

            if (!Enabled.Equals(v.Enabled))
            {
                return(false);
            }
            if (!ProfileGuid.Equals(v.ProfileGuid))
            {
                return(false);
            }
            return(true);
        }
Esempio n. 7
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 (!CustomScript.Equals(v.CustomScript))
            {
                return(false);
            }
            if (!DropboxSettings.Equals(v.DropboxSettings))
            {
                return(false);
            }
            if (!EmailClientSettings.Equals(v.EmailClientSettings))
            {
                return(false);
            }
            if (!EmailSmtpSettings.Equals(v.EmailSmtpSettings))
            {
                return(false);
            }
            if (!ForwardToFurtherProfile.Equals(v.ForwardToFurtherProfile))
            {
                return(false);
            }
            if (!Ftp.Equals(v.Ftp))
            {
                return(false);
            }
            if (!Ghostscript.Equals(v.Ghostscript))
            {
                return(false);
            }
            if (!HttpSettings.Equals(v.HttpSettings))
            {
                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 (!Scripting.Equals(v.Scripting))
            {
                return(false);
            }
            if (!Stamping.Equals(v.Stamping))
            {
                return(false);
            }
            if (!TextSettings.Equals(v.TextSettings))
            {
                return(false);
            }
            if (!TiffSettings.Equals(v.TiffSettings))
            {
                return(false);
            }
            if (!UserTokens.Equals(v.UserTokens))
            {
                return(false);
            }
            if (!Watermark.Equals(v.Watermark))
            {
                return(false);
            }
            if (!ActionOrder.SequenceEqual(v.ActionOrder))
            {
                return(false);
            }
            if (!AuthorTemplate.Equals(v.AuthorTemplate))
            {
                return(false);
            }
            if (!EnableWorkflowEditor.Equals(v.EnableWorkflowEditor))
            {
                return(false);
            }
            if (!FileNameTemplate.Equals(v.FileNameTemplate))
            {
                return(false);
            }
            if (!Guid.Equals(v.Guid))
            {
                return(false);
            }
            if (!KeywordTemplate.Equals(v.KeywordTemplate))
            {
                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 (!SaveFileTemporary.Equals(v.SaveFileTemporary))
            {
                return(false);
            }
            if (!ShowAllNotifications.Equals(v.ShowAllNotifications))
            {
                return(false);
            }
            if (!ShowOnlyErrorNotifications.Equals(v.ShowOnlyErrorNotifications))
            {
                return(false);
            }
            if (!ShowProgress.Equals(v.ShowProgress))
            {
                return(false);
            }
            if (!ShowQuickActions.Equals(v.ShowQuickActions))
            {
                return(false);
            }
            if (!SkipPrintDialog.Equals(v.SkipPrintDialog))
            {
                return(false);
            }
            if (!SubjectTemplate.Equals(v.SubjectTemplate))
            {
                return(false);
            }
            if (!TargetDirectory.Equals(v.TargetDirectory))
            {
                return(false);
            }
            if (!TitleTemplate.Equals(v.TitleTemplate))
            {
                return(false);
            }
            return(true);
        }
Esempio n. 8
0
        public void ReplaceWith(ConversionProfile source)
        {
            AttachmentPage.ReplaceWith(source.AttachmentPage);
            AutoSave.ReplaceWith(source.AutoSave);
            BackgroundPage.ReplaceWith(source.BackgroundPage);
            CoverPage.ReplaceWith(source.CoverPage);
            CustomScript.ReplaceWith(source.CustomScript);
            DropboxSettings.ReplaceWith(source.DropboxSettings);
            EmailClientSettings.ReplaceWith(source.EmailClientSettings);
            EmailSmtpSettings.ReplaceWith(source.EmailSmtpSettings);
            ForwardToFurtherProfile.ReplaceWith(source.ForwardToFurtherProfile);
            Ftp.ReplaceWith(source.Ftp);
            Ghostscript.ReplaceWith(source.Ghostscript);
            HttpSettings.ReplaceWith(source.HttpSettings);
            JpegSettings.ReplaceWith(source.JpegSettings);
            PdfSettings.ReplaceWith(source.PdfSettings);
            PngSettings.ReplaceWith(source.PngSettings);
            Printing.ReplaceWith(source.Printing);
            Properties.ReplaceWith(source.Properties);
            Scripting.ReplaceWith(source.Scripting);
            Stamping.ReplaceWith(source.Stamping);
            TextSettings.ReplaceWith(source.TextSettings);
            TiffSettings.ReplaceWith(source.TiffSettings);
            UserTokens.ReplaceWith(source.UserTokens);
            Watermark.ReplaceWith(source.Watermark);
            ActionOrder.Clear();
            for (int i = 0; i < source.ActionOrder.Count; i++)
            {
                ActionOrder.Add(source.ActionOrder[i]);
            }

            if (AuthorTemplate != source.AuthorTemplate)
            {
                AuthorTemplate = source.AuthorTemplate;
            }

            if (EnableWorkflowEditor != source.EnableWorkflowEditor)
            {
                EnableWorkflowEditor = source.EnableWorkflowEditor;
            }

            if (FileNameTemplate != source.FileNameTemplate)
            {
                FileNameTemplate = source.FileNameTemplate;
            }

            if (Guid != source.Guid)
            {
                Guid = source.Guid;
            }

            if (KeywordTemplate != source.KeywordTemplate)
            {
                KeywordTemplate = source.KeywordTemplate;
            }

            if (Name != source.Name)
            {
                Name = source.Name;
            }

            if (OpenViewer != source.OpenViewer)
            {
                OpenViewer = source.OpenViewer;
            }

            if (OpenWithPdfArchitect != source.OpenWithPdfArchitect)
            {
                OpenWithPdfArchitect = source.OpenWithPdfArchitect;
            }

            if (OutputFormat != source.OutputFormat)
            {
                OutputFormat = source.OutputFormat;
            }

            if (SaveFileTemporary != source.SaveFileTemporary)
            {
                SaveFileTemporary = source.SaveFileTemporary;
            }

            if (ShowAllNotifications != source.ShowAllNotifications)
            {
                ShowAllNotifications = source.ShowAllNotifications;
            }

            if (ShowOnlyErrorNotifications != source.ShowOnlyErrorNotifications)
            {
                ShowOnlyErrorNotifications = source.ShowOnlyErrorNotifications;
            }

            if (ShowProgress != source.ShowProgress)
            {
                ShowProgress = source.ShowProgress;
            }

            if (ShowQuickActions != source.ShowQuickActions)
            {
                ShowQuickActions = source.ShowQuickActions;
            }

            if (SkipPrintDialog != source.SkipPrintDialog)
            {
                SkipPrintDialog = source.SkipPrintDialog;
            }

            if (SubjectTemplate != source.SubjectTemplate)
            {
                SubjectTemplate = source.SubjectTemplate;
            }

            if (TargetDirectory != source.TargetDirectory)
            {
                TargetDirectory = source.TargetDirectory;
            }

            if (TitleTemplate != source.TitleTemplate)
            {
                TitleTemplate = source.TitleTemplate;
            }
        }