Table of Contents

Class ModrinthProjectViewModel

Namespace
McServerLauncher.ViewModels
Assembly
McServerLauncher.dll

One card in the browser: a store item, its tags, and the two buttons it offers.

public class ModrinthProjectViewModel : ObservableObject, INotifyPropertyChanged, INotifyPropertyChanging
Inheritance
ModrinthProjectViewModel
Implements
Inherited Members

Constructors

ModrinthProjectViewModel(ProjectResult, ServerModsViewModel)

public ModrinthProjectViewModel(ProjectResult project, ServerModsViewModel parent)

Parameters

project ProjectResult
parent ServerModsViewModel

ModrinthProjectViewModel(StoreItem, ServerModsViewModel)

public ModrinthProjectViewModel(StoreItem item, ServerModsViewModel parent)

Parameters

item StoreItem
parent ServerModsViewModel

Properties

Author

public string Author { get; }

Property Value

string

Description

What the project does, in the user's language.

public string Description { get; }

Property Value

string

Downloads

public long Downloads { get; }

Property Value

long

DownloadsText

public string DownloadsText { get; }

Property Value

string

HasIcon

public bool HasIcon { get; }

Property Value

bool

HasTagline

public bool HasTagline { get; }

Property Value

bool

HasTags

public bool HasTags { get; }

Property Value

bool

Icon

Mod icon, loaded asynchronously through the shared image cache (best-effort).

[ExcludeFromCodeCoverage]
public Bitmap? Icon { get; set; }

Property Value

Bitmap

IconUrl

public string? IconUrl { get; }

Property Value

string

Id

public string Id { get; }

Property Value

string

InstallCommand

Gets an IAsyncRelayCommand instance wrapping McServerLauncher.ViewModels.ModrinthProjectViewModel.InstallAsync().

[ExcludeFromCodeCoverage]
public IAsyncRelayCommand InstallCommand { get; }

Property Value

IAsyncRelayCommand

IsInstalling

[ExcludeFromCodeCoverage]
public bool IsInstalling { get; set; }

Property Value

bool

NeedsClient

True when players have to install it too — the one caveat worth showing up front.

public bool NeedsClient { get; }

Property Value

bool

OpenCommand

Gets an IRelayCommand instance wrapping McServerLauncher.ViewModels.ModrinthProjectViewModel.Open().

[ExcludeFromCodeCoverage]
public IRelayCommand OpenCommand { get; }

Property Value

IRelayCommand

Tagline

The author's own line, shown small underneath. It is the only English left on a card, and only when the catalogue has nothing for this project — dropping it entirely would trade a wrong language for less information.

public string Tagline { get; }

Property Value

string

Tags

The few tags that fit on a card, most important first.

public IReadOnlyList<StoreTagViewModel> Tags { get; }

Property Value

IReadOnlyList<StoreTagViewModel>

Title

public string Title { get; }

Property Value

string