コード例 #1
0
 public static IState EnterFiscalId()
 {
     return(EnterString.Instance("MALi HAFIZA NUMARASI",
                                 LastFiscalId,
                                 new StateInstance <String>(CheckFiscalId),
                                 new StateInstance(FiscalIdBlock.Instance)));
 }
コード例 #2
0
 public override void Numeric(char c)
 {
     CashRegister.State = EnterString.Instance(PosMessage.PRICE_LOOKUP,
                                               c.ToString(),
                                               new StateInstance <String>(CashRegister.PriceLookup),
                                               null);
 }
コード例 #3
0
 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);
 }
コード例 #4
0
        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);
        }
コード例 #5
0
        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));
        }
コード例 #6
0
ファイル: CommandMenu.cs プロジェクト: serhatmorkoc/cepos
        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));
            }
        }
コード例 #7
0
 public override void BarcodePrefix()
 {
     cr.State = EnterString.Instance(PosMessage.ENTER_BARCODE,
                                     new StateInstance <string>(BarcodeMenu.Instance),
                                     new StateInstance(BarcodeMenu.Instance));
 }
コード例 #8
0
 public override void PriceLookup()
 {
     cr.State = EnterString.Instance(PosMessage.PRICE_LOOKUP, new StateInstance <String>(cr.PriceLookup));
 }
コード例 #9
0
        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;
            }
        }