public void Loadviews()
        {
            // Create an instance of the XmlSerializer class;
            // specify the type of object to be deserialized.
            XmlSerializer serializer = new XmlSerializer(typeof(views));

            /* If the XML document has been altered with unknown
             * nodes or attributes, handle them with the
             * UnknownNode and UnknownAttribute events.*/
            serializer.UnknownNode += new
                                      XmlNodeEventHandler(serializer_UnknownNode);
            serializer.UnknownAttribute += new
                                           XmlAttributeEventHandler(serializer_UnknownAttribute);

            // A FileStream is needed to read the XML document.
            FileStream fs = new FileStream(fileName, FileMode.Open);

            // Declare an object variable of the type to be deserialized.

            /* Use the Deserialize method to restore the object's state with
             * data from the XML document. */
            viewload = (views)serializer.Deserialize(fs);

            fs.Close();
        }
예제 #2
0
        //Label testLabel;
        //public bool needDebouncing;
        //IDisposable timer;


        private ViewControlHelper()
        {
            parentWindow = App.Current.MainWindow;
            viewList     = (ListBox)parentWindow.FindName("viewList");
            viewsHistory = new List <views>();
            currentView  = views.view_home;
            viewsHistory.Add(currentView);
            viewChoosed = views.view_none;
        }
예제 #3
0
 public void gotoPreviousView()
 {
     if (viewsHistory.Count > 1)
     {
         viewsHistory.RemoveAt(viewsHistory.Count - 1);
         viewChoosed            = viewsHistory.Last();
         currentView            = viewChoosed;
         viewList.SelectedIndex = (int)currentView;
     }
     //testLabel.Content = previousViews.Count().ToString();
 }
예제 #4
0
 public DesbloqueoToken()
 {
     InitializeComponent();
     (ApplicationBar.MenuItems[0] as IApplicationBarMenuItem).Text = TextosPantallas.menuVolverOperacionesToken;
     (ApplicationBar.MenuItems[1] as IApplicationBarMenuItem).Text = TextosPantallas.menuVolverConsultaSaldos;
     (ApplicationBar.MenuItems[2] as IApplicationBarMenuItem).Text = TextosPantallas.menuCerrarSesion;
     Progress.OnShow += (s, e) => { ApplicationBar.IsMenuEnabled = false; this.BackKeyPress += Progress.CancelBackKeyPress; };
     Progress.OnHide += (s, e) => { ApplicationBar.IsMenuEnabled = true; this.BackKeyPress -= Progress.CancelBackKeyPress; };
     _currentView = views.Desbloqueo1de1;
     this.Loaded += new RoutedEventHandler(DesbloqueoToken_Loaded);
     _vm = new DesbloqueoTokenViewModel(this.Dispatcher);
     _vm.CerrarSesionComplete += new Global.ViewModelServiceCallback(_vm_CerrarSesionComplete);
     _vm.CerrarSesionError += new Global.ViewModelServiceCallback<Global.ViewModelEventArgs>(_vm_CerrarSesionError);
     _vm.ProcesoError += new Global.ViewModelServiceCallback<Global.ViewModelEventArgs>(_vm_ProcesoError);
     _vm.desbloqueoTokenCompleted += new DesbloqueoTokenViewModel.DesbloqueoTokenCompleted(_vm_desbloqueoTokenCompleted);
 }
            public static void reset()
            {
                views temp = new views();

                temp.Urls = new List <URL>();

                // Create an instance of the XmlSerializer class;
                // specify the type of object to serialize.
                XmlSerializer serializer =
                    new XmlSerializer(typeof(views));
                TextWriter writer = new StreamWriter(ExplorerPlusFileView.fileName);

                // Serialize the urls, and close the TextWriter.

                serializer.Serialize(writer, temp);
                writer.Close();
                viewload.Urls = temp.Urls;
            }
예제 #6
0
 private void DisplayViews(views view)
 {
     if (view == views.Users)
     {
         usersList1.Visible   = true;
         userDetails1.Visible = true;
         itemsList1.Visible   = false;
         itemDetails1.Visible = false;
     }
     else
     {
         userDetails1.Visible = false;
         usersList1.Visible   = false;
         itemsList1.Visible   = true;
         itemDetails1.Visible = true;
     }
     viewing = view;
 }
예제 #7
0
        /*public ViewControlHelper(Window mainWindow, views rootView)
         * {
         *  //parentWindow = mainWindow;
         *  parentWindow = App.Current.MainWindow;
         *  viewList = (ListBox)parentWindow.FindName("viewList");
         *  //testLabel = (Label)parentWindow.FindName("testLabel");
         *  previousViews = new List<views>();
         *  currentView = rootView;
         *  viewsHistory = new List<views>();
         *  viewsHistory.Add(rootView);
         *  //needDebouncing = false;
         *  viewChoosed = views.view_none;
         * }*/

        public void gotoView(views view)
        {
            //if (getCurrentView() != view && needDebouncing == false)
            if (currentView != view)
            {
                viewChoosed = view;
                currentView = viewChoosed;
                viewsHistory.Add(view);
                viewList.SelectedIndex = (int)view;

                //needDebouncing = true;

                /*testLabel.Content = "TRUE";
                 * timer = EasyTimer.SetTimeout(() =>
                 * {
                 *  needDebouncing = false;
                 *  //testLabel.Content = "FALSE";
                 * }, 5000);*/
            }
            //testLabel.Content = previousViews.Count().ToString();
        }
예제 #8
0
 /// <summary>
 /// Called after every awake has been called.
 /// </summary>
 private void Start()
 {
     NestBlocks = 0;
     AliveAnts  = 1000;
     view       = views.MainMenu;
 }
예제 #9
0
        private void navigate(views v)
        {
            String token = NavigationContext.QueryString["tipoToken"];
            switch (v)
            {
                case views.Desbloqueo1de3:
                    BloqueoToken1de3.Visibility = Visibility.Visible;
                    BloqueoToken2de3.Visibility = Visibility.Collapsed;
                    BloqueoToken3de3.Visibility = Visibility.Collapsed;
                    
                    if ("ST".Equals(token)){
                        motivosBloqueoList.Description = TextosPantallas.tIndiqueMotivoBloqueoST;
                    }
                    break;
                case views.Desbloqueo2de3:
                    BloqueoToken1de3.Visibility = Visibility.Collapsed;
                    BloqueoToken2de3.Visibility = Visibility.Visible;
                    BloqueoToken3de3.Visibility = Visibility.Collapsed;
                    break;
                case views.Desbloqueo3de3:
                    if (this._bloqueoRealizado)
                    {
                        Exito.Visibility = Visibility.Visible;
                    }
                    else
                    {
                        Fallo.Visibility = Visibility.Visible;
                    }
                    BloqueoToken1de3.Visibility = Visibility.Collapsed;
                    BloqueoToken2de3.Visibility = Visibility.Collapsed;
                    BloqueoToken3de3.Visibility = Visibility.Visible;

                    if ("ST".Equals(token)) {
                        bloqueoTST.Text = TextosPantallas.tTokenBloqueadoExitoST;
                    }
                    tbFecha.Text = this._bloqueoTokenViewModel.Fecha;
                    tbHora.Text = this._bloqueoTokenViewModel.Hora;
                    tbReferencia.Text = this._bloqueoTokenViewModel.Referencia;
                    break;
            }
        }
예제 #10
0
 private void OnBloqueo1de3Button_Click(object sender, RoutedEventArgs e)
 {
     if (this._motivo >= 0)
     {
         this._view = views.Desbloqueo2de3;
         navigate(views.Desbloqueo2de3);
     }
     else
     {
         String token = NavigationContext.QueryString["tipoToken"];
         if ("TF".Equals(token)){
             MessageBox.Show(TextosFront.frontMensajetBloqueoNoSeleccionado);
         }else if ("ST".Equals(token)){
             MessageBox.Show(App.Current.Resources["menuST_msj_027"] as string);
         }
     }
 }
        void ConfiguracionLimitesImportesView_Loaded(object sender, RoutedEventArgs e)
        {
            if ((Application.Current as App).SesionIniciada)
            {
                if (this._vm != null)
                {
                    this._vm.CerrarSesionComplete += new Global.ViewModelServiceCallback(_vm_CerrarSesionComplete);
                    this._vm.CerrarSesionError += new Global.ViewModelServiceCallback<Global.ViewModelEventArgs>(_vm_CerrarSesionError);
                    this._vm.ConsultarLimitesComplete += new Global.ViewModelServiceCallback<DtoConsultarLimitesActuales>(_vm_ConsultarLimitesComplete);
                    this._vm.ActualizarLimiteComplete += new Global.ViewModelServiceCallback(_vm_ActualizarLimiteComplete);
                    this._vm.ReestablecerLimiteComplete += new Global.ViewModelServiceCallback<List<DtoActualizarLimites>>(_vm_ReestablecerLimiteComplete);
                    this._vm.ProcesoError += new Global.ViewModelServiceCallback<Global.ViewModelEventArgs>(_vm_ProcesoError);
                    this._view = views.LimitesImportesMain;
                    this._nuevoLimite = String.Empty;
                    LimitesImportes.Visibility = Visibility.Visible;
                    LimitesImportes1de3.Visibility = Visibility.Collapsed;
                    LimitesImportes2de3.Visibility = Visibility.Collapsed;
                    LimitesImportes3de3.Visibility = Visibility.Collapsed;
                    ConfiguracionLimitesListBox.ItemsSource = this._vm.LimitesImportesItems;

                    if (this._vm.ReestablecerLimites)
                    {
                        btnRestablecerLimites.Visibility = System.Windows.Visibility.Visible;
                    }
                }
                else
                {
                    this.NavigationService.GoBack();
                }
            }
        }
 /// <summary>
 /// Metodo para reestablecer los limites de importes, no se ha especificado si se utilizara o no
 /// </summary>
 /// <param name="sender">objeto que lanza el metodo</param>
 /// <param name="e">evento del boton</param>
 private void Reestablecer_Click(object sender, RoutedEventArgs e)
 {
     Progress.Show();
     this._view = views.ReestablecerImportes;
     this._vm.reesTablecerLimites();
 }
        private void OnLimitesImportes2de3Button_Click(object sender, RoutedEventArgs e)
        {
            this._view = views.LimitesImportes3de3;
            resul = CasosDeUso.getResultado((App.Current as App).matrix, CasosDeUso.CONFIGURACION_LIMITE_IMPORTES.codigoCU, (int)(App.Current as App).EstatusToken, (int)(App.Current as App).EstatusSoftToken);
            if ("TF".Equals(resul.token))
            {
                token.Show(true);
            }
            else
            {
                TokenManager.obtenerCore();
                String error = TokenManager.coreInicializadoCorrecto();

                if ("".Equals(error))
                {
                    introducirPin.Show(this._vm.IsTokenFinal, ClavesOperacion.ConfiguracionLimitesImportes, (App.Current as App).CodigoCliente);
                }
                else
                {
                    token.Title = "NIP Dinámico SuperToken";
                    token.Show();                 
                }
            }

        }
        protected override void OnBackKeyPress(System.ComponentModel.CancelEventArgs e)
        {
            if (!e.Cancel)
            {
                switch (this._view)
                {
                    case views.DepositoInversion1de3:
                        e.Cancel = false;
                        break;
                    case views.DepositoInversion2de2:
                        this._view = views.DepositoInversion1de3;
                        navigated(views.DepositoInversion1de3);
                        e.Cancel = true;
                        break;
                    case views.DepositoInversion3de3:
                        this._view = views.DepositoInversion1de3;
                        navigated(views.DepositoInversion1de3);
                        e.Cancel = true;
                        break;
                    default:
                        break;
                }

            }
            else
            {
                base.OnBackKeyPress(e);
            }
        }
        private void navigated(views view)
        {
            switch (view)
            {
                case views.DepositoInversion1de3:
                    TxbDeCuenta.Text = string.Empty;
                    AliasStackPanel.Visibility = Visibility.Collapsed;
                    ButtonT.Text = _botonLabel;
                    TipoMovimiento.Text = _tipoMovimiento;
                    if (tp == tipoMovimiento.Deposito)
                    {
                        PageTitle.Text = TextosPantallas.appSubtituloDepositoInversion;

                    }
                    else
                    {
                        PageTitle.Text = TextosPantallas.appSubtituloRetiroInversion;

                    }

                    this.BackKeyPress += ListaCuentasInversion.CancelBackKeyPress;
                    if (this._navigationBackF)
                    {

                        Progress.Show();

                        this._depositoRetiroInversionVistaViewModel.DRInversion1de3EventHandler += new DRInversion1de3ViewModel.DRInversion1de3RequestCompleted(_depositoRetiroInversionVistaViewModel_DRInversion1de3EventHandler);
                        this._depositoRetiroInversionVistaViewModel.consultaChequesNB();
                        this._navigationBackF = false;
                    }
                    else
                    {
                        this._depositoRetiroInversionVistaViewModel.obtenerCuentasInversion();
                        dibujarCuentas();
                    }
                    this._view = views.DepositoInversion1de3;
                    Deposito1de3.Visibility = Visibility.Visible;
                    Deposito2de3.Visibility = Visibility.Collapsed;
                    Deposito3de3.Visibility = Visibility.Collapsed;

                    break;
                case views.DepositoInversion2de2:
                    {
                        _confirmacionDRInversionVistaViewModel = new DRInversion2de3ViewModel();

                        if (!String.IsNullOrEmpty(_confirmacionDRInversionVistaViewModel.getFecha()) && !String.IsNullOrEmpty(_cuentaReferencia) &&
          !String.IsNullOrEmpty(_cuentaDestino))
                        {

                            _confirmacionDRInversionVistaViewModel.confirmacionInversionRequestCompleted += new DRInversion2de3ViewModel.ConfirmacionInversionRequestCompleted(_confirmacionDRInversionVistaViewModel_confirmacionInversionRequestCompleted);
                            if (this.tp == tipoMovimiento.Deposito)
                            {

                                PageTitle.Text = TextosPantallas.appSubtituloDepositoInversion;
                                Descripcion.Text = TextosPantallas.tVistaDeposito;
                                this._descripcion = Descripcion.Text;
                                _claveTipoMovimiento = "0";

                            }
                            else
                            {

                                PageTitle.Text = TextosPantallas.appSubtituloRetiroInversion;
                                Descripcion.Text = TextosPantallas.tVistaCheques;
                                this._descripcion = Descripcion.Text;
                                _claveTipoMovimiento = "1";
                            }

                            //_fechaDate = DateTime.Parse(_confirmacionDRInversionVistaViewModel.getFecha(), new System.Globalization.CultureInfo("es-MX"));
                            _fechaDate = !string.IsNullOrEmpty(_confirmacionDRInversionVistaViewModel.getFecha()) ? Global.ConvertToDatetime(_confirmacionDRInversionVistaViewModel.getFecha()).Value : DateTime.Now;

                            FechaOperacion.Text = _fechaDate.ToString(Formato.FormatoFechaNum);
                            _fecha = _fechaDate.ToString(Formato.FormatoFechaNum);
                            CuentaReferencia.Text = _cuentaReferencia.Mask();
                            Alias2d3.Text = _alias;
                            TipoMovimiento2d3.Text = this._tipoMovimiento;

                            Importe2d3.Text = String.Format("{0:N}", Convert.ToDouble(_importe));

                            Deposito1de3.Visibility = Visibility.Collapsed;
                            Deposito2de3.Visibility = Visibility.Visible;
                            Deposito3de3.Visibility = Visibility.Collapsed;
                        }

                    }
                    break;
                case views.DepositoInversion3de3:
                    {
                        _drInversion3de3ViewModel = new DRInversion3de3ViewModel();
                        Descripcion3d3.Text = _descripcion;
                        if (_drInversion3de3ViewModel.createDRInversion3de3ViewModel())
                        {
                            if (_resultado)
                            {

                                Descripcion3d3.Text = _descripcion;
                                FechaOperacion3d3.Text = _drInversion3de3ViewModel.FechaOperacion;
                                HoraOperacion3d3.Text = _drInversion3de3ViewModel.HoraOperacion;
                                CuentaOrigen3d3.Text = _drInversion3de3ViewModel.CuentaOrigen.Mask();
                                CuentaDestino3d3.Text = _drInversion3de3ViewModel.CuentaDestino.Mask();
                                NoReferencia3d3.Text = _drInversion3de3ViewModel.NoReferencia;
                                Importe3d3.Text = String.Format("{0:N}", Convert.ToDouble(_drInversion3de3ViewModel.Importe));
                                Exito.Visibility = Visibility.Visible;
                            }
                            else
                            {

                                Fallo.Visibility = Visibility.Visible;
                                DetalleInversionParams.realoadDetalleInv = false;
                            }
                        }
                        Deposito1de3.Visibility = Visibility.Collapsed;
                        Deposito2de3.Visibility = Visibility.Collapsed;
                        Deposito3de3.Visibility = Visibility.Visible;
                        _navigationBackF = true;

                    }
                    break;
                default:
                    break;
            }
        }
        void _confirmacionDRInversionVistaViewModel_confirmacionInversionRequestCompleted(ClienteEventArgs e)
        {

            if (!e.ErrorCliente)
            {
                if (e.datosBase.clave.Is(Errors.Generic.OK))
                {
                    this._resultado = true;
                    _confirmacionDRInversionVistaViewModel.confirmacionInversionRequestCompleted -= new DRInversion2de3ViewModel.ConfirmacionInversionRequestCompleted(_confirmacionDRInversionVistaViewModel_confirmacionInversionRequestCompleted);
                }
                else
                {
                    switch (e.datosBase.clave)
                    {

                        case Errors.Generic.GBL_03:

                            this.NavigateTo(Views._PanoramaPublicoView);
                            this.App().SesionIniciada = false;
                            break;
                    }
                    MessageBox.Show(e.datosBase.message);
                    this._resultado = false;
                }
            }
            else
            {
                MessageBox.Show(TextosFront.frontMensajeErrorConexion);
                this._resultado = false;
            }
            if (this._resultado)
            {
                this._view = views.DepositoInversion3de3;
                navigated(views.DepositoInversion3de3);
            }
            Progress.Hide();
        }
예제 #17
0
 public void gotoHomeView()
 {
     viewsHistory.Clear();
     currentView = views.view_none;
     gotoView(views.view_home);
 }
예제 #18
0
        private void viewsbutton_Click(object sender, EventArgs e)
        {
            views FL = new views();

            FL.Show();
        }
예제 #19
0
        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            if (null != loadState(viewKey))
            {
                this._currentView = (views)loadState(viewKey);
                navigate(this._currentView);
            }
            FechaOperacion.Text = (string)loadState(fechaKey);
            HoraOperacion.Text = (string)loadState(horaKey);
            ReferenciaOperacion.Text = (string)loadState(referenciaKey);

            fechaOp = NavigationContext.QueryString.ContainsKey("fecha") ? NavigationContext.QueryString["fecha"] : null;
            horaOp = NavigationContext.QueryString.ContainsKey("hora") ? NavigationContext.QueryString["hora"] : null;
            refOp = NavigationContext.QueryString.ContainsKey("referencia") ? NavigationContext.QueryString["referencia"] : null;

            if (null != fechaOp && null != horaOp && null != refOp)
            {
                this._currentView = views.Desbloqueo2de2;
                cabezeraDesbloqueo.Text = string.Empty;
                navigate(this._currentView);
            }

        }
예제 #20
0
 void ActivacionTokenView_Loaded(object sender, RoutedEventArgs e)
 {
     this._view = views.ActivacionToken1de2;
     registroToken1d3.Password = string.Empty;
     registroToken1d3.Focus();
 }
예제 #21
0
        private void navigate(views v)
        {
            switch (v)
            {
                case views.Desbloqueo1de1:
                    Desbloqueo1de2.Visibility = System.Windows.Visibility.Visible;
                    Desbloqueo2de2.Visibility = System.Windows.Visibility.Collapsed;
                    this._currentView = views.Desbloqueo1de1;
                    break;
                case views.Desbloqueo2de2:
                    Desbloqueo1de2.Visibility = System.Windows.Visibility.Collapsed;
                    Desbloqueo2de2.Visibility = System.Windows.Visibility.Visible;

                    String token = NavigationContext.QueryString["tipoToken"];
                    if ("ST".Equals(token)) {
                        desbloqueoTST.Text = TextosPantallas.tDesbloqueoTokenExitoST;
                    }
                    HoraOperacion.Text = horaOp;
                    FechaOperacion.Text = fechaOp;
                    ReferenciaOperacion.Text = refOp;
                    this._currentView = views.Desbloqueo2de2;
                    break;
            }
        }
예제 #22
0
        void _vm_ActivarTokenCompleted(bool resultado, string clave)
        {
            this._vm.ActivarTokenCompleted -= new ActivacionTokenViewModel.ActivacionTokenCompleted(_vm_ActivarTokenCompleted);
            if (resultado)
            {
                switch (clave)
                {
                    case Errors.Generic.OK:
                        this._activacionEstatus = resultado;
                        this._view = views.ActivacionToken2de2;
                        navigate(views.ActivacionToken2de2);
                        (Application.Current as App).EstatusToken = EstatusToken.A;
                        break;
                    case Errors.Generic.GBL_03:
                        this._vm.CerrarSesion();
                        this.NavigateTo(Views._PanoramaPublicoView);
                        this.App().SesionIniciada = false;
                        break;
                    default:

                        break;
                }
            }
            Progress.Hide();
        }
 private void OnLimitesImportes1de3Button_Click(object sender, RoutedEventArgs e)
 {
     if (validarNumero(NuevoLimiteImporte1de3.Text))
     {
         if (validarImporte(NuevoLimiteImporte1de3.Text))
         {
             this._nuevoLimite = NuevoLimiteImporte1de3.Text;
             this._view = views.LimitesImportes2de3;
             navigated(views.LimitesImportes2de3);
         }
     }
     else
     {
         MessageBox.Show(TextosPantallas.tImporteNoValido);
     }
 }
예제 #24
0
 private void navigate(views v)
 {
     switch (v)
     {
         case views.ActivacionToken1de2:
             registroToken1d3.Password = String.Empty;
             ActivacionToken1de3.Visibility = Visibility.Visible;
             ActivacionToken2de3.Visibility = Visibility.Collapsed;
             ActivacionToken3de3.Visibility = Visibility.Collapsed;
             break;
         case views.ActivacionToken2de2:
             if (this._activacionEstatus)
             {
                 Exito.Visibility = Visibility.Visible;
             }
             else
             {
                 Fallo.Visibility = Visibility.Visible;
             }
             ActivacionToken1de3.Visibility = Visibility.Collapsed;
             ActivacionToken2de3.Visibility = Visibility.Collapsed;
             ActivacionToken3de3.Visibility = Visibility.Visible;
             Activar2de3Button.Content = TextosBotones.bFinalizar;
             break;
     }
 }
 void ConfiguracionLimites_BackkeyPress(object sender, System.ComponentModel.CancelEventArgs e)
 {
     if (!e.Cancel)
     {
         if (this._view == views.LimitesImportes3de3)
         {
             e.Cancel = false;
         }
         else if (this._view == views.LimitesImportes2de3)
         {
             this._view = views.LimitesImportes1de3;
             navigated(views.LimitesImportes1de3);
             e.Cancel = true;
         }
         else if (this._view == views.LimitesImportes1de3)
         {
             this._view = views.LimitesImportesMain;
             navigated(views.LimitesImportesMain);
             e.Cancel = true;
         }
     }
     else
     {
         base.OnBackKeyPress(e);
     }
 }
        void CancelacionSupermovilView_Loaded(object sender, RoutedEventArgs e)
        {
            if ((Application.Current as App).SesionIniciada)
            {
                this._view = views.Cancelacion1de3;
                Cancelacion1de3.Visibility = Visibility.Visible;
                Cancelacion2de3.Visibility = Visibility.Collapsed;
                NombreUsuario.Text = this._cancelacionSupermovilViewModel.Nombre;
                this._cancelacion = false;
            }


        }
 private void abbConfigurar_Click(object sender, EventArgs e)
 {
     Progress.Show();
     this._vm.consultarLimitesActuales();
     this._view = views.LimitesImportesMain;
     navigated(this._view);
 }
        void _cancelacionSupermovilViewModel_cancelacionSupermovilCompleted(bool resultado, string clave)
        {
            if (resultado)
            {
                this._cancelacion = true;
                this._referencia = this._cancelacionSupermovilViewModel.Referencia;
            }
            else
            {
                switch (clave)
                {
                    case Errors.Generic.GBL_03:
                        this._cancelacionSupermovilViewModel.CerrarSesion();
                        this.NavigateTo(Views._PanoramaPublicoView);
                        this.App().SesionIniciada = false;
                        break;
                }
            }


            if (this._cancelacion)
            {
                this._view = views.Cancelacion3de3;
                navigate(views.Cancelacion3de3);
            }
            Progress.Hide();
            this._cancelacionSupermovilViewModel.cancelacionSupermovilCompleted -= new CancelacionSupermovilViewModel.CancelacionSupermovilCompleted(_cancelacionSupermovilViewModel_cancelacionSupermovilCompleted);
        }
예제 #29
0
        void BloqueoTokenView_Loaded(object sender, RoutedEventArgs e)
        {
            this._view = views.Desbloqueo1de3;
            String token = NavigationContext.QueryString["tipoToken"];
            TipoToken tipoToken = (TipoToken)Enum.Parse(typeof(TipoToken), token, true);
            if (tipoToken == TipoToken.ST)
            {
                motivosBloqueoList.ItemsSource = motivosBloqueoSoftToken;
                tBloqueoToken.Text = AppResources.ResourceManager.GetString("tMensajeBloqueoToken_2", AppResources.Culture);
            }
            else
            {
                motivosBloqueoList.ItemsSource = motivosBloqueoFisico;
                tBloqueoToken.Text = AppResources.ResourceManager.GetString("tMensajeBloqueoToken", AppResources.Culture);
            }

            motivosBloqueoList.DataBind();
        }
        private void navigate(views v)
        {
            switch (v)
            {
                case views.Cancelacion1de3:
                    NombreUsuario.Text = this._cancelacionSupermovilViewModel.Nombre;
                    this._cancelacion = false;
                    Cancelacion1de3.Visibility = Visibility.Visible;
                    Cancelacion2de3.Visibility = Visibility.Collapsed;


                    break;
                case views.Cancelacion2de3:
                    FechaOperacion2de3.Text = this._fechaActual;
                    Cancelacion1de3.Visibility = Visibility.Collapsed;
                    Cancelacion2de3.Visibility = Visibility.Visible;

                    break;
                case views.Cancelacion3de3:

                    NavigationService.Navigate(new Uri(String.Format(Application.Current.Resources["CancelacionSupermovil3d3View"] as string + "?Cancelacion={0}&Referencia={1}&FechaActual={2}&HoraActual={3}", this._cancelacion, this._referencia, this._fechaActual, this._horaActual), UriKind.Relative));
                    break;
            }
        }
예제 #31
0
        void _bloqueoTokenViewModel_bloqueoTokenCompleted(bool resultado, string clave)
        {
            this._bloqueoRealizado = false;
            if (resultado)
            {
                this._bloqueoRealizado = true;
                this._view = views.Desbloqueo3de3;
                switch (clave)
                {
                    case Errors.Generic.OK:
                        String token = NavigationContext.QueryString["tipoToken"];
                        Debug.WriteLine("TIPO TOKEN BLOQUEO : ", token);
                        if ("TF".Equals(token))
                        {
                            (Application.Current as App).EstatusToken = EstatusToken.B;
                        }
                        else if ("ST".Equals(token))
                        {
                            (Application.Current as App).EstatusSoftToken = EstatusToken.B;
                        }

                        navigate(views.Desbloqueo3de3);

                        break;

                    case Errors.Generic.GBL_03:
                        this._bloqueoTokenViewModel.CerrarSesion();
                        this.NavigateTo(Views._PanoramaPublicoView);
                        this.App().SesionIniciada = false;
                        break;
                }

            }
            Progress.Hide();
            _bloqueoTokenViewModel.bloqueoTokenCompleted -= new BloqueoTokenViewModel.BloqueoTokenCompleted(_bloqueoTokenViewModel_bloqueoTokenCompleted);
        }
 private void OnCancelacion1de3_Button_Click(object sender, RoutedEventArgs e)
 {
     this._fechaActual = (Application.Current as App).fechaActual.fecha;
     this._view = views.Cancelacion2de3;
     navigate(views.Cancelacion2de3);
 }
예제 #33
0
        void BloqueoToken_CancelBackkey(object sender, System.ComponentModel.CancelEventArgs e)
        {
            if (!e.Cancel)
            {

                if (this._view == views.Desbloqueo3de3)
                {
                    e.Cancel = false;
                }
                if (this._view == views.Desbloqueo2de3)
                {
                    this._view = views.Desbloqueo1de3;
                    navigate(views.Desbloqueo1de3);
                    e.Cancel = true;
                }
            }
            else
            {
                base.OnBackKeyPress(e);
            }
        }
        private void OnButton1de3_Click(object sender, RoutedEventArgs e)
        {
            bool validado = false;
            if (!string.IsNullOrEmpty(TxbImporte.Text) && !string.IsNullOrEmpty(TxbDeCuenta.Text))
            {
                if (validarNumero(TxbImporte.Text))
                {
                    _importe = TxbImporte.Text;
                    InversionVistaItemsViewModel itemsIV = null;
                    var cuenta = from item in this._depositoRetiroInversionVistaViewModel.CuentasInversion.ToList() where item.NoCuentaOrigen == _cuentaReferencia select item;

                    foreach (InversionVistaItemsViewModel item in cuenta)
                    {
                        itemsIV = item;
                    }
                    if (itemsIV != null)
                    {
                        _noCuenta = itemsIV.NoCuentaDestino;
                        _cuentaDestino = _noCuenta;
                    }
                    validado = true;
                }
                else
                {
                    validado = false;
                    MessageBox.Show(AppResources.tImporteNoValido);
                }
            }
            else
            {
                validado = false;
                MessageBox.Show(AppResources.tCamposObligatorios);
            }

            if (validado)
            {
                this._view = views.DepositoInversion2de2;
                navigated(views.DepositoInversion2de2);
            }
        }
예제 #35
0
        void OnGUI()
        {
            GUIStyle guiStyle = new GUIStyle();

            guiStyle.fontSize = 20;
            switch (view)
            {
            case views.MainMenu:
                if (GUI.Button(new Rect(Screen.width / 2, Screen.height - 40, 150, 30), "Best Population"))
                {
                    NestBlocks = 0;
                    AliveAnts  = 1000;
                    Awake();
                    GenerateData();
                    GenerateChunks();
                    Camera.main.transform.position = new Vector3(0 / 2, Blocks.GetLength(1), 0);
                    Camera.main.transform.LookAt(new Vector3(Blocks.GetLength(0), 0, Blocks.GetLength(2)));
                    SaveFile s = SaveFile.load();
                    if (s != null)
                    {
                        Debug.Log("Best Population Loaded");
                        GenerateAntsWithSpecifiedStats(s.health_share_chance, s.health_share_with_queen_chance, s.queen_health_share_chance, s.eatChance, s.digChance, s.createNestChance);
                    }
                    else
                    {
                        Debug.Log("Best Population not found");
                        GenerateAnts();
                    }

                    view = views.CurrentPopulation;
                }
                if (GUI.Button(new Rect(Screen.width / 2, Screen.height - 80, 150, 30), "Train"))
                {
                    view   = views.Train;
                    Active = true;
                    StartCoroutine(Train());
                }
                break;

            case views.CurrentPopulation:
                string a = "Alive Ants " + AliveAnts;
                string b = "Nest Blocks " + NestBlocks;
                GUI.Label(new Rect(10, 10, 150, 20), a);
                GUI.Label(new Rect(Screen.width - 200, 10, 150, 20), b);
                if (GUI.Button(new Rect(Screen.width / 2, Screen.height - 40, 150, 30), "MainMenu"))
                {
                    Active = false;
                    try
                    {
                        clearWorld();
                    }
                    catch
                    {
                    }
                    view = views.MainMenu;
                }
                break;

            case views.Train:
                string a2 = "Alive Ants " + AliveAnts;
                string b2 = "Nest Blocks " + NestBlocks;
                string c  = "Iteration " + Iteration;
                string d  = "Individual " + individual;
                GUI.Label(new Rect(10, 10, 150, 20), a2);
                GUI.Label(new Rect(Screen.width - 200, 10, 150, 20), b2);
                GUI.Label(new Rect(10, 50, 150, 20), c);
                GUI.Label(new Rect(Screen.width - 200, 50, 150, 20), d);
                if (GUI.Button(new Rect(Screen.width / 2, Screen.height - 40, 150, 30), "MainMenu"))
                {
                    Active = false;
                    try
                    {
                        clearWorld();
                    }
                    catch
                    {
                    }

                    view = views.MainMenu;
                }
                break;
            }
        }
 private void OnConfiguracionListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (ConfiguracionLimitesListBox.SelectedIndex >= 0)
     {
         _limite = (limitesConfigurar)ConfiguracionLimitesListBox.SelectedIndex;
         this._view = views.LimitesImportes1de3;
         navigated(views.LimitesImportes1de3);
     }
     ConfiguracionLimitesListBox.SelectedIndex = -1;
 }
예제 #37
0
 private void menuConsultaSaldos_Click(object sender, EventArgs e)
 {
     this.NavigateTo(Views._PanoramaPrivadoView);
     this._currentView = views.Desbloqueo1de1;
 }
        private void navigated(views v)
        {
            LimitesImportesEstatus3de3.Visibility = Visibility.Collapsed;
            switch (v)
            {
                case views.LimitesImportesMain:
                    LimitesImportes.Visibility = Visibility.Visible;
                    LimitesImportes1de3.Visibility = Visibility.Collapsed;
                    LimitesImportes2de3.Visibility = Visibility.Collapsed;
                    LimitesImportes3de3.Visibility = Visibility.Collapsed;
                    w2_3_ST.Visibility = System.Windows.Visibility.Collapsed;
                    (ApplicationBar.Buttons[0] as Microsoft.Phone.Shell.ApplicationBarIconButton).IsEnabled = false;
                    break;

                case views.LimitesImportes1de3:
                    NuevoLimiteImporte1de3.Text = String.Empty;
                    this._nuevoLimite = String.Empty;
                    switch (this._limite)
                    {
                        case limitesConfigurar.tranf3ros:
                            TipoTransaccion1de3.Text = TextosPantallas.tTransferenciaTerceros;
                            LimiteActual1de3.Text = this._vm.LimitesActuales.limiteImporte_transf3rosMismoBanco + TextosPantallas.tDivisaMXP;
                            LimiteDelBanco1de3.Text = this._vm.LimitesActuales.limiteBanco_transf3rosMismoBanco + TextosPantallas.tDivisaMXP;
                            break;

                        case limitesConfigurar.transfInterbancaria:
                            TipoTransaccion1de3.Text = TextosPantallas.tTransferenciaInterbancaria;
                            LimiteActual1de3.Text = this._vm.LimitesActuales.limiteImporte_transfInterbancaria + TextosPantallas.tDivisaMXP;
                            LimiteDelBanco1de3.Text = this._vm.LimitesActuales.limiteBanco_transfInterbancaria + TextosPantallas.tDivisaMXP;
                            break;

                        case limitesConfigurar.pagoServicios:
                            TipoTransaccion1de3.Text = TextosPantallas.tPagoServicios;
                            LimiteActual1de3.Text = this._vm.LimitesActuales.limiteImporte_pagoServicios + TextosPantallas.tDivisaMXP;
                            LimiteDelBanco1de3.Text = this._vm.LimitesActuales.limiteBanco_pagoServicios + TextosPantallas.tDivisaMXP;
                            break;
                    }
                    LimitesImportes.Visibility = Visibility.Collapsed;
                    LimitesImportes1de3.Visibility = Visibility.Visible;
                    LimitesImportes2de3.Visibility = Visibility.Collapsed;
                    LimitesImportes3de3.Visibility = Visibility.Collapsed;
                    w2_3_ST.Visibility = System.Windows.Visibility.Collapsed;

                    break;

                case views.LimitesImportes2de3:
                    switch (this._limite)
                    {
                        case limitesConfigurar.tranf3ros:
                            TipoTransaccion2de3.Text = TextosPantallas.tTransferenciaTerceros;
                            LimiteActual2de3.Text = this._vm.LimitesActuales.limiteImporte_transf3rosMismoBanco + TextosPantallas.tDivisaMXP;
                            LimiteDelBanco2de3.Text = this._vm.LimitesActuales.limiteBanco_transf3rosMismoBanco + TextosPantallas.tDivisaMXP;
                            break;

                        case limitesConfigurar.transfInterbancaria:
                            TipoTransaccion2de3.Text = TextosPantallas.tTransferenciaInterbancaria;
                            LimiteActual2de3.Text = this._vm.LimitesActuales.limiteImporte_transfInterbancaria + TextosPantallas.tDivisaMXP;
                            LimiteDelBanco2de3.Text = this._vm.LimitesActuales.limiteBanco_transfInterbancaria + TextosPantallas.tDivisaMXP;
                            break;

                        case limitesConfigurar.pagoServicios:
                            TipoTransaccion2de3.Text = TextosPantallas.tPagoServicios;
                            LimiteActual2de3.Text = this._vm.LimitesActuales.limiteImporte_pagoServicios + TextosPantallas.tDivisaMXP;
                            LimiteDelBanco2de3.Text = this._vm.LimitesActuales.limiteBanco_pagoServicios + TextosPantallas.tDivisaMXP;
                            break;

                    }
                    Resultado res = CasosDeUso.getResultado((App.Current as App).matrix, CasosDeUso.CONFIGURACION_LIMITE_IMPORTES.codigoCU, (int)(App.Current as App).EstatusToken, (int)(App.Current as App).EstatusSoftToken);
                    if (!("TF".Equals(res.token))){
                        TokenManager.obtenerCore();
                        String error = TokenManager.coreInicializadoCorrecto();
                        if ("".Equals(error))
                        {
                            tLeyendaJuridicoSuperToken.Text = TextosPantallas.tLeyendaJuridicoSuperToken + TextosBotones.bConfirmar;
                            w2_3_ST.Margin = new Thickness(0, 189, 0, 0); //Modifica las dimenciones de objeto
                            w2_3_ST.Visibility = System.Windows.Visibility.Visible;
                        }                        
                    }
                    NuevoLimite2de3.Text = NuevoLimiteImporte1de3.Text + TextosPantallas.tDivisaMXP;
                    LimitesImportes.Visibility = Visibility.Collapsed;
                    LimitesImportes1de3.Visibility = Visibility.Collapsed;
                    LimitesImportes2de3.Visibility = Visibility.Visible;
                    LimitesImportes3de3.Visibility = Visibility.Collapsed;

                    break;

                case views.LimitesImportes3de3:
                    switch (this._limite)
                    {
                        case limitesConfigurar.tranf3ros:
                            TipoTransaccion3de3.Text = TextosPantallas.tTransferenciaTerceros;
                            LimiteActual3de3.Text = this._vm.LimitesActuales.limiteImporte_transf3rosMismoBanco + TextosPantallas.tDivisaMXP;
                            LimiteDelBanco3de3.Text = this._vm.LimitesActuales.limiteBanco_transf3rosMismoBanco + TextosPantallas.tDivisaMXP;
                            this._configurados = this._vm.LimitesActualizados[0].result;
                            FechaAplicacion3de3.Text = this._vm.LimitesActualizados[0].fechaAplicacion;
                            break;

                        case limitesConfigurar.transfInterbancaria:
                            TipoTransaccion3de3.Text = TextosPantallas.tTransferenciaInterbancaria;
                            LimiteActual3de3.Text = this._vm.LimitesActuales.limiteImporte_transfInterbancaria + TextosPantallas.tDivisaMXP;
                            LimiteDelBanco3de3.Text = this._vm.LimitesActuales.limiteBanco_transfInterbancaria + TextosPantallas.tDivisaMXP;
                            this._configurados = this._vm.LimitesActualizados[0].result;
                            FechaAplicacion3de3.Text = this._vm.LimitesActualizados[0].fechaAplicacion;
                            break;

                        case limitesConfigurar.pagoServicios:
                            TipoTransaccion3de3.Text = TextosPantallas.tPagoServicios;
                            LimiteActual3de3.Text = this._vm.LimitesActuales.limiteImporte_pagoServicios + TextosPantallas.tDivisaMXP;
                            LimiteDelBanco3de3.Text = this._vm.LimitesActuales.limiteBanco_pagoServicios + TextosPantallas.tDivisaMXP;
                            this._configurados = this._vm.LimitesActualizados[0].result;
                            FechaAplicacion3de3.Text = this._vm.LimitesActualizados[0].fechaAplicacion;
                            break;

                    }
                    NuevoLimite3de3.Text = this._nuevoLimite + TextosPantallas.tDivisaMXP;
                    if (this._configurados)
                    {
                        Exito.Visibility = Visibility.Visible;

                        LimitesImportes3de3.Visibility = Visibility.Visible;
                    }
                    else
                    {
                        Fallo.Visibility = Visibility.Visible;
                        LimitesImportes3de3.Visibility = Visibility.Collapsed;
                    }
                    LimitesImportesEstatus3de3.Visibility = Visibility.Visible;
                    LimitesImportes.Visibility = Visibility.Collapsed;
                    LimitesImportes1de3.Visibility = Visibility.Collapsed;
                    LimitesImportes2de3.Visibility = Visibility.Collapsed;
                    w2_3_ST.Visibility = System.Windows.Visibility.Collapsed;

                    (ApplicationBar.Buttons[0] as Microsoft.Phone.Shell.ApplicationBarIconButton).IsEnabled = true;
                    break;

            }
        }
        protected override void OnBackKeyPress(System.ComponentModel.CancelEventArgs e)
        {


            if (!e.Cancel && this._view != views.Cancelacion1de3)
            {

                if (this._view == views.Cancelacion2de3)
                {
                    this._view = views.Cancelacion1de3;
                    navigate(views.Cancelacion1de3);
                    e.Cancel = true;
                }

            }
            else
            {
                base.OnBackKeyPress(e);
            }




        }
        private void OnButton2de3_Click(object sender, RoutedEventArgs e)
        {

#if OFFLINE       
                  _importe = string.Format("{0:.00}", Convert.ToDouble(_importe));
                  _confirmacionDRInversionVistaViewModel.confirmaOperacionInversion(_cuentaReferencia, _cuentaDestino, _claveTipoMovimiento,_importe, _fecha);
                  this._resultado = true;
                  this._view = views.DepositoInversion3de3;
                  navigated(views.DepositoInversion3de3);
#else
            Progress.Show();
            _importe = string.Format("{0:.00}", Convert.ToDouble(_importe));
            _confirmacionDRInversionVistaViewModel.confirmaOperacionInversion(_cuentaReferencia, _cuentaDestino, _claveTipoMovimiento, _importe, _fecha);
#endif
        }