Esempio n. 1
0
        public static void RefreshNotification(payStatus status)
        {
            try {
                switch (status)
                {
                case payStatus.insertTicket:                            //En espera de ticket
                    MainClass.MainWin.SetNotification = MainWindow.mainWindowNotification.insertTicket;
                    break;

                case payStatus.readingTicket:                           //Leyendo el ticket
                    MainClass.MainWin.SetNotification = MainWindow.mainWindowNotification.readingTicket;
                    break;

                case payStatus.errorReadingTicket:                      //Error al leer el ticket
                    MainClass.MainWin.SetNotification = MainWindow.mainWindowNotification.errReadingTicket;
                    break;

                case payStatus.calculatingAmount:                       //Calculando monto a pagar
                    MainClass.MainWin.SetNotification = MainWindow.mainWindowNotification.calculatingAmount;
                    break;

                case payStatus.waithToMoney:                            //Esperando depósito de dinero
                    payLogic.SetNotification = Culturize.GetString(7);
                    break;

                case payStatus.cancelPay:                                       //Proceso de pago cancelado
                    MainClass.MainWin.SetNotification = MainWindow.mainWindowNotification.insertTicket;
                    break;

                case payStatus.withMoney:                                       //Con dinero depositado y esperando más para completar el monto a pagar
                    break;

                case payStatus.withAmountPayed:                         //Depósito de dinero completado
                    payLogic.SetNotification = string.Format("{0}, {1}...", Culturize.GetString(8), Culturize.GetString(9));
                    break;

                case payStatus.withAmountPayedandReturnMoney:
                    payLogic.SetNotification = Culturize.GetString(10);
                    break;

                case payStatus.ticketProcessed:
                    payLogic.SetNotification = Culturize.GetString(11);
                    break;

                case payStatus.payProcessTerminated:
                    payLogic.SetNotification = Culturize.GetString(12);
                    break;

                case payStatus.printingRecepit:                         //Impresión de recibo de pago
                    payLogic.SetNotification = string.Format("{0}, {1}...", Culturize.GetString(13), Culturize.GetString(9));
                    break;

                case payStatus.recepitPrinted:                          //Recibo impreso
                    payLogic.SetNotification = resourseMessages.printingReceiptMessage;
                    break;
                }
            } catch (Exception) {}
        }
Esempio n. 2
0
        private void putDateTimeinLanguaje()
        {
            string fecha = Culturize.GetParameter("fecha");

            fecha = !string.IsNullOrEmpty(fecha) ? fecha : "{0:dd/MM/yyyy}";

            string hora = Culturize.GetParameter("hora");

            hora = !string.IsNullOrEmpty(hora) ? hora : "{0:H:mm:ss}";

            lblfechaData.LabelProp = markup.make(string.Format(fecha, DateTime.Now), "red", null, "20000", "bold");
            lblhoraData.LabelProp  = markup.make(string.Format(hora, DateTime.Now), "red", null, "20000", "bold");
        }
Esempio n. 3
0
        public void initLanguajeConfigurations()
        {
            lblfecha.Text  = Culturize.GetString(1);
            lblhora.Text   = Culturize.GetString(2);
            lblCajero.Text = Culturize.GetString(3);

            this.eachItems(this);

            lblCajeroData.LabelProp = markup.make(cnfg.GetCheckerName(int.Parse(cnfg.getConfiguration("id_application"))), "black", null, "20000", "bold");

            lblAPagar.LabelProp    = markup.make(Culturize.GetString(4), "red", null, "50000", "heavy");
            lblPorPagar.LabelProp  = markup.make(Culturize.GetString(5), "black", null, "27000", "heavy");
            lblADevolver.LabelProp = markup.make(Culturize.GetString(6), "black", null, "25000", "heavy");

            lblSignoPesos.LabelProp  = markup.make("$", "red", null, "50000", "heavy");
            lbl21.LabelProp          = markup.make("[", "red", null, "65000", "heavy");;
            lbl24.LabelProp          = markup.make("]", "red", null, "65000", "heavy");
            lblSignoPesos1.LabelProp = markup.make("$", "black", null, "25000", "heavy");
            lblSignoPesos2.LabelProp = markup.make("$", "black", null, "25000", "heavy");

            this.refreshPayLabels();

            this.putDateTimeinLanguaje();
        }
Esempio n. 4
0
        public void configureIdiomsButtons()
        {
            int i = 0;

            MySqlDataReader idioms = Culturize.getCaIdioms();

            if (idioms != null)
            {
                VBox    vbox = null;
                Boolean par  = false;
                while (idioms.Read())
                {
                    i++;

                    if (!par)
                    {
                        vbox             = new VBox();
                        vbox.Spacing     = 6;
                        vbox.Homogeneous = false;
                        vbox.Visible     = true;
                    }

                    Gtk.Button btn = new Gtk.Button();
                    btn.Name         = string.Format("{0}", idioms ["siglas"].ToString());
                    btn.CanFocus     = false;
                    btn.UseUnderline = true;
                    btn.Visible      = true;
                    btn.Image        = new Gtk.Image(string.Format("{0}", cnfg.GetBaseImage(idioms["image_fileName"].ToString())));
                    btn.Clicked     += (object sender, EventArgs e) => {
                        string idiom = ((Gtk.Button)sender).Name;
                        Culturize.changeLenguaje(idiom);
                    };

                    vbox.Add(btn);

                    Gtk.Box.BoxChild boxchild = ((Gtk.Box.BoxChild)(vbox [btn]));
                    boxchild.Position = !par ? 0 : 1;
                    boxchild.Expand   = false;
                    boxchild.Fill     = false;
                    boxchild.PackType = PackType.Start;


                    if (par)
                    {
                        hbox2.Add(vbox);
                        Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(hbox2 [vbox]));
                        w1.Expand = false;
                        w1.Fill   = false;
                    }
                    par = !par;
                }

                if (i % 2 != 0)
                {
                    Gtk.Alignment alignment = new Gtk.Alignment(0.5F, 0.5F, 1F, 1F);
                    vbox.Add(alignment);
                    Box.BoxChild boxchild = ((global::Gtk.Box.BoxChild)(vbox [alignment]));
                    boxchild.Position = 1;

                    hbox2.Add(vbox);
                    Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(hbox2 [vbox]));
                    w1.Expand = false;
                    w1.Fill   = false;
                }

                if (!idioms.IsClosed)
                {
                    idioms.Close();
                }
            }
        }