Beispiel #1
0
        public static IState ShowLogoMenu()
        {
            MenuList logoMenu = new MenuList();

            if (printerLogo == null)
            {
                printerLogo = cr.Printer.Logo;
            }
            int index = 1;

            logoMenu.Add(new MenuLabel(String.Format("{0}\t{1,2}\n{2}",
                                                     PosMessage.LOGO_LINE, index++, printerLogo[0])));
            logoMenu.Add(new MenuLabel(String.Format("{0}\t{1,2}\n{2}",
                                                     PosMessage.LOGO_LINE, index++, printerLogo[1])));
            logoMenu.Add(new MenuLabel(String.Format("{0}\t{1,2}\n{2}",
                                                     PosMessage.LOGO_LINE, index++, printerLogo[2])));
            logoMenu.Add(new MenuLabel(String.Format("{0}\t{1,2}\n{2}",
                                                     PosMessage.LOGO_LINE, index++, printerLogo[3])));
            logoMenu.Add(new MenuLabel(String.Format("{0}\t{1,2}\n{2}",
                                                     PosMessage.LOGO_LINE, index++, printerLogo[4])));
            logoMenu.Add(new MenuLabel(String.Format("{0}\t{1,2}\n{2}",
                                                     PosMessage.LOGO_LINE, index++, printerLogo[5])));

            //return List.Instance(logoMenu, null , new StateInstance(ShowLogoMenu));
            return(ListCommandMenu.Instance(logoMenu, new ProcessSelectedItem <MenuLabel>(LogoMenuAction), ShowMenu));
            //return state;
        }
Beispiel #2
0
 /// <summary>
 /// - CommandMenu Instance.
 /// </summary>
 /// <returns>CommandMenu State</returns>
 private static IState Instance()
 {
     if (ie == null)
     {
         return(AlertCashier.Instance(new Error(new InvalidProgramException())));
     }
     return(ListCommandMenu.Instance(ie, new ProcessSelectedItem <MenuLabel>(SelectActionMenu)));
 }
Beispiel #3
0
        public static IState ShowTaxRatesMenu()
        {
            printerTaxRates = cr.Printer.TaxRates;

            MenuList menuHeaders = new MenuList();
            int      index       = 1;

            for (index = 1; index <= printerTaxRates.Length; index++)
            {
                if (printerTaxRates[index - 1] == decimal.MinusOne)
                {
                    menuHeaders.Add(new MenuLabel(String.Format("{0}\t{1,2}\n{2}",
                                                                PosMessage.VAT_RATE, index, "TANIMSIZ")));
                }
                else
                {
                    menuHeaders.Add(new MenuLabel(String.Format("{0}\t{1,2}\n{2}",
                                                                PosMessage.VAT_RATE, index, printerTaxRates[index - 1])));
                }
            }

            //    menuHeaders.Add(new MenuLabel(String.Format("{0}\t{1,2}\n{2}",
            //        PosMessage.VAT_RATE, index++, printerTaxRates[index - 2])));
            //menuHeaders.Add(new MenuLabel(String.Format("{0}\t{1,2}\n{2}",
            //    PosMessage.VAT_RATE, index++, printerTaxRates[index - 2])));
            //menuHeaders.Add(new MenuLabel(String.Format("{0}\t{1,2}\n{2}",
            //    PosMessage.VAT_RATE, index++, printerTaxRates[index - 2])));
            //menuHeaders.Add(new MenuLabel(String.Format("{0}\t{1,2}\n{2}",
            //    PosMessage.VAT_RATE, index++, printerTaxRates[index - 2])));
            //menuHeaders.Add(new MenuLabel(String.Format("{0}\t{1,2}\n{2}",
            //    PosMessage.VAT_RATE, index++, printerTaxRates[index - 2])));
            //menuHeaders.Add(new MenuLabel(String.Format("{0}\t{1,2}\n{2}",
            //    PosMessage.VAT_RATE, index++, printerTaxRates[index - 2])));
            //menuHeaders.Add(new MenuLabel(String.Format("{0}\t{1,2}\n{2}",
            //    PosMessage.VAT_RATE, index++, printerTaxRates[index - 2])));
            //menuHeaders.Add(new MenuLabel(String.Format("{0}\t{1,2}\n{2}",
            //    PosMessage.VAT_RATE, index++, printerTaxRates[index - 2])));

            //List.Instance(menuHeaders);
            return(ListCommandMenu.Instance(menuHeaders, new ProcessSelectedItem <MenuLabel>(TaxRatesMenuAction), ShowMenu));

            //return state;
        }