|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Printing;
namespace GridPrintPreviewLib
{
/// <summary>
/// Form for the margins setting
/// </summary>
public partial class frmSettingMarginDialog : GridPrintPreviewLib.frmDialog
{
public frmSettingMarginDialog()
{
InitializeComponent();
}
/// <summary>
/// Set PageSettings in ThousandthsOfAnInch
/// </summary>
public PageSettings PageSettings
{
set
{
glPageSettings1.PageSize = TransformHelper.Convert(value.PaperSize, PrinterUnit.ThousandthsOfAnInch, PrinterUnit.Display);
glPageSettings1.Landscape = value.Landscape;
}
}
/// <summary>
/// Get/Set unit for shown value to user
/// </summary>
public PrinterUnit ShowUnit
{
get
{
return glPageSettings1.ShowUnit;
}
set
{
glPageSettings1.ShowUnit = value;
}
}
/// <summary>
/// Get/Set margin in ThousandthsOfAnInch
/// </summary>
public Margins Margins
{
get
{
return TransformHelper.Convert(glPageSettings1.PageMargins, PrinterUnit.Display, PrinterUnit.ThousandthsOfAnInch);
}
set
{
glPageSettings1.PageMargins = TransformHelper.Convert(value, PrinterUnit.ThousandthsOfAnInch, PrinterUnit.Display);
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I’m an IT Project Manager for an Italian Betting Company and over the last 2 years I acquired experience in Betting area.
I have developed code in different object oriented languages (C#, C++, Java) for more than 10 years using a set of technology such as .Net, J2EE, multithreading, etc…