PRINTERSETTINGSLib.PrinterSetting ps = new PrinterSetting();
ps.PrinterName = "FaxServer Printer";
PageSetting Dlg = new PageSetting();
Dlg.PageHeight.Text = ps.PageHeight.ToString();
Dlg.PageWidth.Text = ps.PageWidth.ToString();
if(ORIENTATION.LANDSCAPE == ps.PageOrientation)
Dlg.Landscape.Checked = true;
else
Dlg.Portrait.Checked = true;
Dlg.Resolution.SelectedIndex = Convert.ToInt32(ps.PageResolution);
if (DialogResult.OK == Dlg.ShowDialog())
{
ps.PageHeight = Convert.ToInt32(Dlg.PageHeight.Text);
ps.PageWidth = Convert.ToInt32(Dlg.PageWidth.Text);
ps.PageResolution = (RESOLUTION)Dlg.Resolution.SelectedIndex;
ps.PageOrientation = Dlg.Landscape.Checked ? ORIENTATION.LANDSCAPE
: ORIENTATION.PORTRAIT;
}
|