Example #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);
        }
Example #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);
        }