public AppOverviewViewModel( PluginManifest pluginManifest ) { _pluginManifest = pluginManifest; Filters = Enum.GetNames( typeof( PluginState ) ).ToList(); Filters.Insert( 0, "All" ); _applicationPlugins = new Dictionary<ApplicationViewModel, List<PluginManifestPlugin>>(); // Set the filter and show applications + plug-ins. SelectedFilter = Filters.First(); }
public void RefreshManifest() { if ( !HasInternetConnection() ) { return; } // Retrieving the available applications stream. Stream appsStream = null; while ( appsStream == null ) { var client = new WebClient(); appsStream = client.OpenRead( AppsFeed ); } var serializer = new XmlSerializer( typeof( PluginManifest ) ); var reader = XmlReader.Create( appsStream ); // Use Deserialize method to restore the object's state. PluginManifest = (PluginManifest)serializer.Deserialize( reader ); }
public void Populate( PluginManifest pluginManifest ) { Mouse.OverrideCursor = Cursors.Wait; PluginState state; if ( Enum.TryParse( SelectedFilter, out state ) ) { FilterApps( state ); } else { FilterApps(); } Mouse.OverrideCursor = Cursors.Arrow; }