private void OnActionButtonTouchUpInside (object sender, EventArgs e)
        {
            if (currentTimeEntry == null) {
                currentTimeEntry = TimeEntryModel.GetDraft ();
                currentTimeEntry.Start ();

                var controllers = new List<UIViewController> (parentController.NavigationController.ViewControllers);
                controllers.Add (new EditTimeEntryViewController (currentTimeEntry));
                if (ServiceContainer.Resolve<SettingsStore> ().ChooseProjectForNew) {
                    controllers.Add (new ProjectSelectionViewController (currentTimeEntry));
                }
                parentController.NavigationController.SetViewControllers (controllers.ToArray (), true);
            } else {
                currentTimeEntry.Stop ();
            }
        }
Exemplo n.º 2
0
        private void OnActionButtonTouchUpInside(object sender, EventArgs e)
        {
            if (currentTimeEntry == null)
            {
                currentTimeEntry = TimeEntryModel.GetDraft();
                currentTimeEntry.Start();

                var controllers = new List <UIViewController> (parentController.NavigationController.ViewControllers);
                controllers.Add(new EditTimeEntryViewController(currentTimeEntry));
                if (ServiceContainer.Resolve <SettingsStore> ().ChooseProjectForNew)
                {
                    controllers.Add(new ProjectSelectionViewController(currentTimeEntry));
                }
                parentController.NavigationController.SetViewControllers(controllers.ToArray(), true);
            }
            else
            {
                currentTimeEntry.Stop();
            }
        }