void alertsure(string mess) { Action <UIAlertAction> okaction = null; Action <UIAlertAction> Cancelaction = null; switch (mess) { case "Save": { okaction = (UIAlertAction => { saveFilesGarelly(); }); Cancelaction = (UIAlertAction => { // Nettab.bar.changebuttonclick(); ViewDidLoad(); }); } break; case "Delete All": { okaction = (UIAlertAction => { DataSql.process(library.File(2), library.detleteAll(), null); ViewDidLoad(); _Select = false; });//end Cancelaction = (UIAlertAction => { _Select = false; }); } break; case "Delete": { okaction = (UIAlertAction => { DeleteSection(); }); Cancelaction = (UIAlertAction => { // Nettab.bar.changebuttonclick(); ViewDidLoad(); }); } break; } var alert = UIAlertController.Create(string.Empty, "are you sure" + " " + mess, UIAlertControllerStyle.Alert); var ok = UIAlertAction.Create("Ok", UIAlertActionStyle.Default, okaction); var Cancel = UIAlertAction.Create("Cancel", UIAlertActionStyle.Cancel, Cancelaction); alert.AddAction(ok); alert.AddAction(Cancel); PresentViewController(alert, true, null); } //messgebox ask are you sure
public void Delete_all() { DataSql.process(library.File(2), library.detleteAll(), null); }