Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public JamOverviewViewModel(JamOverview model)
     : base(model)
 {
     LogoPathProperty = ImageSourceProperty.CreateReadonly(this, nameof(Logo), vm => vm.Model.LogoPath);
     Entries          = CollectionViewModel.CreateImmutable(model.Entries, JamEntryViewModel.CollectionStub);
 }