예제 #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);
        }
예제 #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);
        }
예제 #3
0
 set => SetValue(ImageSourceProperty, value);
예제 #4
0
 set => this.SetValue(ImageSourceProperty, value);
예제 #5
0
 get => (string)GetValue(ImageSourceProperty); set => SetValue(ImageSourceProperty, value);
예제 #6
0
 public JamOverviewViewModel(JamOverview model)
     : base(model)
 {
     LogoPathProperty = ImageSourceProperty.CreateReadonly(this, nameof(Logo), vm => vm.Model.LogoPath);
     Entries          = CollectionViewModel.CreateImmutable(model.Entries, JamEntryViewModel.CollectionStub);
 }