You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.7 KiB
52 lines
1.7 KiB
using BiskLog_Point_Of_Sale.Multiple_Login;
|
|
using BiskLog_Point_Of_Sale.Properties;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Drawing.Printing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
|
|
namespace Point_Of_Sale_Managment.CashierModule
|
|
{
|
|
public partial class ReceiptPrinter : Form
|
|
{
|
|
HardwareSetupWizard hardwareSetupWizard;
|
|
public ReceiptPrinter(HardwareSetupWizard setupWizard)
|
|
{
|
|
InitializeComponent();
|
|
hardwareSetupWizard = setupWizard;
|
|
PopulateInstalledPrintersCombo();
|
|
}
|
|
private void PopulateInstalledPrintersCombo()
|
|
{
|
|
String pkInstalledPrinters;
|
|
for (int i = 0; i < PrinterSettings.InstalledPrinters.Count; i++)
|
|
{
|
|
pkInstalledPrinters = PrinterSettings.InstalledPrinters[i];
|
|
printers.Items.Add(pkInstalledPrinters);
|
|
}
|
|
}
|
|
|
|
private void Button3_Click(object sender, EventArgs e)
|
|
{
|
|
string text = printers.GetItemText(printers.SelectedItem);
|
|
string title = "Setting Default printer";
|
|
string message = "Are you sure you would like to set " + text + " as your " +
|
|
"default receipt printer ?";
|
|
Confirmation confirmation = new Confirmation(title,message);
|
|
confirmation.BringToFront();
|
|
confirmation.ShowDialog();
|
|
if (confirmation.DialogResult == DialogResult.Yes)
|
|
{
|
|
Settings.Default.ReceiptPrinter = text;
|
|
Settings.Default.Save();
|
|
hardwareSetupWizard.SetThem();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|