예제 #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();
        }
예제 #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);
        }