| | |
| | | { |
| | | base.OnProcessUpdated(); |
| | | printDocument1.PrintPage += new PrintPageEventHandler(printDocument_Print); |
| | | |
| | | Process141.StartPrinter += StartPrint; |
| | | textBox1.Text = "Broconcentric"; |
| | | } |
| | | |
| | | |
| | | |
| | | PrintDocument printDocument1 = new PrintDocument(); |
| | | int ttwith = (int)(80 * 4); |
| | |
| | | |
| | | public void StartPrint(string str) |
| | | { |
| | | ttwith = 320; |
| | | ttheigh = 160; |
| | | message = str; |
| | | try |
| | | { |
| | | ttwith = 320; |
| | | ttheigh = 160; |
| | | message = str; |
| | | |
| | | this.printDocument1.DefaultPageSettings.PrinterSettings.PrinterName = "Honeywell PX240S (300 dpi)"; |
| | | this.printDocument1.DefaultPageSettings.PaperSize = new PaperSize("Custum", ttwith, ttheigh); |
| | | if (string.IsNullOrEmpty(message)) |
| | | { |
| | | message = textBox1.Text; |
| | | } |
| | | |
| | | this.printDocument1.PrintController = new System.Drawing.Printing.StandardPrintController(); |
| | | this.printDocument1.Print(); |
| | | this.printDocument1.DefaultPageSettings.PrinterSettings.PrinterName = "Honeywell PX240S (300 dpi)"; |
| | | this.printDocument1.DefaultPageSettings.PaperSize = new PaperSize("Custum", ttwith, ttheigh); |
| | | |
| | | this.printDocument1.PrintController = new System.Drawing.Printing.StandardPrintController(); |
| | | this.printDocument1.Print(); |
| | | |
| | | } |
| | | catch |
| | | { |
| | | |
| | | } |
| | | |
| | | int statuscode = GetPrinterStatusCodeInt(); |
| | | string status = GetPrinterStatusMessage(statuscode); |
| | | |
| | | |
| | | // Config141 |
| | | Process141.PlcwritePrinter(1520, 0); |
| | | |
| | | Process141.PlcwritePrinter(1510, 1); |
| | | |
| | | } |
| | | |