private void PrintFiktifTicket(int fiktifTicketNo) { string printerName = Properties.Settings.Default.FiktifPrinter; printDialog1.PrinterSettings.PrinterName = printerName; if (string.IsNullOrEmpty(printerName)) { DialogResult dlgRslt = MessageBox.Show( "for the necessary printer settings not configured properly !" + "\nClick OK to perform printer settings, or Cancel to cancel printing." + "\nNote: The fixed ticket has been processed on the system. " + "Canceling the printout will not cancel the fictitious ticket.", "Virtual Terminal - Warning", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning ); if (dlgRslt == DialogResult.OK) { WPrinterSetup wprintSetupIT = new WPrinterSetup(); DialogResult dlgRsltForSettings = wprintSetupIT.ShowDialog(); if (dlgRsltForSettings == DialogResult.OK) { printDialog1.PrinterSettings.PrinterName = Properties.Settings.Default.FiktifPrinter; } } else { MessageBox.Show( "You canceled the printer settings. Fiktif The ticket will not be picked up.", "Virtual Terminal - Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning ); return; } } if (!printDialog1.PrinterSettings.IsValid) { Properties.Settings.Default.FiktifPrinter = string.Empty; Properties.Settings.Default.Save(); PrintFiktifTicket(fiktifTicketNo); } else { _fiktifPrintTicketNo = fiktifTicketNo.ToString(); printDocument1.Print(); } }
private void yaziciAyarlariToolStripMenuItem_Click(object sender, EventArgs e) { TmrOtoTicketCall.Stop(); //TmrWaitingCountRefresh.Stop(); WPrinterSetup wprintSetupIT = new WPrinterSetup(); wprintSetupIT.ShowDialog(); if (_kuyruk.terminal.GetTerminalState() == Terminaller.TerminalDurum.Bosta) { TmrOtoTicketCall.Start(); } MenuStripTop.Visible = false; }