public JamEntryViewModel(JamEntry model) : base(model) { Team = new JamTeamViewModel(model.Team); ThumbnailPathProperty = ImageSourceProperty.CreateReadonly(this, nameof(Thumbnail), vm => vm.Model.ThumbnailPath); ThumbnailSmallPathProperty = ImageSourceProperty.CreateReadonly(this, nameof(ThumbnailSmall), vm => vm.Model.ThumbnailSmallPath); Launcher = new ProcessLauncher(); LaunchGameCommand = new SimpleCommand(LaunchGame); }
public JamEntryViewModel(JamEntry model) : base(model) { Team = new JamTeamViewModel(model.Team); ThumbnailPathProperty = ImageSourceProperty.CreateReadonly(this, nameof(Thumbnail), vm => vm.Model.ThumbnailPath); ThumbnailSmallPathProperty = ImageSourceProperty.CreateReadonly(this, nameof(ThumbnailSmall), vm => vm.Model.ThumbnailSmallPath); Launcher = new ProcessLauncher(); LaunchGameCommand = SimpleCommand.From(LaunchGame); OpenReadmeCommand = ReadmePath != null && !model.IsReadmePlease ? SimpleCommand.From(OpenReadme) : null; OpenReadmePleaseCommand = ReadmePath != null && model.IsReadmePlease ? SimpleCommand.From(OpenReadme) : null; OpenAfterwordCommand = AfterwordPath != null?SimpleCommand.From(OpenAfterword) : null; OpenDirectoryCommand = SimpleCommand.From(OpenDirectory); }
set => SetValue(ImageSourceProperty, value);
set => this.SetValue(ImageSourceProperty, value);
get => (string)GetValue(ImageSourceProperty); set => SetValue(ImageSourceProperty, value);
public JamOverviewViewModel(JamOverview model) : base(model) { LogoPathProperty = ImageSourceProperty.CreateReadonly(this, nameof(Logo), vm => vm.Model.LogoPath); Entries = CollectionViewModel.CreateImmutable(model.Entries, JamEntryViewModel.CollectionStub); }