public TimeEditView(Noti noti, NotiManager notiManager) { this.noti = noti; this.notiManager = notiManager; maxHour = GetMaxHour(); InitializeComponent(); InitValue(); }
private void ResetTimer(Intent intent) { int id = intent.GetIntExtra("NotiId", -1); NotiManager.NotificationType type = (NotiManager.NotificationType)intent.GetIntExtra("NotiType", 0); NotiManager notiManager = type switch { NotiManager.NotificationType.Expedition => new ExpeditionNotiManager(), NotiManager.NotificationType.GatheringItem => new GatheringItemNotiManager(), NotiManager.NotificationType.Gadget => new GadgetNotiManager(), NotiManager.NotificationType.Furnishing => new FurnishingNotiManager(), NotiManager.NotificationType.Gardening => new GardeningNotiManager(), _ => null }; if ((notiManager is null) || (id == -1)) { return; } Noti noti = notiManager.Notis.Find(x => x.NotiId.Equals(id)); NotiScheduleAndroid.Cancel(noti); noti.UpdateTime(); notiManager.SaveNotis(); switch (type) { case NotiManager.NotificationType.Expedition: NotiScheduleAndroid.Schedule <ExpeditionNoti>(noti); break; case NotiManager.NotificationType.GatheringItem: NotiScheduleAndroid.Schedule <GatheringItemNoti>(noti); break; case NotiManager.NotificationType.Gadget: NotiScheduleAndroid.Schedule <GadgetNoti>(noti); break; case NotiManager.NotificationType.Furnishing: NotiScheduleAndroid.Schedule <FurnishingNoti>(noti); break; case NotiManager.NotificationType.Gardening: NotiScheduleAndroid.Schedule <GardeningNoti>(noti); break; default: break; } } }
public EditFurnishingItemPage(NotiManager notiManager, NotiManager.EditType type, FurnishingNoti noti = null) { editType = type; this.notiManager = notiManager; Noti = noti; InitializeComponent(); Title = (editType == NotiManager.EditType.Add) ? AppResources.EditItemPage_Title_New : AppResources.EditItemPage_Title_Edit; InitPicker(); }
public EditExpeditionItemPage(NotiManager notiManager, NotiManager.EditType type, ExpeditionNoti noti = null) { editType = type; this.notiManager = notiManager; Noti = noti; InitializeComponent(); Title = (editType == NotiManager.EditType.Add) ? AppResources.EditExpedition_Title_New : AppResources.EditExpedition_Title_Edit; InitValues(); }
private void UpdateNotis() { if (Preferences.Get(SettingConstants.NOTI_ENABLED, false)) { NotiManager notiManager = type switch { RealmEnv.RealmType.Currency => new RealmCurrencyNotiManager(), RealmEnv.RealmType.Friendship => new RealmFriendshipNotiManager(), _ => null }; notiManager?.UpdateNotisTime(); } }
internal override void RemoveItem() { base.RemoveItem(); if (ListView.SelectedItem != null) { NotiManager.EditList(ListView.SelectedItem as Noti, NotiManager.EditType.Remove); Utils.RefreshCollectionView(ListView, Notis); } else { DependencyService.Get <IToast>().Show(AppResources.NotiSettingPage_NotSelectedToast_Message); } }
private void FurnishingSpeedUpToolbarItem_Clicked(object sender, EventArgs e) { if (ListView.SelectedItems.Count < 0) { return; } FurnishingNoti selectedNoti = (FurnishingNoti)ListView.SelectedItem; selectedNoti.NotiTime = selectedNoti.NotiTime.AddHours(-FEnv.SpeedUpHour); NotiManager.EditList(selectedNoti, NotiManager.EditType.EditOnlyTime); Utils.RefreshCollectionView(ListView, Notis); }
internal override void RefreshTime(object statusInfo) { if (ExpEnv.IsSyncEnabled) { SyncHelper.Update(SyncHelper.SyncTarget.Expedition).GetAwaiter().OnCompleted(() => { NotiManager.ReloadNotiList <ExpeditionNoti>(); base.RefreshTime(statusInfo); }); } else { base.RefreshTime(statusInfo); } }
public ListTimerHomeItem(NotiManager manager) { _manager = manager; }
public NotiScheduleiOS() { manager = new NotiManager(); }
public NotiScheduleUWP() { manager = new NotiManager(); }
public NotiScheduleAndroid() { manager = new(); }