public static ShowOkCancelPopup ( Android.Content.Context context, int titleId, int messageId, Action |
||
context | Android.Content.Context | |
titleId | int | |
messageId | int | |
callback | Action |
|
리턴 | void |
private void DeleteAll() { if (m_AllTasks.Count == 0) { return; } Util.ShowOkCancelPopup(this, Resource.String.confirm_delete_title, Resource.String.confirm_delete, delete => { if (!delete) { return; } m_DataChanged = true; try { foreach (var task in m_AllTasks) { DataManager.SaveTask(new ClearedTaskModel(task)); } } catch {} try { DataManager.DeleteTasks(); ReloadData(0); RunOnUiThread(() => Toast.MakeText(this, Resource.String.nice_work_long, ToastLength.Short).Show()); } catch { RunOnUiThread(() => Toast.MakeText(this, Resource.String.unable_to_delete, ToastLength.Short).Show()); } }); }
private void DeleteSelected() { if (ListView.GetCheckItemIds().Length > 10) { Util.ShowOkCancelPopup(this, Resource.String.confirm_delete_title, Resource.String.confirm_delete, delete => { if (!delete) { return; } ReallyDeleteSelected(); }); } else { ReallyDeleteSelected(); } }