// completed is called when a user eith public override void Completed (EventKitUI.EKEventEditViewController controller, EventKitUI.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 EventKitUI.EKEventEditViewAction.Canceled: break; case EventKitUI.EKEventEditViewAction.Deleted: break; case EventKitUI.EKEventEditViewAction.Saved: // if you wanted to modify the event you could do so here, and then // save: //App.Current.EventStore.SaveEvent ( controller.Event, ) break; } }
public CreateEventEditViewDelegate (EventKitUI.EKEventEditViewController eventController) { // save our controller reference this.eventController = eventController; }
// completed is called when a user eith public async override void Completed (EventKitUI.EKEventEditViewController controller, EventKitUI.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 EventKitUI.EKEventEditViewAction.Canceled: ItemLH = null; ItemLT = null; isUpdate = false; break; case EventKitUI.EKEventEditViewAction.Deleted: BRemind.RemoveRemind (SQLite_iOS.GetConnection (), controller.Event.EventIdentifier); if (VCLichHoc.instance != null) VCLichHoc.Instance.LoadData (); if (VCLichHocTuan.instance != null) VCLichHocTuan.Instance.LoadData_Tuan (VCLichHocTuan.LoadedDate); if (VCLichThi.instance != null) VCLichThi.Instance.LoadData (); break; case EventKitUI.EKEventEditViewAction.Saved: // if you wanted to modify the event you could do so here, and then // save: //App.Current.EventStore.SaveEvent ( controller.Event, ) if (ItemLH != null) { ItemLH.EventID = controller.Event.EventIdentifier; BRemind.SaveLHRemind (SQLite_iOS.GetConnection (), ItemLH); if (isUpdate) { EKEvent mySavedEvent = App.Current.EventStore.EventFromIdentifier (ItemLH.EventID); bool accepted=await LayoutHelper.ShowAlert ("Cập nhật", "Bạn có muốn áp dụng thay đổi này cho tất cả các nhắc lịch môn này về sau"); if (accepted) { UpdateEvents (mySavedEvent); } isUpdate = false; } if (VCLichHoc.instance != null) VCLichHoc.Instance.LoadData (); if (VCLichHocTuan.instance != null) VCLichHocTuan.Instance.LoadData_Tuan (VCLichHocTuan.LoadedDate); ItemLH = null; } else { ItemLT.EventID = controller.Event.EventIdentifier; BRemind.SaveLTRemind (SQLite_iOS.GetConnection (), ItemLT); if (VCLichThi.instance != null) VCLichThi.Instance.LoadData (); ItemLT = null; isUpdate = false; } break; } }
// completed is called when a user eith public override void Completed (EventKitUI.EKEventEditViewController controller, EventKitUI.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 EventKitUI.EKEventEditViewAction.Canceled: break; case EventKitUI.EKEventEditViewAction.Deleted: break; case EventKitUI.EKEventEditViewAction.Saved: App.CalPage.Navigation.PopAsync (); break; } }
public CreateEventEditViewDelegate(EventKitUI.EKEventEditViewController eventController, ScrollReq obj) { // save our controller reference this.eventController = eventController; this.myObject = obj; }