public AppInfoCollection FindApps(string name) { AppInfoCollection result = new AppInfoCollection(); foreach (var item in _AppTypes) { result.AddRange(FindApps(item.AppInfos, name)); } return(result); }
public AppInfo FindAppByExecPath(string execPath) { AppInfoCollection result = new AppInfoCollection(); foreach (var item in AllApps()) { if (PathHelper.ComparePath(item.ExecPath, execPath)) { return(item); } } return(null); }
public AppInfoCollection FindApps(AppInfoCollection collection, string name) { AppInfoCollection result = new AppInfoCollection(); foreach (AppInfo item in collection) { if (item.AppName.IndexOf(name, StringComparison.InvariantCultureIgnoreCase) >= 0) { result.Add(item); } } return(result); }
public AppType() { _AppInfos = new AppInfoCollection(); _AppInfos.CollectionChanged += (s, e) => OnPropertyChanged("AppTypeInfo"); _AppInfos.CollectionChanged += (s, e) => { if ( e.Action == NotifyCollectionChangedAction.Remove || e.Action == NotifyCollectionChangedAction.Replace || e.Action == NotifyCollectionChangedAction.Reset) { foreach (AppInfo ai in e.OldItems) { OnAppInfoDeleted(ai); } } }; }