protected override bool OnBackButtonPressed()
        {
            var ret = base.OnBackButtonPressed();

            if (ret)
            {
                return(true);
            }

            //if (ModalViewControllerFunc.HasOpenModalWindow())
            //{
            //	var currentModalWindow = ModalViewControllerFunc.GetLastModalWindow();
            //	SysFunc.RequestMainThread(async () =>
            //	{
            //		await (currentModalWindow as IModalViewServiceSupport2).OpenerModalService.ModalWindowCloseWithReturn(false);
            //	});
            //	return true;
            //}

            SysFunc.RequestMainThread(async() =>
            {
                await NavFunc.Pop();
            });
            return(true);
        }
Beispiel #2
0
        static public async void InitializeRootPage(bool animated)
        {
            //var vmodel = new UserOrderViewModel { OrderRowId = new Guid("b1cbeb1c-a2a8-4bb4-9d32-177d91bf73ec") }; await NavFunc.NavigateToAsync(vmodel); return;
            //if (U.IsDebug) UserOptions.Reset();
            //var vmodel = new ChangePasswordViewModel(); await NavFunc.NavigateToAsync(vmodel); return;
            //var vmodel = new OrderPatientListViewModel { OrderRowId = new Guid("b1cbeb1c-a2a8-4bb4-9d32-177d91bf73ec") }; await NavFunc.NavigateToAsync(vmodel); return;

            U.RequestMainThread(async() =>
            {
                await Task.Yield();
                //await Task.Delay(2000);

                if (await LoginViewModel.Logging())
                {
                    var viewModel = new UserOrderListViewModel();
                    await NavFunc.NavigateToAsync(viewModel);
                }
                else
                {
                    var viewModel = new LoginViewModel();
                    await NavFunc.NavigateToAsync(viewModel);
                }
            });
        }