Exemplo n.º 1
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();
        }
Exemplo n.º 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();
            Actions         = new ObservableCollection <PluginActionViewModel>(GetActions());
            LastUpdateLong  = PluginViewModelHelper.FormatLongDate(plugin.PluginInformation.ReleaseDate);
            LastUpdateShort = PluginViewModelHelper.FormatShortDate(plugin.PluginInformation.ReleaseDate);
        }