Beispiel #1
0
 /// <summary>
 /// Assigns values from another source.
 /// </summary>
 /// <param name="source">Source to assign from.</param>
 public void Assign(PrintSettings source)
 {
     Printer = source.Printer;
     SavePrinterWithReport = source.SavePrinterWithReport;
     PrintToFile           = source.PrintToFile;
     PrintToFileName       = source.PrintToFileName;
     PageRange             = source.PageRange;
     PageNumbers           = source.PageNumbers;
     Copies                   = source.Copies;
     Collate                  = source.Collate;
     PrintPages               = source.PrintPages;
     Reverse                  = source.Reverse;
     Duplex                   = source.Duplex;
     PaperSource              = source.PaperSource;
     PrintMode                = source.PrintMode;
     PrintOnSheetWidth        = source.PrintOnSheetWidth;
     PrintOnSheetHeight       = source.PrintOnSheetHeight;
     PrintOnSheetRawPaperSize = source.PrintOnSheetRawPaperSize;
     PagesOnSheet             = source.PagesOnSheet;
     source.CopyNames.CopyTo(CopyNames, 0);
     ShowDialog = source.ShowDialog;
 }
Beispiel #2
0
 internal void Serialize(FRWriter writer, PrintSettings c)
 {
     if (SavePrinterWithReport && Printer != c.Printer)
     {
         writer.WriteStr("PrintSettings.Printer", Printer);
     }
     if (SavePrinterWithReport != c.SavePrinterWithReport)
     {
         writer.WriteBool("PrintSettings.SavePrinterWithReport", SavePrinterWithReport);
     }
     if (PrintToFile != c.PrintToFile)
     {
         writer.WriteBool("PrintSettings.PrintToFile", PrintToFile);
     }
     if (PrintToFileName != c.PrintToFileName)
     {
         writer.WriteStr("PrintSettings.PrintToFileName", PrintToFileName);
     }
     if (PageRange != c.PageRange)
     {
         writer.WriteValue("PrintSettings.PageRange", PageRange);
     }
     if (PageNumbers != c.PageNumbers)
     {
         writer.WriteStr("PrintSettings.PageNumbers", PageNumbers);
     }
     if (Copies != c.Copies)
     {
         writer.WriteInt("PrintSettings.Copies", Copies);
     }
     if (Collate != c.Collate)
     {
         writer.WriteBool("PrintSettings.Collate", Collate);
     }
     if (PrintPages != c.PrintPages)
     {
         writer.WriteValue("PrintSettings.PrintPages", PrintPages);
     }
     if (Reverse != c.Reverse)
     {
         writer.WriteBool("PrintSettings.Reverse", Reverse);
     }
     if (Duplex != c.Duplex)
     {
         writer.WriteValue("PrintSettings.Duplex", Duplex);
     }
     if (PaperSource != c.PaperSource)
     {
         writer.WriteInt("PrintSettings.PaperSource", PaperSource);
     }
     if (PrintMode != c.PrintMode)
     {
         writer.WriteValue("PrintSettings.PrintMode", PrintMode);
     }
     if (PrintOnSheetWidth != c.PrintOnSheetWidth)
     {
         writer.WriteFloat("PrintSettings.PrintOnSheetWidth", PrintOnSheetWidth);
     }
     if (PrintOnSheetHeight != c.PrintOnSheetHeight)
     {
         writer.WriteFloat("PrintSettings.PrintOnSheetHeight", PrintOnSheetHeight);
     }
     if (PrintOnSheetRawPaperSize != c.PrintOnSheetRawPaperSize)
     {
         writer.WriteInt("PrintSettings.PrintOnSheetRawPaperSize", PrintOnSheetRawPaperSize);
     }
     if (PagesOnSheet != c.PagesOnSheet)
     {
         writer.WriteValue("PrintSettings.PagesOnSheet", PagesOnSheet);
     }
     if (!writer.AreEqual(CopyNames, c.CopyNames))
     {
         writer.WriteValue("PrintSettings.CopyNames", CopyNames);
     }
     if (ShowDialog != c.ShowDialog)
     {
         writer.WriteBool("PrintSettings.ShowDialog", ShowDialog);
     }
 }