Exemplo n.º 1
0
        public void OnNavigatingTo(NavigationParameters parameters)
        {
            var selectedTab = parameters?.GetValue <string>(KnownNavigationParameters.SelectedTab);

            foreach (var child in Children)
            {
                var element = child;
                if (element is NavigationPage navigationPage)
                {
                    //if the child page is a navigation page get its root page
                    element = navigationPage.RootPage;
                }

                (element as INavigatingAware)?.OnNavigatingTo(parameters);
                (element?.BindingContext as ViewModelBase)?.OnNavigatingTo(parameters);

                if (!string.IsNullOrWhiteSpace(selectedTab))
                {
                    if (element.GetType() == PageNavigationRegistry.GetPageType(selectedTab))
                    {
                        this.CurrentPage = child;
                    }
                }
            }
        }
Exemplo n.º 2
0
        public override void OnNavigatedTo(NavigationParameters parameters)
        {
            IsBusy = true;
            switch (parameters.GetNavigationMode())
            {
            case NavigationMode.Back:
                if (parameters.ContainsKey("todoItem"))
                {
                    TodoItems.Add(parameters.GetValue <TodoItem>("todoItem"));
                }
                break;

            case NavigationMode.New:
                TodoItems.AddRange(parameters.GetValues <string>("todo")
                                   .Select(n => new TodoItem {
                    Name = n
                }));
                break;
            }
            IsBusy = false;
        }
Exemplo n.º 3
0
        public override void OnNavigatingTo(NavigationParameters parameters)
        {
            card = parameters.GetValue <DataCardModel>(string.Empty);
            VPCRequest conn = new VPCRequest();

            conn.AddDigitalOrderField("vpc_Version", SADM.Settings.AppConfiguration.Values.vpc_Version);
            conn.AddDigitalOrderField("vpc_Command", SADM.Settings.AppConfiguration.Values.vpc_Command);
            conn.AddDigitalOrderField("vpc_AccessCode", SADM.Settings.AppConfiguration.Values.vpc_AccessCode);
            conn.AddDigitalOrderField("vpc_Merchant", SADM.Settings.AppConfiguration.Values.vpc_Merchant);
            conn.AddDigitalOrderField("vpc_ReturnURL", "http://localhost:8080/api/");
            conn.AddDigitalOrderField("vpc_MerchTxnRef", "PruebaRfId2529");
            conn.AddDigitalOrderField("vpc_OrderInfo", "2529");
            conn.AddDigitalOrderField("vpc_Amount", (card.Amount * 100).ToString());
            conn.AddDigitalOrderField("vpc_Currency", SADM.Settings.AppConfiguration.Values.vpc_Currency);
            //conn.AddDigitalOrderField("vpc_CustomPaymentPlanPlanId", vpc_CustomPaymentPlanPlanId.Text);
            conn.AddDigitalOrderField("vpc_Locale", SADM.Settings.AppConfiguration.Values.vpc_Locale);
            // Perform the transaction
            string url = conn.Create3PartyQueryString();

            url    = "https://banamex.dialectpayments.com/vpcpay" + url;
            UrlWeb = url;
        }
Exemplo n.º 4
0
        public void OnNavigatedTo(NavigationParameters parameters)
        {
            MobileCenterService.TrackEvent(GetType().Name, "NavigatedTo");

            try
            {
                NavigationMode navigationMode = parameters.GetValue <NavigationMode>("NavigationMode");

                if (navigationMode == NavigationMode.Back)
                {
                    connection.Dispose();

                    // Make sure everything is clean
                    SettingsService.Clean();

                    //GC.Collect();
                }
            }
            catch (Exception e)
            {
                Debug.WriteLine(e);
            }
        }
Exemplo n.º 5
0
        public override void OnNavigatedTo(NavigationParameters parameters)
        {
            IsBusy = true;
            switch (parameters.GetNavigationMode())
            {
            case NavigationMode.Back:
                if (parameters.ContainsKey("pacienteItem"))
                {
                    Paciente paciente = parameters.GetValue <Paciente>("pacienteItem");
                    if (_pacienteService.SaveOrUpdate(paciente) > 0)
                    {
                        Pacientes.Add(paciente);
                    }
                }
                break;

            case NavigationMode.New:
                //Medicos.AddRange(parameters.GetValues<string>("medico").Select(n => new Medico { Nome = n }));
                Pacientes.AddRange(_pacienteService.GetAll());
                break;
            }
            IsBusy = false;
        }
        public void OnNavigatingTo(NavigationParameters parameters)
        {
            var pageName = parameters.GetValue <string>("SelectedPage");

            switch (pageName)
            {
            case "Settings":
                CurrentTab = 0;
                break;

            case "Cases":
                CurrentTab = 1;
                break;

            case "About":
                CurrentTab = 2;
                break;

            default:
                CurrentTab = 1;
                break;
            }
        }
Exemplo n.º 7
0
 public void OnNavigatingTo(NavigationParameters parameters)
 {
     WriteLine($"{Title} OnNavigatingTo");
     Message = parameters.GetValue <string>("message");
     WriteLine($"Parameters: {Message}");
 }
 public void OnNavigate(NavigationParameters navigationParameters)
 {
     Usuario = navigationParameters.GetValue <MobileServiceUser>(nameof(Parametros.Usuario));
 }
Exemplo n.º 9
0
        public override void OnNavigatedTo(NavigationParameters parameters)
#endif
        {
            IsBusy = true;
            switch (parameters.GetNavigationMode())
            {
            case NavigationMode.Back:
#if (UseAzureMobileClient)
    #if (UseMvvmHelpers)
                TodoItems.ReplaceRange(await _dataContext.TodoItems.ReadAllItemsAsync());
    #else
                Todoitems.Clear();
                foreach (var item in await _dataContext.TodoItems.ReadAllItemsAsync())
                {
                    TodoItems.Add(item);
                }
    #endif
#elseif (UseRealm)
                // Do anything you want to do only when Navigating Back to the View
#else
                if (parameters.ContainsKey("todoItem"))
                {
                    TodoItems.Add(parameters.GetValue <TodoItem>("todoItem"));
                }
#endif
                break;

            case NavigationMode.New:
#if (UseAzureMobileClient)
    #if (UsesAuthentication)
                await _cloudService.LoginAsync();
    #endif
    #if (UseMvvmHelpers)
                TodoItems.AddRange(await _dataContext.TodoItems.ReadAllItemsAsync());
    #else
                foreach (var item in await _dataContext.TodoItems.ReadAllItemsAsync())
                {
                    TodoItems.Add(item);
                }
    #endif
#elseif (UseRealm)
                TodoItems = _realm.All <TodoItem>();
#else
    #if (UseMvvmHelpers)
                TodoItems.AddRange(parameters.GetValues <string>("todo")
                                   .Select(n => new TodoItem {
                    Name = n
                }));
    #else
                foreach (var item in parameters.GetValues <string>("todo"))
                {
                    TodoItems.Add(new TodoItem()
                    {
                        Name = item
                    });
                }
    #endif
#endif
                break;
            }
            IsBusy = false;
        }
 public void OnNavigatingTo(NavigationParameters parameters)
 {
     _wizardController = parameters.GetValue <IWizardController>("IWizardController");
     _pageNumber       = parameters.GetValue <int>("PageNumber");
 }
 public override void OnNavigatingTo(NavigationParameters parameters)
 {
     _isNew = parameters.GetValue <bool>("new");
     Model  = parameters.GetValue <TodoItem>("todoItem");
 }
        public async override void OnNavigatedTo(NavigationParameters parameters)
        {
            var res = await VersionInfoService.GetVersionInfoAsync(parameters.GetValue <Guid>("Id"), CancellationToken.None);

            CurrentVersion = res.ToFullVersionInfoModel();
        }
Exemplo n.º 13
0
 public override void OnNavigatedTo(NavigationParameters navigationParams)
 {
     dateTimeTapped = navigationParams.GetValue <DateTime>("dateTime");
     SyncSchedules();
 }
Exemplo n.º 14
0
        public override void OnNavigatedTo(NavigationParameters navigationParams)
        {
            DateTime dateTimeTapped = navigationParams.GetValue <DateTime>("dateTime");

            Schedule.DateTime = dateTimeTapped;
        }
Exemplo n.º 15
0
 public void OnNavigatedTo(NavigationParameters parameters)
 {
     Item = parameters.GetValue <Product>("Item");
 }
Exemplo n.º 16
0
 public override void OnNavigatedTo(NavigationParameters parameters)
 {
     Message = parameters.GetValue <string>("message");
 }
Exemplo n.º 17
0
 public void OnNavigate(NavigationParameters navigationParameters)
 {
     Product = navigationParameters.GetValue <Model.Product>("product");
     Title   = Product.Name;
 }
 public override void OnNavigatingTo(NavigationParameters parameters)
 {
     _isNew = parameters.GetValue <bool>("new");
     Model  = parameters.GetValue <Paciente>("pacienteItem");
 }
Exemplo n.º 19
0
 public override void OnNavigatedTo(NavigationParameters navigationParams)
 {
     serviceTapped = navigationParams.GetValue <BarberService>("serviceTapped");
     dayTapped     = navigationParams.GetValue <BarberDay>("dayTapped");
 }
 public override void OnNavigatingTo(NavigationParameters parameters)
 {
     // TODO: Get the Brewer from the Navigation Parameters and Add/Replace the Beers
     Beers.ReplaceRange(parameters.GetValue <Brewer>("brewer").Beers);
 }
 public override void OnNavigatedTo(NavigationParameters parameters)
 {
     Context   = parameters.GetValue <ActivityDay>(ActivityDay.Tag);
     Imputed   = Context.Imputed;
     Deviation = Context.Deviation;
 }
 public override void OnNavigatingTo(NavigationParameters parameters)
 {
     base.OnNavigatedTo(parameters);
     Event = parameters.GetValue <Models.Event>("Event");
 }
Exemplo n.º 23
0
 public override void OnNavigatedTo(NavigationParameters parameters)
 {
     Context = parameters.GetValue <ActivityDay>(ActivityDay.Tag);
 }
Exemplo n.º 24
0
 public void OnNavigatedTo(NavigationParameters parameters)
 {
     Title = parameters.GetValue <string>("title");
 }
Exemplo n.º 25
0
 public override void OnNavigatingTo(NavigationParameters parameters)
 {
     Model = parameters.GetValue <Beer>("beer");
 }
Exemplo n.º 26
0
 public override void OnNavigatingTo(NavigationParameters parameters)
 {
     base.OnNavigatingTo(parameters);
     this.adapter = parameters.GetValue <IAdapter>("adapter");
 }
Exemplo n.º 27
0
 public void OnNavigatedFrom(NavigationParameters parameters)
 {
     parameters.Add("message", $"Hello from {GetType().Name}");
     WriteLine($"{Title} OnNavigatedFrom");
     WriteLine($"Parameters: {parameters.GetValue<string>("message")}");
 }
Exemplo n.º 28
0
 public async void OnNavigatingTo(NavigationParameters parameters)
 {
     Movie = parameters.GetValue <Movie>("movie");
     Title = Movie.Title;
     await LoadMovieDetailAsync(Movie.Id).ConfigureAwait(false);
 }
 public override void OnNavigatingTo(NavigationParameters parameters)
 {
     Model = parameters.GetValue <TodoItem>("item") ?? new TodoItem();
 }
Exemplo n.º 30
0
 public override void OnNavigatedTo(NavigationParameters parameters)
 {
     Model.Match = parameters.GetValue <MatchOutputDto>(Parameters.Match);
 }