public override void Selected(DialogViewController dvc, UITableView tableView, NSIndexPath path) { tableView.DeselectRow(path, true); if (Animating) { return; } if (Tapped != null) { Animating = true; Tapped(this); } }
public override void Selected(DialogViewController dvc, UITableView tableView, NSIndexPath path) { if (Url == null) { base.Selected(dvc, tableView, path); return; } tableView.DeselectRow(path, false); if (loading) { return; } var cell = GetActiveCell(); var spinner = StartSpinner(cell); loading = true; var request = new NSUrlRequest(new NSUrl(Url), NSUrlRequestCachePolicy.UseProtocolCachePolicy, 60); var connection = new NSUrlConnection(request, new ConnectionDelegate((data, error) => { loading = false; spinner.StopAnimating(); spinner.RemoveFromSuperview(); if (error == null) { try { var obj = JsonValue.Load(new StreamReader(data)) as JsonObject; if (obj != null) { var root = JsonElement.FromJson(obj); var newDvc = new DialogViewController(root, true) { Autorotate = true }; PrepareDialogViewController(newDvc); dvc.ActivateController(newDvc); return; } } catch (Exception ee) { Console.WriteLine(ee); } } var alert = new UIAlertView("Error", "Unable to download data", null, "Ok"); alert.Show(); })); }
public SizingSource(DialogViewController controller) : base(controller) { }
public Source(DialogViewController container) { this.Container = container; Root = container.root; }
public SearchDelegate(DialogViewController container) { this.container = container; }