public sourc(List <string> list, List <int> PL, UITableView table) { CellIdentifier = library.StrForm(0); cellList = list; tableView = table; PortList = PL; for (int i = 0; i < cellList.Count; i++) { Clickbuttonconnct conncatbutton = new Clickbuttonconnct(cellList[i], PortList[i]); connctionButtons.Add(conncatbutton); } }
public Clickbuttonconnct(string ip, int port) { IP = ip; Port = port; conncatbutton = UITableViewRowAction.Create(UITableViewRowActionStyle.Default, library.StrForm(1), click_connact); conncatbutton.BackgroundColor = UIColor.Blue; NSTimer xtimer = NSTimer.CreateRepeatingScheduledTimer(TimeSpan.FromSeconds(0.1), delegate { if (m) { m = false; conncatbutton.BackgroundColor = UIColor.Blue; _information.stop(); conncatbutton.Title = library.StrForm(1); } else { // click_connact(conncatbutton, null); // cell.BackgroundColor = UIColor.Gray; } }); }
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); }