本文整理汇总了C#中System.Drawing.Printing.PrintDocument.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# System.Drawing.Printing.PrintDocument.ToString方法的具体用法?C# System.Drawing.Printing.PrintDocument.ToString怎么用?C# System.Drawing.Printing.PrintDocument.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Drawing.Printing.PrintDocument
的用法示例。
在下文中一共展示了System.Drawing.Printing.PrintDocument.ToString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: loadBarcodePrinter
public bool loadBarcodePrinter()
{
bool functionReturnValue = false;
System.Drawing.Printing.PrintDocument Printer = new System.Drawing.Printing.PrintDocument();
Label lblPrinter = null;
System.Drawing.Printing.PrintDocument lPrinter = new System.Drawing.Printing.PrintDocument();
ADODB.Recordset rs = default(ADODB.Recordset);
functionReturnValue = true;
gPrinterLabel = modApplication.MyNewPrLabel;
//Jonas
lblPrinter.Text = modApplication.MyNewPrLabel;
if (Printer.PrinterSettings.InstalledPrinters.Count == 0) {
functionReturnValue = false;
} else {
// gPrinterLabel = frmPrinter.selectPrinter()
if (string.IsNullOrEmpty(gPrinterLabel)) {
functionReturnValue = false;
} else {
foreach (System.Drawing.Printing.PrintDocument lPrinter_loopVariable in Printer.PrinterSettings.InstalledPrinters) {
lPrinter = lPrinter_loopVariable;
if (Strings.InStr(Strings.LCase(lPrinter.ToString()), Strings.LCase(gPrinterLabel))) {
Printer = lPrinter;
break; // TODO: might not be correct. Was : Exit For
}
}
//Printer.PrinterSettings.DefaultPageSettings. = ScaleModeConstants.vbTwips 'twips
//twipsToMM = Printer.ScaleWidth
//Printer.ScaleMode = ScaleModeConstants.vbMillimeters 'mm
//twipsToMM = twipsToMM / Printer.ScaleWidth
//Printer.ScaleMode = ScaleModeConstants.vbTwips 'twips
rs = modRecordSet.getRS(ref "SELECT Printer.* From Printer WHERE (((Printer.PrinterID)='" + Strings.Replace(gPrinterLabel, "'", "''") + "'));");
//If rs.RecordCount Then
//gOffsetLabel = rs("Printer_Offset")
//gLBLheight = (rs("Printer_BCheight")) * twipsToMM
//gLBLwidth = (rs("Printer_BCwidth")) * twipsToMM
//Else
gLBLheight = (30 - 2) * twipsToMM;
gLBLwidth = (40 - 2) * twipsToMM;
//End If
}
}
return functionReturnValue;
}