static void Delete() { int i = 0; while (i < _listcomand.Count) { local cal = new local(); // Images mig =new Images () cal.remove(_listcomand[i]); i++; } }
private void DeleteSection() // delete all bordercolor red { local _local = new local(); int row = 0; for (row = 0; row < UIbutton.Count; row++) { if (UIbutton[row].BackboolSlect()) { _local.remove(UIbutton[row].setText()); } } reload(); }
private void Actionbutton_Clicked(object sender, EventArgs e) { this.Player.Pause(); var alert = UIAlertController.Create("", "", UIAlertControllerStyle.ActionSheet); alert.AddAction((UIAlertAction.Create("Save Video", UIAlertActionStyle.Default, async(UIAlertAction obj) => { SaveToAlbum(local, "nidal", namefile); }))); alert.AddAction((UIAlertAction.Create("Share", UIAlertActionStyle.Default, (UIAlertAction obj) => { var ii = NSUrl.FromFilename(local); var imageToShare = ii.Copy(); var activityItems = new NSObject[] { imageToShare }; var controller = new UIActivityViewController(activityItems, null); this.PresentViewController(controller, true, null); }))); alert.AddAction((UIAlertAction.Create("Delete", UIAlertActionStyle.Destructive, (UIAlertAction obj) => { try { local cal = new local(); // Images mig =new Images () cal.remove(this.Title); img.imG.ViewDidLoad(); } catch { var armAlert = UIAlertController.Create("database dot open", string.Empty, UIAlertControllerStyle.Alert); var cancelAction1 = UIAlertAction.Create("ok", UIAlertActionStyle.Cancel, alertAction1 => { }); armAlert.AddAction(cancelAction1); PresentViewController(armAlert, true, null); } NavigationController.PopViewController(true); }))); alert.AddAction((UIAlertAction.Create("Rename", UIAlertActionStyle.Default, (UIAlertAction obj) => { UITextField field = new UITextField(); //field.Text = this.Title; var frame = new CGRect(40, 40, 300, 60); var messbox = UIAlertController.Create("Change a Name", string.Empty, UIAlertControllerStyle.Alert); messbox.View.BackgroundColor = UIColor.DarkGray; // UITextField field = null; // UITextField field2 = null; messbox.AddTextField((textField) => { // field = textField; // Initialize field // field.Placeholder = placeholder; // field.Placeholder = library.Messages(0); // field.BackgroundColor = UIColor.Yellow; // field.Layer.BorderColor = UIColor.Gray.CGColor; // field.Font = library.Font(); field = textField; field.Frame = frame; field.Layer.BorderWidth = 0; // field.Layer.CornerRadius = 20; // field = new UITextField(new CoreGraphics.CGRect(10, 60, 300, 60)); // field.SecureTextEntry = true; }); var cancelAction = UIAlertAction.Create(library.StrForm(4), UIAlertActionStyle.Cancel, alertAction => { }); var okayAction = UIAlertAction.Create(library.StrForm(3), UIAlertActionStyle.Default, alertAction => { string[] data = new string[] { field.Text + ".mp4", this.Title }; this.Title = field.Text + ".mp4"; local cal = new local(); // Images mig =new Images () cal.Uplod(data); img.imG.ViewDidLoad(); cal.retUIbutton(); }); messbox.AddAction(cancelAction); messbox.AddAction(okayAction); //Present Alert PresentViewController(messbox, true, null); }))); alert.AddAction((UIAlertAction.Create("Cancel", UIAlertActionStyle.Cancel, (UIAlertAction obj) => { }))); this.PresentViewController(alert, true, null); }