// Display notofication after successfull adding to calendar
            public override void Completed(EKEventEditViewController controller, EKEventEditViewAction action)
            {
                eventController.DismissViewController(true, null);

                if (action == EKEventEditViewAction.Saved)
                {
                    AppNotifications.Display(new DisplayedPromptsModel()
                    {
                        Category = "", Task = "Task has been successfully scheduled"
                    });
                }
            }
Esempio n. 2
0
        public override void Completed(EKEventEditViewController controller, EKEventEditViewAction action)
        {
            switch (action)
            {
            case EKEventEditViewAction.Canceled:
                if (_viewModel.CancelEventCommand.CanExecute(null))
                {
                    _viewModel.CancelEventCommand.Execute(null);
                }
                break;

            case EKEventEditViewAction.Saved:
                if (_viewModel.SaveEventCommand.CanExecute(null))
                {
                    _viewModel.SaveEventCommand.Execute(null);
                }
                break;
            }
        }
Esempio n. 3
0
        // completed is called when a user eith
        public override void Completed(EKEventEditViewController controller, EKEventEditViewAction action)
        {
            _eventController.DismissViewController(true, null);
            switch (action)
            {
            case EKEventEditViewAction.Canceled:
                _success = false;
                break;

            case EKEventEditViewAction.Saved:
                _success = true;
                break;

            case EKEventEditViewAction.Deleted:
                _success = false;
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(action), action, null);
            }
        }
Esempio n. 4
0
            // completed is called when a user eith
            public override void Completed(MonoTouch.EventKitUI.EKEventEditViewController controller, EKEventEditViewAction action)
            {
                eventController.DismissViewController (true, null);

                // action tells you what the user did in the dialog, so you can optionally
                // do things based on what their action was. additionally, you can get the
                // Event from the controller.Event property, so for instance, you could
                // modify the event and then resave if you'd like.
                switch ( action ) {

                   case EKEventEditViewAction.Canceled:
                  break;
                   case EKEventEditViewAction.Deleted:
                  break;
                   case EKEventEditViewAction.Saved:
                  // if you wanted to modify the event you could do so here, and then
                  // save:
                  //App.Current.EventStore.SaveEvent ( controller.Event, )
                  break;
                }
            }
            // completed is called when a user eith
            public override void Completed(MonoTouch.EventKitUI.EKEventEditViewController controller, EKEventEditViewAction action)
            {
                eventController.DismissViewController(true, null);

                // action tells you what the user did in the dialog, so you can optionally
                // do things based on what their action was. additionally, you can get the
                // Event from the controller.Event property, so for instance, you could
                // modify the event and then resave if you'd like.
                switch (action)
                {
                case EKEventEditViewAction.Canceled:
                    break;

                case EKEventEditViewAction.Deleted:
                    break;

                case EKEventEditViewAction.Saved:
                    // if you wanted to modify the event you could do so here, and then
                    // save:
                    //App.Current.EventStore.SaveEvent ( controller.Event, )
                    break;
                }
            }
Esempio n. 6
0
            /// <Docs>To be added.</Docs>
            /// <summary>
            /// Completion Handler
            /// </summary>
            /// <param name="controller">Controller.</param>
            /// <param name="action">Action.</param>
            public override void Completed(MonoTouch.EventKitUI.EKEventEditViewController controller, EKEventEditViewAction action)
            {
                if (mDatasource.PopController != null)
                {
                    mDatasource.PopController.Dismiss(true);
                    mDatasource.PopController = null;

                    mDatasource.ClearViews();
                }
                else
                {
                    eventController.DismissViewController(true, null);
                }


                switch (action)
                {
                case EKEventEditViewAction.Canceled:
                    break;

                case EKEventEditViewAction.Deleted:
                {
                    //reload the calendar view
                    mCalendarView.ReloadData();
                }
                break;

                case EKEventEditViewAction.Saved:
                {
                    NSError e;
                    eventController.EventStore.SaveEvent(controller.Event, EKSpan.ThisEvent, out e);

                    //reload the calendar view
                    mCalendarView.ReloadData();
                }
                break;
                }
            }
Esempio n. 7
0
        public override void Completed(EKEventEditViewController controller, EKEventEditViewAction action)
        {
            switch (action)
            {
                case EKEventEditViewAction.Canceled:
                {
                    BackToParentController();
                    break;
                }

                case EKEventEditViewAction.Saved:
                {
                    BackToParentController();
                    NSError e;
                    EventSingleton.Current.EventStore.SaveEvent(_parentController.Event, EKSpan.ThisEvent, out e);
                    break;
                }
            }
        }
Esempio n. 8
0
        // completed is called when a user eith
        public override void Completed(EventKitUI.EKEventEditViewController controller, EKEventEditViewAction action)
        {
            eventController.DismissViewController(true, null);

            switch (action)
            {
            case EKEventEditViewAction.Canceled:
                break;

            case EKEventEditViewAction.Deleted:
                break;

            case EKEventEditViewAction.Saved:
                NSError error;
                eventStore.SaveEvent(controller.Event, EKSpan.ThisEvent, out error);
                break;
            }
        }