public RegistryPluginViewModel(PluginRegistryEntry entry, IPluginListProxy pluginList) { this.entry = entry; this.pluginList = pluginList; DownloadCommand = new ArglessRelayCommand( () => CanInstall && IsVersionOk, DownloadPlugin ); DeleteCommand = new ArglessRelayCommand( () => CanDelete, Delete ); DownloadImage(); }
public RegistryPluginViewModel(PluginRegistryEntry entry, IPluginListProxy pluginList, ReadmeService readmeService, HttpClient http) { this.entry = entry; this.pluginList = pluginList; this.readmeService = readmeService; this.http = http; DownloadCommand = new ArglessRelayCommand( () => CanInstall && IsVersionOk, DownloadPlugin ); DeleteCommand = new ArglessRelayCommand( () => CanDelete, Delete ); DownloadImage(); LastUpdateLong = PluginViewModelHelper.FormatLongDate(entry.ReleaseDate); LastUpdateShort = PluginViewModelHelper.FormatShortDate(entry.ReleaseDate); Actions = new ObservableCollection <PluginActionViewModel>(GetActions()); }