Table of Contents

Class TunnelRowViewModel

Namespace
McServerLauncher.ViewModels
Assembly
McServerLauncher.dll

One line of the tunnels table.

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

Remarks

Holds nothing but how to show a TunnelRow and the editing state of its name; every action goes back to TunnelsViewModel, which is the only place that talks to the account.

Constructors

TunnelRowViewModel(TunnelsViewModel, TunnelRow, bool)

public TunnelRowViewModel(TunnelsViewModel owner, TunnelRow row, bool canEdit = true)

Parameters

owner TunnelsViewModel
row TunnelRow
canEdit bool

Properties

Address

Where players connect. Bedrock has no SRV record, so its port is part of what they type.

public string Address { get; }

Property Value

string

BeginRenameCommand

Gets an IRelayCommand instance wrapping McServerLauncher.ViewModels.TunnelRowViewModel.BeginRename().

[ExcludeFromCodeCoverage]
public IRelayCommand BeginRenameCommand { get; }

Property Value

IRelayCommand

CanEdit

Whether the key this tunnel was read with may change it. The key of an agent the user installed can only read, so its tunnels are renamed and deleted on playit.gg, and the buttons say so.

public bool CanEdit { get; }

Property Value

bool

CancelRenameCommand

Gets an IRelayCommand instance wrapping McServerLauncher.ViewModels.TunnelRowViewModel.CancelRename().

[ExcludeFromCodeCoverage]
public IRelayCommand CancelRenameCommand { get; }

Property Value

IRelayCommand

ConfirmRenameCommand

Gets an IAsyncRelayCommand instance wrapping McServerLauncher.ViewModels.TunnelRowViewModel.ConfirmRename().

[ExcludeFromCodeCoverage]
public IAsyncRelayCommand ConfirmRenameCommand { get; }

Property Value

IAsyncRelayCommand

CopyCommand

Gets an IAsyncRelayCommand instance wrapping McServerLauncher.ViewModels.TunnelRowViewModel.Copy().

[ExcludeFromCodeCoverage]
public IAsyncRelayCommand CopyCommand { get; }

Property Value

IAsyncRelayCommand

DeleteCommand

Gets an IAsyncRelayCommand instance wrapping McServerLauncher.ViewModels.TunnelRowViewModel.Delete().

[ExcludeFromCodeCoverage]
public IAsyncRelayCommand DeleteCommand { get; }

Property Value

IAsyncRelayCommand

DeleteTip

public string DeleteTip { get; }

Property Value

string

DotBrush

public IBrush DotBrush { get; }

Property Value

IBrush

EditName

[ExcludeFromCodeCoverage]
public string EditName { get; set; }

Property Value

string

HasAddress

public bool HasAddress { get; }

Property Value

bool

HasHint

public bool HasHint { get; }

Property Value

bool

HintText

public string? HintText { get; }

Property Value

string

Id

public string Id { get; }

Property Value

string

IsEditing

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

Property Value

bool

IsNotEditing

public bool IsNotEditing { get; }

Property Value

bool

IsProblem

public bool IsProblem { get; }

Property Value

bool

LocalPort

public int LocalPort { get; }

Property Value

int

Name

public string Name { get; }

Property Value

string

ProtoText

public string ProtoText { get; }

Property Value

string

RenameTip

public string RenameTip { get; }

Property Value

string

RowBackground

public IBrush RowBackground { get; }

Property Value

IBrush

ServerText

public string ServerText { get; }

Property Value

string

ShowSuggestion

public bool ShowSuggestion { get; }

Property Value

bool

SuggestedName

The name it would carry if named after its server, when that is not what it has.

public string? SuggestedName { get; }

Property Value

string

SuggestionText

public string SuggestionText { get; }

Property Value

string

UseSuggestedCommand

Gets an IAsyncRelayCommand instance wrapping McServerLauncher.ViewModels.TunnelRowViewModel.UseSuggested().

[ExcludeFromCodeCoverage]
public IAsyncRelayCommand UseSuggestedCommand { get; }

Property Value

IAsyncRelayCommand