public RomMatchViewModel(RomMatch romMatch)
        {
            _statusProperty = new WProperty(typeof(RomMatchStatus), RomMatchStatus.PendingMatch);
            _nameProperty = new WProperty(typeof(string), null);
            _currentMatchProperty = new WProperty(typeof(string), null);
            _contextCommandProperty = new WProperty(typeof(ICommand));

            this.romMatch = romMatch;
            Command = new MethodDelegateCommand(commandDelegate);
            ContextCommand = new MethodDelegateCommand(contextCommandDelegate);
            Update();
        }
        public GroupViewModel(RomGroup group, EmulatorsMainModel model)
        {
            this.model = model;
            Group = group;
            Name = group.Title;
            ThumbGroup thumbGroup = group.ThumbGroup;
            if (thumbGroup != null)
            {
                FrontCover = thumbGroup.FrontCoverDefaultPath;
                Fanart = thumbGroup.FanartDefaultPath;
            }

            Command = new MethodDelegateCommand(() =>
            {
                model.GroupSelected(Group);
            });
        }
        public GameViewModel(Game game, EmulatorsMainModel model)
        {
            this.model = model;
            Game = game;
            Name = game.Title;
            Description = game.Description;
            using (ThumbGroup thumbs = new ThumbGroup(game))
            {
                FrontCover = thumbs.FrontCoverDefaultPath;
                Fanart = thumbs.FanartDefaultPath;
            }

            Command = new MethodDelegateCommand(() =>
                {
                    model.GameSelected(Game);
                });
        }
        public EmulatorViewModel(Emulator emulator, EmulatorsMainModel model)
        {
            this.model = model;
            this.emulator = emulator;
            Name = emulator.Title;
            Description = emulator.Description;
            using (ThumbGroup thumbs = new ThumbGroup(emulator))
            {
                FrontCover = thumbs.FrontCoverDefaultPath;
                Fanart = thumbs.FanartDefaultPath;
            }

            Command = new MethodDelegateCommand(() =>
            {
                model.EmulatorSelected(emulator);
            });

            ContextCommand = new MethodDelegateCommand(showContext);

        }
        public SiteSettingViewModel(SiteViewModel site, FieldPropertyDescriptorByRef propertyDescriptor)
            : base(Consts.KEY_NAME, propertyDescriptor.DisplayName)
        {
            Site = site;
            PropertyDescriptor = propertyDescriptor;

            _nameProperty = new WProperty(typeof(string), propertyDescriptor.DisplayName);
            _descriptionProperty = new WProperty(typeof(string), propertyDescriptor.Description);
            _isPasswordProperty = new WProperty(typeof(bool), propertyDescriptor.IsPassword);

            string valueAsString = site.Site.GetConfigValueAsString(propertyDescriptor);
            _valueProperty = new WProperty(typeof(string), propertyDescriptor.IsPassword ? new string('*', valueAsString.Length) : valueAsString);
            _newValueProperty = new WProperty(typeof(string), valueAsString);

            _possibleValuesProperty = new WProperty(typeof(ItemsList), null);

            Command = new MethodDelegateCommand(() => Configure());
        }