public static IState EnterFiscalId() { return(EnterString.Instance("MALi HAFIZA NUMARASI", LastFiscalId, new StateInstance <String>(CheckFiscalId), new StateInstance(FiscalIdBlock.Instance))); }
public override void Numeric(char c) { CashRegister.State = EnterString.Instance(PosMessage.PRICE_LOOKUP, c.ToString(), new StateInstance <String>(CashRegister.PriceLookup), null); }
public static IState EnterBarcode(decimal value) { quantity = value; cr.State = EnterString.Instance(PosMessage.PRODUCT_BARCODE, new StateInstance <String>(ShowProduct), new StateInstance(Continue)); return(cr.State); }
public static new IState Instance(String message, string defaultValue, StateInstance <string> ConfirmState, StateInstance CancelState) { input = new StringBuilder(); ReturnCancel = CancelState; IState baseState = EnterString.Instance(message, defaultValue, null, CancelState); ReturnConfirm = ConfirmState; return(state); }
private static void LogoMenuAction(Object menu) { String msg = ((MenuLabel)menu).ToString(); logoLine = (msg.Substring(msg.IndexOf("\t") + 1, 2)).Trim(); EnterString.SetMaxLength(48); cr.State = EnterString.Instance("", PosMessage.LOGO_LINE + "\t " + logoLine + "\n" + printerLogo[int.Parse(logoLine) - 1], new StateInstance <String>(SetLogo), new StateInstance(Continue)); }
public static void GetRepeatType(Object o) { MenuLabel label = o as MenuLabel; if (label.Value.ToString().Contains("BELGE NO ÝLE")) { cr.State = EnterInteger.Instance(PosMessage.DOCUMENT_ID, new StateInstance <int>(RepeatDocument), new StateInstance(Continue)); } else if (label.Value.ToString().Contains("BARKOD ÝLE")) { cr.State = EnterString.Instance(PosMessage.BARCODE, new StateInstance <string>(RepeatDocument), new StateInstance(Continue)); } }
public override void BarcodePrefix() { cr.State = EnterString.Instance(PosMessage.ENTER_BARCODE, new StateInstance <string>(BarcodeMenu.Instance), new StateInstance(BarcodeMenu.Instance)); }
public override void PriceLookup() { cr.State = EnterString.Instance(PosMessage.PRICE_LOOKUP, new StateInstance <String>(cr.PriceLookup)); }
public override void Enter() { String msg = ((MenuLabel)ie.Current).ToString(); if (msg.IndexOf("\n") > -1) { msg = msg.Substring(msg.IndexOf("\n") + 1); } switch (msg) { case PosMessage.MENU_DAILY_MEMORY_FORMAT: cr.State = ConfirmCashier.Instance(new Confirm(PosMessage.PROMPT_DAILY_MEMORY_FORMAT, new StateInstance(FormatMemory), new StateInstance(Continue))); break; case PosMessage.MENU_DATE_AND_TIME: cr.State = EnterString.Instance("FORMAT: yyyyMMddHHmm", DateTime.Now.ToString("yyyyMMddHHmm"), new StateInstance <String>(SetDateAndTime), new StateInstance(Continue)); break; case PosMessage.MENU_FACTORY_SETTING: cr.State = ConfirmCashier.Instance(new Confirm(PosMessage.LOAD_FACTOR_SETTINGS, new StateInstance(LoadFactorySettings), new StateInstance(Continue))); break; case PosMessage.MENU_CLOSE_FM: cr.State = ConfirmCashier.Instance(new Confirm(PosMessage.CLOSE_FISCAL_MEMORY, new StateInstance(CloseFiscalMemory), new StateInstance(Continue))); break; case PosMessage.MENU_START_FM_TEST: cr.State = ConfirmCashier.Instance(new Confirm(PosMessage.START_FM_TEST, new StateInstance(StartFMTest), new StateInstance(Continue))); break; case PosMessage.MENU_EXTERNAL_DEV_SETTINGS: defPort = 4444; cr.State = EnterIP.Instance(PosMessage.TCP_IP_ADDRESS, GetIPAddress(), new StateInstance <String>(SetIPAddress), new StateInstance(Continue)); break; case PosMessage.MENU_LOGO: cr.State = ShowLogoMenu(); break; case PosMessage.MENU_VAT_RATES: cr.State = ShowTaxRatesMenu(); break; case PosMessage.MENU_PRINT_LOGS: cr.State = EnterString.Instance("FORMAT: ddMMyyyy", DateTime.Now.ToString("ddMMyyyy"), new StateInstance <String>(PrintLogs), new StateInstance(Continue)); break; case PosMessage.MENU_CREATE_DB: cr.State = ConfirmCashier.Instance(new Confirm(PosMessage.CREATE_DB, new StateInstance(CreateDB), new StateInstance(Continue))); break; case PosMessage.MENU_UPDATE_FIRMWARE: cr.State = EnterIP.Instance(PosMessage.TCP_IP_ADDRESS, GetIPAddress(), new StateInstance <String>(SetIPAddress), new StateInstance(Continue)); break; case PosMessage.MENU_EXIT_SERVICE: lastPassword = ""; cr.State = EnterPassword.Instance(PosMessage.SERVICE_PASSWORD, new StateInstance <String>(ExitService), new StateInstance(PrinterBlockingError.Instance)); break; } }