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 ();
            }
        }
예제 #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();
            }
        }