Exemplo n.º 1
0
        protected override async void OnAppearing()
        {
            base.OnAppearing();

            model.State       = ModelState.Loading;
            model.LoadingText = AppResources.RackCardPage_LoadingText;
            await model.LoadBins();

            await model.LoadUDF();
        }
        protected override async void OnAppearing()
        {
            base.OnAppearing();

            model.State       = ModelState.Loading;
            model.LoadingText = AppResources.RackCardPage_LoadingText;
            MessagingCenter.Subscribe <BinsViewModel>(this, "BinsIsLoaded", BinsIsLoaded);
            MessagingCenter.Subscribe <BinViewModel>(this, "BinsViewModel.BinSelected", BinSelected);

            await model.LoadBins();

            await model.LoadUDF();

            await model.LoadBinValues();

            model.State = ModelState.Normal;
        }
        private async void RackList_SelectedItemChanged(object sender, EventArgs e)
        {
            RackViewModel rvm = (RackViewModel)sender;

            if (rvm != model)
            {
                RackViewModel lastrvm = model;
                model.IsSelected = false;
                model            = rvm;
                BindingContext   = model;
                lastrvm.BinsViewModel.BinViewModelsDispose();
                model.IsSelected  = true;
                model.State       = ModelState.Loading;
                model.LoadingText = AppResources.RackCardPage_LoadingText;
                Title             = AppResources.RackCardPage_Title + " " + model.No;
                await model.LoadBins();

                await model.LoadUDF();

                await model.LoadBinValues();

                await model.LoadBinImages();
            }
        }