public LoadedPluginViewModel(PluginEntry plugin, IPluginListProxy pluginList) { this.plugin = plugin; this.pluginList = pluginList; ToggleCommand = new RelayCommand( _ => CanToggle, val => IsEnabled = (bool)val ); DeleteCommand = new ArglessRelayCommand( () => CanDelete, Delete ); RestoreCommand = new ArglessRelayCommand( () => CanRestore, Restore ); pluginList.RegistryPluginsLoaded += OnRegistryPluginsLoaded; GetImage(); }
public LoadedPluginViewModel(PluginEntry plugin, IPluginListProxy pluginList) { this.plugin = plugin; this.pluginList = pluginList; ToggleCommand = new RelayCommand( _ => CanToggle, val => IsEnabled = (bool)val ); DeleteCommand = new ArglessRelayCommand( () => CanDelete, Delete ); RestoreCommand = new ArglessRelayCommand( () => CanRestore, Restore ); pluginList.RegistryPluginsLoaded += OnRegistryPluginsLoaded; GetImage(); Actions = new ObservableCollection <PluginActionViewModel>(GetActions()); LastUpdateLong = PluginViewModelHelper.FormatLongDate(plugin.PluginInformation.ReleaseDate); LastUpdateShort = PluginViewModelHelper.FormatShortDate(plugin.PluginInformation.ReleaseDate); }