Ejemplo n.º 1
0
 void tbBarcode_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.F5 || e.KeyCode == Keys.OemQuestion || e.KeyCode == Keys.Divide)
     {
         frmSearchForItemV2 fsfi = new frmSearchForItemV2(ref tEngine);
         fsfi.ShowDialog();
         if (fsfi.GetItemBarcode() != "NONE_SELECTED")
         {
             tbBarcode.Text = fsfi.GetItemBarcode();
             Barcode        = tbBarcode.Text;
             tEngine.AddOrderSuggestion(Barcode);
             this.Close();
         }
     }
     else if (e.KeyCode == Keys.Enter)
     {
         if (tEngine.GetItemRecordContents(Barcode).Length > 1)
         {
             tEngine.AddOrderSuggestion(Barcode);
         }
         this.Close();
     }
     else if (e.KeyCode == Keys.Escape)
     {
         this.Close();
     }
 }
Ejemplo n.º 2
0
 void tbItem_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         tEngine.AddEmail(tbTitle.Text, tbForeName.Text, tbSurname.Text, tbEMail.Text, tbAddress.Text, tbItem.Text);
         this.Close();
     }
     else if (e.KeyCode == Keys.Escape)
     {
         tbSurname.Focus();
         tbSurname.SelectionStart = tbSurname.Text.Length;
     }
     else if (e.KeyCode == Keys.F5)
     {
         frmSearchForItemV2 fsfi = new frmSearchForItemV2(ref tEngine);
         fsfi.ShowDialog();
         if (fsfi.GetItemBarcode() != "NONE_SELECTED")
         {
             tbItem.Text = fsfi.GetItemBarcode();
         }
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Occurs when one of the refund entry textboxes' keys are pressed
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void tbRefund_KeyDown(object sender, KeyEventArgs e)
        {
            TextBox tbCurrent   = (TextBox)sender;
            int     nCurrentBox = Convert.ToInt32(tbCurrent.Tag.ToString()[0].ToString());

            if (e.Shift && nCurrentBox == 0)
            {
                bShiftFunctionKeys = !bShiftFunctionKeys;
            }
            if (e.KeyCode == Keys.Enter)
            {
                if (nCurrentBox < 2)
                {
                    tbRefundDetails[nCurrentBox + 1].Focus();
                    switch (nCurrentBox + 1)
                    {
                    case 0:
                        lblInstruction.Text = "Enter the barcode of the item to refund. Press Look Up to find an item.";
                        break;

                    case 1:
                        lblInstruction.Text = "Enter the price that was paid for the item.";
                        break;

                    case 2:
                        lblInstruction.Text = "Enter the quantity of the item to refund";
                        break;
                    }
                }
                if (nCurrentBox == 0)
                {
                    string[] sItemDetails = tEngine.GetItemDetailsForLookup(tbRefundDetails[0].Text);
                    if (sItemDetails == null)
                    {
                        if (tbRefundDetails[0].Text.Length > 1)
                        {
                            fsfiFindBarcode              = new frmSearchForItemV2(ref tEngine);
                            fsfiFindBarcode.FormClosing += new FormClosingEventHandler(fsfiFindBarcode_FormClosing);
                            fsfiFindBarcode.Show();
                            fsfiFindBarcode.CheckForPartialBarcodeFromScanner(tbRefundDetails[0].Text);
                        }
                        else
                        {
                            lblInstruction.Text = "The barcode that was entered was invalid. Please try again.";
                            tbRefundDetails[0].Focus();
                        }
                    }
                    else
                    {
                        sBarcodeToRefund             = tbRefundDetails[0].Text.ToUpper();
                        tbRefundDetails[0].BackColor = cFrmBackColour;
                        tbRefundDetails[0].ForeColor = cFrmForeColour;
                        tbRefundDetails[0].Font      = new Font(sFontName, 11.0f);
                        tbRefundDetails[0].Text      = sItemDetails[0];
                        if ((float)Convert.ToDecimal(sItemDetails[1]) > 0.0f)
                        {
                            tbRefundDetails[1].Text = TillEngine.TillEngine.FormatMoneyForDisplay(TillEngine.TillEngine.fFormattedMoneyString(sItemDetails[1]));
                        }
                        tbRefundDetails[1].KeyDown += new KeyEventHandler(frmRefund_KeyDown);
                        tbRefundDetails[1].Tag      = "1";
                        tbRefundDetails[1].SelectAll();
                        lblWarning.Visible = true;
                    }
                }
                else if (nCurrentBox == 2)
                {
                    try
                    {
                        nQuantityToRefund = Convert.ToInt32(tbRefundDetails[2].Text);
                        if (nQuantityToRefund <= 0)
                        {
                            throw new NotSupportedException();
                        }
                        for (int i = 0; i < tbRefundDetails.Length; i++)
                        {
                            tbRefundDetails[i].BackColor = cFrmBackColour;
                            tbRefundDetails[i].ForeColor = cFrmForeColour;
                            tbRefundDetails[i].Font      = new Font(sFontName, 11.0f);
                            tbRefundDetails[i].Enabled   = false;
                        }
                        fAmountToRefund         = TillEngine.TillEngine.FixFloatError((float)Convert.ToDecimal(tbRefundDetails[1].Text));
                        fAmountToRefund        *= nQuantityToRefund;
                        fAmountToRefund         = TillEngine.TillEngine.FixFloatError(fAmountToRefund);
                        tbRefundDetails[3].Text = TillEngine.TillEngine.FormatMoneyForDisplay(fAmountToRefund);
                        fpiGetPaymentType       = new frmPaymentInput(new Point(this.Left, lblRefundDetails[3].Top + 200), new Size(this.Width, this.Height - 70 - (lblRefundDetails[0].Top + 250)), tEngine.GetCreditCards(), fAmountToRefund, false, false, true);
                        fpiGetPaymentType.Show();
                        fpiGetPaymentType.GetAmountFromUser = false;
                        fpiGetPaymentType.FormClosed       += new FormClosedEventHandler(fpiGetPaymentType_FormClosing);
                    }
                    catch
                    {
                        tbRefundDetails[2].Text = "";
                        lblInstruction.Text     = "The quantity entered was invalid. Please try again.";
                    }
                }
                else if (nCurrentBox == 1)
                {
                    try
                    {
                        fAmountToRefund = (float)Convert.ToDecimal(TillEngine.TillEngine.fFormattedMoneyString(tbRefundDetails[1].Text));
                        fAmountToRefund = tEngine.fFixFloatError(fAmountToRefund);
                        if (fAmountToRefund <= 0.0f || fAmountToRefund >= 100000.0f)
                        {
                            throw new NotSupportedException();
                        }
                        tbRefundDetails[1].Text      = TillEngine.TillEngine.FormatMoneyForDisplay(fAmountToRefund);
                        tbRefundDetails[1].BackColor = cFrmBackColour;
                        tbRefundDetails[1].ForeColor = cFrmForeColour;
                        tbRefundDetails[1].Font      = new Font(sFontName, 11.0f);
                        if (sBarcodeToRefund == "$GENERAL_REFUND")
                        {
                            tbRefundDetails[1].Enabled = false;
                            tbRefundDetails[3].Text    = tbRefundDetails[1].Text;
                            tbRefundDetails[3].Font    = new Font(sFontName, 11.0f);
                            fpiGetPaymentType          = new frmPaymentInput(new Point(this.Left, lblRefundDetails[3].Top + 200), new Size(this.Width, this.Height - 70 - (lblRefundDetails[0].Top + 250)), tEngine.GetCreditCards(), fAmountToRefund, false, false, true);
                            fpiGetPaymentType.Show();
                            fpiGetPaymentType.GetAmountFromUser = false;
                            fpiGetPaymentType.FormClosed       += new FormClosedEventHandler(fpiGetPaymentType_FormClosing);
                        }
                        else
                        {
                            tbRefundDetails[2].Text = "1";
                            tbRefundDetails[2].SelectAll();
                            lblWarning.Visible = false;
                        }
                    }
                    catch
                    {
                        // Invalid price entered
                        tbRefundDetails[1].Text = "";
                        tbRefundDetails[1].Focus();
                        lblInstruction.Text = "The price that was entered was invalid, please try again.";
                    }
                }
            }
            else if (e.KeyCode == Keys.Escape)
            {
                if (nCurrentBox > 0)
                {
                    tbRefundDetails[nCurrentBox].Text = "";
                    tbRefundDetails[nCurrentBox - 1].Focus();
                }
                else if (nCurrentBox == 0)
                {
                    this.Close();
                }
                if (nCurrentBox == 1)
                {
                    if (sBarcodeToRefund != "$GENERAL_REFUND")
                    {
                        tbRefundDetails[0].BackColor = cFrmForeColour;
                        tbRefundDetails[0].ForeColor = cFrmBackColour;
                        tbRefundDetails[0].Text      = "";
                        tbRefundDetails[0].Font      = new Font(sFontName, 16.0f);
                        tbRefundDetails[0].Enabled   = true;
                        tbRefundDetails[0].Focus();
                        tbRefundDetails[1].Tag = "0";
                    }
                    else
                    {
                        this.Close();
                    }
                }
                else if (nCurrentBox == 2)
                {
                    tbRefundDetails[1].BackColor = cFrmForeColour;
                    tbRefundDetails[1].ForeColor = cFrmBackColour;
                    tbRefundDetails[1].Text      = "";
                    tbRefundDetails[1].Font      = new Font(sFontName, 16.0f);
                    tbRefundDetails[1].Enabled   = true;
                    tbRefundDetails[1].Focus();
                }
            }
            else if (e.KeyCode == Keys.OemQuestion && nCurrentBox == 0)
            {
                fsfiFindBarcode = new frmSearchForItemV2(ref tEngine);
                fsfiFindBarcode.Show();
                fsfiFindBarcode.FormClosing += new FormClosingEventHandler(fsfiLookupBarcode_FormClosing);
            }
            else if (e.KeyCode == Keys.F1)
            {
                if (!bShiftFunctionKeys)
                {
                    tbCurrent.Text = tEngine.sBarcodeFromFunctionKey("F1");
                }
                else
                {
                    tbCurrent.Text = tEngine.sBarcodeFromFunctionKey("SF1");
                }
                bShiftFunctionKeys = false;
                tbCurrent.Focus();
                SendKeys.Send("{ENTER}");
            }
            else if (e.KeyCode == Keys.F2)
            {
                if (!bShiftFunctionKeys)
                {
                    tbCurrent.Text = tEngine.sBarcodeFromFunctionKey("F2");
                }
                else
                {
                    tbCurrent.Text = tEngine.sBarcodeFromFunctionKey("SF2");
                }
                bShiftFunctionKeys = false;
                tbCurrent.Focus();
                SendKeys.Send("{ENTER}");
            }
            else if (e.KeyCode == Keys.F3)
            {
                if (!bShiftFunctionKeys)
                {
                    tbCurrent.Text = tEngine.sBarcodeFromFunctionKey("F3");
                }
                else
                {
                    tbCurrent.Text = tEngine.sBarcodeFromFunctionKey("SF3");
                }
                bShiftFunctionKeys = false;
                tbCurrent.Focus();
                SendKeys.Send("{ENTER}");
            }
            else if (e.KeyCode == Keys.F4)
            {
                if (!bShiftFunctionKeys)
                {
                    tbCurrent.Text = tEngine.sBarcodeFromFunctionKey("F4");
                }
                else
                {
                    tbCurrent.Text = tEngine.sBarcodeFromFunctionKey("SF4");
                }
                bShiftFunctionKeys = false;
                tbCurrent.Focus();
                SendKeys.Send("{ENTER}");
            }
            else if (e.KeyCode == Keys.F5)
            {
                if (!bShiftFunctionKeys)
                {
                    tbCurrent.Text = tEngine.sBarcodeFromFunctionKey("F5");
                }
                else
                {
                    tbCurrent.Text = tEngine.sBarcodeFromFunctionKey("SF5");
                }
                bShiftFunctionKeys = false;
                tbCurrent.Focus();
                SendKeys.Send("{ENTER}");
            }
            else if (e.KeyCode == Keys.F6)
            {
                if (!bShiftFunctionKeys)
                {
                    tbCurrent.Text = tEngine.sBarcodeFromFunctionKey("F6");
                }
                else
                {
                    tbCurrent.Text = tEngine.sBarcodeFromFunctionKey("SF6");
                }
                bShiftFunctionKeys = false;
                tbCurrent.Focus();
                SendKeys.Send("{ENTER}");
            }
            else if (e.KeyCode == Keys.F7)
            {
                if (!bShiftFunctionKeys)
                {
                    tbCurrent.Text = tEngine.sBarcodeFromFunctionKey("F7");
                }
                else
                {
                    tbCurrent.Text = tEngine.sBarcodeFromFunctionKey("SF7");
                }
                bShiftFunctionKeys = false;
                tbCurrent.Focus();
                SendKeys.Send("{ENTER}");
            }
            else if (e.KeyCode == Keys.F8)
            {
                if (!bShiftFunctionKeys)
                {
                    tbCurrent.Text = tEngine.sBarcodeFromFunctionKey("F8");
                }
                else
                {
                    tbCurrent.Text = tEngine.sBarcodeFromFunctionKey("SF8");
                }
                bShiftFunctionKeys = false;
                tbCurrent.Focus();
                SendKeys.Send("{ENTER}");
            }
            else if (e.KeyCode == Keys.F9)
            {
                if (!bShiftFunctionKeys)
                {
                    tbCurrent.Text = tEngine.sBarcodeFromFunctionKey("F9");
                }
                else
                {
                    tbCurrent.Text = tEngine.sBarcodeFromFunctionKey("SF9");
                }
                bShiftFunctionKeys = false;
                tbCurrent.Focus();
                SendKeys.Send("{ENTER}");
            }
            else if (e.KeyCode == Keys.F10)
            {
                if (!bShiftFunctionKeys)
                {
                    tbCurrent.Text = tEngine.sBarcodeFromFunctionKey("F10");
                }
                else
                {
                    tbCurrent.Text = tEngine.sBarcodeFromFunctionKey("SF10");
                }
                bShiftFunctionKeys = false;
                tbCurrent.Focus();
                SendKeys.Send("{ENTER}");
            }
            else if (e.KeyCode == Keys.F11)
            {
                if (!bShiftFunctionKeys)
                {
                    tbCurrent.Text = tEngine.sBarcodeFromFunctionKey("F11");
                }
                else
                {
                    tbCurrent.Text = tEngine.sBarcodeFromFunctionKey("SF11");
                }
                bShiftFunctionKeys = false;
                tbCurrent.Focus();
                SendKeys.Send("{ENTER}");
            }
            else if (e.KeyCode == Keys.F12)
            {
                if (!bShiftFunctionKeys)
                {
                    tbCurrent.Text = tEngine.sBarcodeFromFunctionKey("F12");
                }
                else
                {
                    tbCurrent.Text = tEngine.sBarcodeFromFunctionKey("SF12");
                }
                bShiftFunctionKeys = false;
                tbCurrent.Focus();
                SendKeys.Send("{ENTER}");
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// The handler for when a key is pressed
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void lbMenuItems_KeyDown(object sender, KeyEventArgs e)
        {
            nTimeUntilTimeOut        = 60;
            lblTimeoutCountdown.Text = "";
            if (e.KeyCode == Keys.Escape)
            {
                this.Close();
            }
            else if (e.KeyCode == Keys.Enter)
            {
                if (currentMenuType == MenuType.MainMenu)
                {
                    switch (lbMenuItems.SelectedIndex)
                    {
                    case 0:
                        // Toggle printer status
                        tEngine.TogglePrinterStatus();
                        this.Close();
                        break;

                    case 1:
                        //Reprint a receipt
                        fltReprintReceipt = new frmLookupTransactions(new Size(this.Width, this.Height - 56), ref tEngine, new Point(this.Left, this.Top + 56), "REPRINT_RECEIPT");
                        fltReprintReceipt.Show();
                        fltReprintReceipt.FormClosing += new FormClosingEventHandler(fltReprintReceipt_FormClosing);
                        bOtherFormOpen = true;
                        break;

                    case 2:
                        // Cash paid out
                        fiCashPaidOut = new frmInput(frmInput.FormType.CashPaidOut, new Point(this.Left, this.Height + this.Top - 150), new Size(this.Width, 150), new string[0]);
                        fiCashPaidOut.Show();
                        fiCashPaidOut.FormClosing += new FormClosingEventHandler(fiCashPaidOut_FormClosing);
                        bOtherFormOpen             = true;
                        break;

                    case 3:
                        // Void Transaction
                        fltTransToVoid = new frmLookupTransactions(new Size(this.Width, this.Height - 56), ref tEngine, new Point(this.Left, this.Top + 56), "VOID_TRANSACTION");
                        fltTransToVoid.Show();
                        fltTransToVoid.FormClosing += new FormClosingEventHandler(fltTransToVoid_FormClosing);
                        bOtherFormOpen              = true;
                        break;

                    case 4:
                        // Look up transactions
                        fltTransactions = new frmLookupTransactions(new Size(this.Width, this.Height - 56), ref tEngine, new Point(this.Left, this.Top + 56), null);
                        fltTransactions.Show();
                        bOtherFormOpen = true;
                        fltTransactions.FormClosing += new FormClosingEventHandler(fltTransactions_FormClosing);
                        break;

                    case 5:
                        // Money In Till
                        fmitMoneyInTill = new frmMoneyInTill(ref tEngine, new Point(this.Left, this.Top + 56), new Size(this.Width, this.Height - 56));
                        fmitMoneyInTill.Show();
                        bOtherFormOpen = true;
                        fmitMoneyInTill.FormClosing += new FormClosingEventHandler(fmitMoneyInTill_FormClosing);
                        break;

                    case 6:
                        // Refund
                        frRefund = new frmRefund(new Size(this.Width, this.Height - 56), new Point(this.Left, this.Top + 56), ref tEngine);
                        frRefund.Show();
                        bOtherFormOpen        = true;
                        frRefund.FormClosing += new FormClosingEventHandler(frRefund_FormClosing);
                        break;

                    case 7:
                        // Define Preset Keys
                        fpkPresets = new frmPresetKeys(new Point(this.Left, this.Top + 56), new Size(this.Width, this.Height - 56), ref tEngine);
                        fpkPresets.Show();
                        fpkPresets.FormClosing += new FormClosingEventHandler(fpkPresets_FormClosing);
                        bOtherFormOpen          = true;
                        break;

                    case 8:
                        // Print a register report
                        tEngine.PrintRegisterReport();
                        break;

                    case 9:
                        // Receive On Account
                        froaReceiveMoney              = new frmReceiveOnAccount(new Point(this.Left, this.Top + this.Height - 150), new Size(this.Width, 150), ref tEngine);
                        bOtherFormOpen                = true;
                        froaReceiveMoney.FormClosing += new FormClosingEventHandler(froaReceiveMoney_FormClosing);
                        break;

                    case 10:
                        // Print Stock Levels
                        frmCategorySelect fcSelect = new frmCategorySelect(ref tEngine);
                        fcSelect.ShowDialog();
                        if (fcSelect.SelectedCategory != "NONE_SELECTED")
                        {
                            tEngine.PrintStockLevelsOfCategory(fcSelect.SelectedCategory);
                        }
                        break;

                    case 11:
                        frmAddToOrder fato = new frmAddToOrder(ref tEngine);
                        fato.ShowDialog();
                        break;

                    case 13:
                        Application.ExitThread();
                        //Application.Exit();
                        break;

                    case 12:
                        tmrUpdateDateTime.Enabled = false;
                        frmSearchForItemV2 fsfBarcode = new frmSearchForItemV2(ref tEngine);
                        fsfBarcode.ShowDialog();
                        if (fsfBarcode.GetItemBarcode() != "NONE_SELECTED")
                        {
                            tEngine.PrintBarcode(fsfBarcode.GetItemBarcode(), false);
                        }
                        tmrUpdateDateTime.Enabled = true;
                        break;
                    }
                }
                else if (currentMenuType == MenuType.AdminMenu)
                {
                    switch (lbMenuItems.SelectedIndex)
                    {
                    case 0:
                        // Remove a transaction
                        fltTransToRemove = new frmLookupTransactions(new Size(this.Width, this.Height - 56), ref tEngine, new Point(this.Left, this.Top + 56), "REMOVE_TRANSACTION");
                        try
                        {
                            fltTransToRemove.Show();
                            fltTransToRemove.FormClosing += new FormClosingEventHandler(fltTransToRemove_FormClosing);
                            bOtherFormOpen = true;
                        }
                        catch
                        {
                            // User backed out of removal
                            ;
                        }
                        break;

                    case 1:
                        if (File.Exists("REPDATA_PREV.DBF") && File.Exists("TDATA_PREV.DBF") && File.Exists("THDR_PREV.DBF") && UserCertain("undo the previous transaction?"))
                        {
                            File.Delete(GTill.Properties.Settings.Default.sRepDataLoc);
                            File.Delete(GTill.Properties.Settings.Default.sTDataLoc);
                            File.Delete(GTill.Properties.Settings.Default.sTHdrLoc);
                            File.Copy("REPDATA_PREV.DBF", GTill.Properties.Settings.Default.sRepDataLoc);
                            File.Copy("TDATA_PREV.DBF", GTill.Properties.Settings.Default.sTDataLoc);
                            File.Copy("THDR_PREV.DBF", GTill.Properties.Settings.Default.sTHdrLoc);
                            tEngine.LoadTable("REPDATA");
                            tEngine.LoadTable("TDATA");
                            tEngine.LoadTable("THDR");
                            this.Close();
                        }
                        break;

                    case 2:
                        // Print receipt header
                        tEngine.PrintReceiptHeader();
                        tEngine.EmptyPrinterBuffer();
                        this.Close();
                        break;

                    case 3:
                        // Print receipt footer
                        string sDateTime          = DateTime.Now.Day + "/" + DateTime.Now.Month.ToString() + "/" + DateTime.Now.Year.ToString() + ", " + DateTime.Now.TimeOfDay.Hours.ToString() + ":" + DateTime.Now.TimeOfDay.Minutes.ToString();
                        string sStaffName         = tEngine.GetCurrentStaffName();
                        string sTransactionNumber = tEngine.GetNextTransactionNumber().ToString();
                        tEngine.PrintReceiptFooter(sStaffName, sDateTime, sTransactionNumber);
                        tEngine.EmptyPrinterBuffer();
                        this.Close();
                        break;

                    case 4:
                        // Process file in INGNG folder
                        if (GTill.Properties.Settings.Default.bUsingDosInsteadOfFloppy)
                        {
                            tEngine.CollectFilesFromDosDrive();
                        }
                        if (tEngine.ProcessFilesInINGNG())
                        {
                            if (MessageBox.Show("Not all changes will take effect until GTill has restarted. Restart now?", "Restart Now?", MessageBoxButtons.YesNo) == DialogResult.Yes)
                            {
                                Application.Restart();
                            }
                            else
                            {
                                MessageBox.Show("Files from INGNG have been processed");
                            }
                        }
                        this.Close();
                        break;

                    case 5:
                        // About GTill
                        frmAbout fAbt = new frmAbout();
                        fAbt.ShowDialog();
                        break;

                    case 6:
                        // Empty Printer Buffer
                        tEngine.EmptyPrinterBuffer();
                        this.Close();
                        break;

                    case 7:
                        // Show the configuration window
                        frmConfig cfg = new frmConfig();
                        Cursor.Show();
                        cfg.ShowDialog();
                        Cursor.Hide();
                        break;

                    case 8:
                        // Change sales date in REPDATA
                        frmDateInput fdi = new frmDateInput(this.Size);
                        fdi.Visible = false;
                        fdi.ShowDialog();
                        tEngine.SetDateInRepData(fdi.DateTimeInput);
                        MessageBox.Show("Date was successfully changed to " + fdi.DateTimeInput);
                        this.Close();
                        break;

                    case 9:
                        tEngine.DemoMode = !tEngine.DemoMode;
                        if (tEngine.DemoMode)
                        {
                            MessageBox.Show("Demonstration Mode has been enabled. No standard transactions will be saved whilst in demonstration mode, although refunds, transaction removals, void transactions etc will still be counted!! Please remember to disable it when you have finished.");
                        }
                        else
                        {
                            MessageBox.Show("Demonstration Mode has been disabled.");
                        }
                        this.Close();
                        break;

                    case 10:
                        throw new NotSupportedException("Test error!");
                        break;

                    case 11:
                        tEngine.ApplyCreditCardDiscs();
                        this.Close();
                        tEngine.PrintRegisterReport();
                        break;

                    case 12:
                        frmSingleInputBox fsiGetHex = new frmSingleInputBox("Enter 1 byte hex codes, seperated by spaces (e.g. 01 AF F2)");
                        tmrUpdateDateTime.Enabled = false;
                        fsiGetHex.ShowDialog();
                        if (fsiGetHex.Response != "$NONE")
                        {
                            tEngine.PrintTestBarcode(fsiGetHex.Response);
                        }
                        break;

                    case 13:
                        frmBackupDates fbd = new frmBackupDates();
                        fbd.ShowDialog();
                        break;
                    }
                }
            }
        }