Exemplo n.º 1
0
        private void OpenPageIfNeeded()
        {
            if (!App.MainSession.Initialized)
            {
                /* Device.BeginInvokeOnMainThread(() =>
                 * {
                 *   var page = new IntroPage(App.MainSession.GetAllWashingDays(), App.BL, mAlarmController);
                 *   page.PageClosed += IntroPage_Closed;
                 *   Navigation.PushAsync(page, true);
                 * });
                 * return;*/
            }

            if (!String.IsNullOrEmpty(App.washdayToShow))
            {
                var day        = App.MainSession.GetWashingDayById(App.washdayToShow);
                var contr      = new WashingDayEditorController(day, App.MainSession.GetAllDefinitions(), mAlarmController);
                var wdInstance = contr.GetWashingDayInstance(ScheduleController.GetToday());
                App.washdayToShow = String.Empty;

                Device.BeginInvokeOnMainThread(() => {
                    Navigation.PushAsync(new WashDayInstance(day, wdInstance, mHairBl), true);
                });
                ;
            }

            Device.BeginInvokeOnMainThread(() => {
                //var helpController = new Controller.HelpController();
                //helpController.Add("Foo", "Des", "Tooltip", mAddCareDayButton);
                //var diaog = new HelpPage(helpController);
                // Open a PopupPage
                //Navigation.PushPopupAsync(diaog);
            });
        }