private async Task Fetch() { Applications.Clear(); var client = await IoTCentral.Current.GetServiceClient(); var apps = await client.ListApps(); Applications.AddRange(apps); IsBusy = false; OnPropertyChanged("Applications"); }
public void Fill(DBEntities context) { Levels.Add(new SelectListItem { Value = "-1", Text = "All" }); foreach (OmniusLogLevel level in Enum.GetValues(typeof(OmniusLogLevel))) { Levels.Add(new SelectListItem { Value = ((int)level).ToString(), Text = level.ToString(), Selected = ((int)level == LevelId) }); } Sources.Add(new SelectListItem { Value = "-1", Text = "All" }); foreach (OmniusLogSource source in Enum.GetValues(typeof(OmniusLogSource))) { Sources.Add(new SelectListItem { Value = ((int)source).ToString(), Text = source.ToString(), Selected = ((int)source == SourceId) }); } Users.Add(new User { UserName = "******", DisplayName = "All" }); Users.AddRange(context.Users.OrderBy(u => u.UserName).ToList()); Servers.Add("All"); Servers.AddRange(context.LogItems.Select(i => i.Server).OrderBy(s => s).Distinct().ToList()); Applications.Add(new Application { Name = "All", DisplayName = "All" }); Applications.AddRange(context.Applications.OrderBy(a => a.Name).ToList()); Blocks.Add(new Block { Name = "All", DisplayName = "All" }); if (ApplicationName != null) { Blocks.AddRange(context.Blocks.Where(b => b.WorkFlow.Application.Name == ApplicationName).OrderBy(b => b.DisplayName).ToList()); } Actions.Add("All"); Actions.AddRange(Modules.Tapestry.Action.All.Select(a => a.Value.Name).OrderBy(a => a)); }
private async Task Fetch() { Applications.AddRange(await IoTCentral.Current.ServiceClient.ListApps()); IsBusy = false; OnPropertyChanged("Applications"); }
public void AddApplicationRange(List <IApplication> applications) { Applications.AddRange(applications); CollectionChanged?.Invoke(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, applications)); }
public void AddApplicationRange(List <IApplication> applications) { Applications.AddRange(applications); ApplicationChanged?.Invoke(this, new ApplicationChangedEventArgs(applications.FirstOrDefault())); }