예제 #1
0
 private void DisposeCalEventViewController()
 {
     if (_editCalEventController != null)
     {
         _editCalEventController.DismissViewController(true, null);
         _editCalEventController.EditViewDelegate = null;
         _editCalEventController.Dispose();
         _editCalEventController = null;
     }
 }
예제 #2
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);
            }
        }
예제 #3
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;
                }
            }