public RegistryPluginViewModel(PluginRegistryEntry entry, IPluginListProxy pluginList)
        {
            this.entry      = entry;
            this.pluginList = pluginList;

            DownloadCommand = new ArglessRelayCommand(
                () => CanInstall && IsVersionOk, DownloadPlugin
                );
            DeleteCommand = new ArglessRelayCommand(
                () => CanDelete, Delete
                );
            DownloadImage();
        }
Example #2
0
        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();
        }
Example #3
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());
        }
Example #4
0
        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);
        }