public ServiceController(UserService svc) : base(UITableViewStyle.Grouped) { try { Title = svc.Name; Service = svc; _queries = new DialogSection("Queries"); _feeds = new List <DialogSection> (); _feeds.Add(new DialogSection("Feeds")); _loadingSection = new DialogSection(); _loadingElement = new LoadingElement(); _loadingElement.Start(); _loadingSection.Add(_loadingElement); Sections.AddRange(_feeds); Sections.Add(_loadingSection); NavigationItem.RightBarButtonItem = new UIBarButtonItem(UIBarButtonSystemItem.Add, HandleAddButton); } catch (Exception error) { Log.Error(error); } }
public ServiceController(UserService svc) : base(UITableViewStyle.Grouped) { try { Title = svc.Name; Service = svc; _queries = new DialogSection ("Queries"); _feeds = new List<DialogSection> (); _feeds.Add (new DialogSection ("Feeds")); _loadingSection = new DialogSection (); _loadingElement = new LoadingElement (); _loadingElement.Start (); _loadingSection.Add (_loadingElement); Sections.AddRange (_feeds); Sections.Add (_loadingSection); NavigationItem.RightBarButtonItem = new UIBarButtonItem (UIBarButtonSystemItem.Add, HandleAddButton); } catch (Exception error) { Log.Error (error); } }
public DataViewController(UserQuery query, string url) : base(UITableViewStyle.Grouped) { try { Query = query; Url = url; Title = Query.Name; PagingEnabled = true; NumEntitiesPerRequest = 20; _index = 0; _loadSection = new DialogSection (); _loadElement = new LoadingElement (); _loadSection.Add (_loadElement); _loadElement.Start (); Sections.Add (_loadSection); _moreSection = new DialogSection (); _moreSection.Add (new ActionElement ("More", GetMore)); if (PagingEnabled) { Sections.Add (_moreSection); } using (var repo = new Repo ()) { Feed = repo.GetFeed (query.FeedId); } if (Query.Id > 0) { NavigationItem.RightBarButtonItem = new UIBarButtonItem (UIBarButtonSystemItem.Edit, HandleEdit); } GetMore (); } catch (Exception error) { Log.Error (error); } }
public DataViewController(UserQuery query, string url) : base(UITableViewStyle.Grouped) { try { Query = query; Url = url; Title = Query.Name; PagingEnabled = true; NumEntitiesPerRequest = 20; _index = 0; _loadSection = new DialogSection(); _loadElement = new LoadingElement(); _loadSection.Add(_loadElement); _loadElement.Start(); Sections.Add(_loadSection); _moreSection = new DialogSection(); _moreSection.Add(new ActionElement("More", GetMore)); if (PagingEnabled) { Sections.Add(_moreSection); } using (var repo = new Repo()) { Feed = repo.GetFeed(query.FeedId); } if (Query.Id > 0) { NavigationItem.RightBarButtonItem = new UIBarButtonItem(UIBarButtonSystemItem.Edit, HandleEdit); } GetMore(); } catch (Exception error) { Log.Error(error); } }