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.
253 lines
7.9 KiB
253 lines
7.9 KiB
3 months ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.ComponentModel;
|
||
|
using System.Data;
|
||
|
using System.Drawing;
|
||
|
using System.Linq;
|
||
|
using System.Text;
|
||
|
using System.Threading.Tasks;
|
||
|
using System.Windows.Forms;
|
||
|
|
||
|
namespace Point_Of_Sale_Managment.CashierModule
|
||
|
{
|
||
|
public partial class HardwareSetupWizard : Form
|
||
|
{
|
||
|
Form Active;
|
||
|
int page = 0;
|
||
|
Hardware hard;
|
||
|
public HardwareSetupWizard(Hardware hardware)
|
||
|
{
|
||
|
InitializeComponent();
|
||
|
hard = hardware;
|
||
|
}
|
||
|
public void MoveToWlecome()
|
||
|
{
|
||
|
button2.Enabled = false;
|
||
|
welcomeBTN.FlatStyle = FlatStyle.System;
|
||
|
baarcodescannerBTN.FlatStyle = FlatStyle.Flat;
|
||
|
labelBTN.FlatStyle = FlatStyle.Flat;
|
||
|
rfidBTN.FlatStyle = FlatStyle.Flat;
|
||
|
receiptBTN.FlatStyle = FlatStyle.Flat;
|
||
|
poleBTN.FlatStyle = FlatStyle.Flat;
|
||
|
pinnpadBTN.FlatStyle = FlatStyle.Flat;
|
||
|
reportBTN.FlatStyle = FlatStyle.Flat;
|
||
|
Welcome welcome = new Welcome(this);
|
||
|
welcome.TopLevel = false;
|
||
|
if (Active != null)
|
||
|
{
|
||
|
content.Controls.Remove(Active);
|
||
|
}
|
||
|
page = 1;
|
||
|
content.Controls.Add(welcome);
|
||
|
Active = welcome;
|
||
|
welcome.BringToFront();
|
||
|
welcome.Show();
|
||
|
}
|
||
|
public void MoveToScanner()
|
||
|
{
|
||
|
button2.Enabled = true;
|
||
|
welcomeBTN.FlatStyle = FlatStyle.Flat;
|
||
|
baarcodescannerBTN.FlatStyle = FlatStyle.System;
|
||
|
labelBTN.FlatStyle = FlatStyle.Flat;
|
||
|
rfidBTN.FlatStyle = FlatStyle.Flat;
|
||
|
receiptBTN.FlatStyle = FlatStyle.Flat;
|
||
|
poleBTN.FlatStyle = FlatStyle.Flat;
|
||
|
pinnpadBTN.FlatStyle = FlatStyle.Flat;
|
||
|
reportBTN.FlatStyle = FlatStyle.Flat;
|
||
|
BarcodeScannerSetup barcodeScannerSetup = new BarcodeScannerSetup(this);
|
||
|
barcodeScannerSetup.TopLevel = false;
|
||
|
if (Active != null)
|
||
|
{
|
||
|
content.Controls.Remove(Active);
|
||
|
}
|
||
|
page = 2;
|
||
|
content.Controls.Add(barcodeScannerSetup);
|
||
|
Active = barcodeScannerSetup;
|
||
|
barcodeScannerSetup.BringToFront();
|
||
|
barcodeScannerSetup.Show();
|
||
|
}
|
||
|
public void MoveToRFID()
|
||
|
{
|
||
|
button2.Enabled = true;
|
||
|
welcomeBTN.FlatStyle = FlatStyle.Flat;
|
||
|
baarcodescannerBTN.FlatStyle = FlatStyle.Flat;
|
||
|
labelBTN.FlatStyle = FlatStyle.Flat;
|
||
|
rfidBTN.FlatStyle = FlatStyle.System;
|
||
|
receiptBTN.FlatStyle = FlatStyle.Flat;
|
||
|
poleBTN.FlatStyle = FlatStyle.Flat;
|
||
|
pinnpadBTN.FlatStyle = FlatStyle.Flat;
|
||
|
reportBTN.FlatStyle = FlatStyle.Flat;
|
||
|
RFID rfid = new RFID(this);
|
||
|
rfid.TopLevel = false;
|
||
|
if (Active != null)
|
||
|
{
|
||
|
content.Controls.Remove(Active);
|
||
|
}
|
||
|
page = 3;
|
||
|
content.Controls.Add(rfid);
|
||
|
Active = rfid;
|
||
|
rfid.BringToFront();
|
||
|
rfid.Show();
|
||
|
}
|
||
|
public void MoveToReceipt()
|
||
|
{
|
||
|
button2.Enabled = true;
|
||
|
welcomeBTN.FlatStyle = FlatStyle.Flat;
|
||
|
baarcodescannerBTN.FlatStyle = FlatStyle.Flat;
|
||
|
labelBTN.FlatStyle = FlatStyle.Flat;
|
||
|
rfidBTN.FlatStyle = FlatStyle.Flat;
|
||
|
receiptBTN.FlatStyle = FlatStyle.System;
|
||
|
poleBTN.FlatStyle = FlatStyle.Flat;
|
||
|
pinnpadBTN.FlatStyle = FlatStyle.Flat;
|
||
|
reportBTN.FlatStyle = FlatStyle.Flat;
|
||
|
ReceiptPrinter receiptPrinter = new ReceiptPrinter(this);
|
||
|
receiptPrinter.TopLevel = false;
|
||
|
if (Active != null)
|
||
|
{
|
||
|
content.Controls.Remove(Active);
|
||
|
}
|
||
|
page = 4;
|
||
|
content.Controls.Add(receiptPrinter);
|
||
|
Active = receiptPrinter;
|
||
|
receiptPrinter.BringToFront();
|
||
|
receiptPrinter.Show();
|
||
|
}
|
||
|
public void MoveToReport()
|
||
|
{
|
||
|
button2.Enabled = true;
|
||
|
welcomeBTN.FlatStyle = FlatStyle.Flat;
|
||
|
baarcodescannerBTN.FlatStyle = FlatStyle.Flat;
|
||
|
labelBTN.FlatStyle = FlatStyle.Flat;
|
||
|
rfidBTN.FlatStyle = FlatStyle.Flat;
|
||
|
receiptBTN.FlatStyle = FlatStyle.Flat;
|
||
|
poleBTN.FlatStyle = FlatStyle.Flat;
|
||
|
pinnpadBTN.FlatStyle = FlatStyle.Flat;
|
||
|
reportBTN.FlatStyle = FlatStyle.System;
|
||
|
ReportPrinter reportPrinter = new ReportPrinter(this);
|
||
|
reportPrinter.TopLevel = false;
|
||
|
if (Active != null)
|
||
|
{
|
||
|
content.Controls.Remove(Active);
|
||
|
}
|
||
|
page = 5;
|
||
|
content.Controls.Add(reportPrinter);
|
||
|
Active = reportPrinter;
|
||
|
reportPrinter.BringToFront();
|
||
|
reportPrinter.Show();
|
||
|
}
|
||
|
public void MoveToTag()
|
||
|
{
|
||
|
button2.Enabled = true;
|
||
|
welcomeBTN.FlatStyle = FlatStyle.Flat;
|
||
|
baarcodescannerBTN.FlatStyle = FlatStyle.Flat;
|
||
|
labelBTN.FlatStyle = FlatStyle.System;
|
||
|
rfidBTN.FlatStyle = FlatStyle.Flat;
|
||
|
receiptBTN.FlatStyle = FlatStyle.Flat;
|
||
|
poleBTN.FlatStyle = FlatStyle.Flat;
|
||
|
pinnpadBTN.FlatStyle = FlatStyle.Flat;
|
||
|
reportBTN.FlatStyle = FlatStyle.Flat;
|
||
|
Barcode_LabelPrinter reportPrinter = new Barcode_LabelPrinter(this);
|
||
|
reportPrinter.TopLevel = false;
|
||
|
if (Active != null)
|
||
|
{
|
||
|
content.Controls.Remove(Active);
|
||
|
}
|
||
|
page = 6;
|
||
|
content.Controls.Add(reportPrinter);
|
||
|
Active = reportPrinter;
|
||
|
reportPrinter.BringToFront();
|
||
|
reportPrinter.Show();
|
||
|
}
|
||
|
|
||
|
private void HardwareSetupWizard_Load(object sender, EventArgs e)
|
||
|
{
|
||
|
MoveToWlecome();
|
||
|
}
|
||
|
|
||
|
private void WelcomeBTN_Click(object sender, EventArgs e)
|
||
|
{
|
||
|
MoveToWlecome();
|
||
|
}
|
||
|
|
||
|
private void BaarcodescannerBTN_Click(object sender, EventArgs e)
|
||
|
{
|
||
|
MoveToScanner();
|
||
|
}
|
||
|
public void SetThem()
|
||
|
{
|
||
|
hard.DefaultsPrinter();
|
||
|
}
|
||
|
private void Button3_Click(object sender, EventArgs e)
|
||
|
{
|
||
|
switch (page)
|
||
|
{
|
||
|
case 1:
|
||
|
MoveToScanner();
|
||
|
break;
|
||
|
case 2:
|
||
|
MoveToRFID();
|
||
|
break;
|
||
|
case 3:
|
||
|
MoveToReceipt();
|
||
|
break;
|
||
|
case 4:
|
||
|
MoveToReport();
|
||
|
break;
|
||
|
case 5:
|
||
|
MoveToTag();
|
||
|
break;
|
||
|
|
||
|
}
|
||
|
}
|
||
|
|
||
|
private void Button2_Click(object sender, EventArgs e)
|
||
|
{
|
||
|
switch (page)
|
||
|
{
|
||
|
case 1:
|
||
|
break;
|
||
|
case 2:
|
||
|
MoveToWlecome();
|
||
|
break;
|
||
|
case 3:
|
||
|
MoveToScanner();
|
||
|
break;
|
||
|
case 4:
|
||
|
MoveToRFID();
|
||
|
break;
|
||
|
case 5:
|
||
|
MoveToReceipt();
|
||
|
break;
|
||
|
case 6:
|
||
|
MoveToReport();
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
private void RfidBTN_Click(object sender, EventArgs e)
|
||
|
{
|
||
|
MoveToRFID();
|
||
|
}
|
||
|
|
||
|
private void ReceiptBTN_Click(object sender, EventArgs e)
|
||
|
{
|
||
|
MoveToReceipt();
|
||
|
}
|
||
|
|
||
|
private void ReportBTN_Click(object sender, EventArgs e)
|
||
|
{
|
||
|
MoveToReport();
|
||
|
}
|
||
|
|
||
|
private void LabelBTN_Click(object sender, EventArgs e)
|
||
|
{
|
||
|
MoveToTag();
|
||
|
}
|
||
|
|
||
|
private void Button4_Click(object sender, EventArgs e)
|
||
|
{
|
||
|
this.Close();
|
||
|
}
|
||
|
}
|
||
|
}
|