예제 #1
0
 public VwChooseDefaultUomPage(VmChooseMultiUom vmChooseMultiUom, bool isModal)
 {
     _vmChooseMultiUom = vmChooseMultiUom;
     IsModal           = isModal;
     InitializeComponent();
     BindingContext = vmChooseMultiUom;
 }
        // -----------------------------
        public async Task <Tuple </*Cancelled?*/ bool, UOMSet, IList <KnownUOM> > > ShowChooseDefaultUom(ContentManager contentManager,
                                                                                                         IList <UOMSet> uomSets, int uomSetSelectedIndex, IList <KnownUOM> uomSelections)
        {
            VmChooseMultiUom       vm = new VmChooseMultiUom(contentManager, this, uomSets, uomSetSelectedIndex, uomSelections);
            VwChooseDefaultUomPage vw = new VwChooseDefaultUomPage(vm, isModal: true);

            await Navigation.PushModalAsync(vw);

            await vw.PageClosedTask; // Wait here until the Page is dismissed

            IList <KnownUOM> chosenUoms = vm.UomSelections;

            return(new Tuple <bool, UOMSet, IList <KnownUOM> >(vm.SelectionCancelled, vm.SelectedUomSet, chosenUoms));
        }