コード例 #1
0
ファイル: PageSettings.cs プロジェクト: enjoycode/appbox.clr
 // used by PrinterSettings.DefaultPageSettings
 internal PageSettings(PrinterSettings printerSettings, bool color, bool landscape, PaperSize paperSize, PaperSource paperSource, PrinterResolution printerResolution)
 {
     PrinterSettings        = printerSettings;
     this.color             = color;
     this.landscape         = landscape;
     this.paperSize         = paperSize;
     this.paperSource       = paperSource;
     this.printerResolution = printerResolution;
 }
コード例 #2
0
ファイル: PageSettings.cs プロジェクト: enjoycode/appbox.clr
        public PageSettings(PrinterSettings printerSettings)
        {
            PrinterSettings = printerSettings;

            this.color             = printerSettings.DefaultPageSettings.color;
            this.landscape         = printerSettings.DefaultPageSettings.landscape;
            this.paperSize         = printerSettings.DefaultPageSettings.paperSize;
            this.paperSource       = printerSettings.DefaultPageSettings.paperSource;
            this.printerResolution = printerSettings.DefaultPageSettings.printerResolution;
        }
コード例 #3
0
ファイル: PageSettings.cs プロジェクト: enjoycode/appbox.clr
        public object Clone()
        {
            // We do a deep copy
            PrinterResolution pres    = new PrinterResolution(this.printerResolution.X, this.printerResolution.Y, this.printerResolution.Kind);
            PaperSource       psource = new PaperSource(this.paperSource.SourceName, this.paperSource.Kind);
            PaperSize         psize   = new PaperSize(this.paperSize.PaperName, this.paperSize.Width, this.paperSize.Height);

            psize.SetKind(this.paperSize.Kind);

            PageSettings ps = new PageSettings(this.printerSettings, this.color, this.landscape,
                                               psize, psource, pres);

            ps.Margins = (Margins)this.margins.Clone();
            return(ps);
        }
コード例 #4
0
 public int Add(PaperSource paperSource)
 {
     return(_PaperSources.Add(paperSource));
 }