private async void ApplySetting() { try { var type = (GdEnv.FieldType)GardeningItemTypePicker.SelectedIndex; var note = GardeningItemNoteEntry.Text; var manager = notiManager as GardeningNotiManager; if (editType == NotiManager.EditType.Add) { Noti = new GardeningNoti(type); } else if (editType == NotiManager.EditType.Edit) { Noti.EditItemType(type); } Noti.ItemNote = note; manager.EditList(Noti, editType); await Navigation.PopAsync(); } catch { } }
public EditGardeningItemPage(NotiManager notiManager, NotiManager.EditType type, GardeningNoti noti = null) { editType = type; this.notiManager = notiManager; Noti = noti; InitializeComponent(); Title = (editType == NotiManager.EditType.Add) ? AppResources.EditItemPage_Title_New : AppResources.EditItemPage_Title_Edit; InitPicker(); }