Exemplo n.º 1
0
        public RegistryPluginViewModel(PluginRegistryEntry entry, IPluginListProxy pluginList)
        {
            this.entry      = entry;
            this.pluginList = pluginList;

            DownloadCommand = new ArglessRelayCommand(
                () => CanInstall && IsVersionOk, DownloadPlugin
                );
            DeleteCommand = new ArglessRelayCommand(
                () => CanDelete, Delete
                );
            DownloadImage();
        }
Exemplo n.º 2
0
        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());
        }