Table of Contents

Interface IDesktopStrings

Namespace
VpnHood.AppHosting.Desktop.Abstractions
Assembly
VpnHood.AppHosting.Desktop.Abstractions.dll

Defines the words a desktop host shows around the UI, in the UI's language: its tray's menu and tooltip, the connection on the taskbar button, and the message it shows where it has no app to give the UI.

public interface IDesktopStrings : INotifyPropertyChanged

Remarks

The UI owns its words, so the host shows the UI's rather than its own. PropertyChanged occurs, on any thread, when the language changes, with no property's name: every member is read again.

Properties

AdministratorsOnly

Gets the words that say only an administrator of this computer may use the app.

string AdministratorsOnly { get; }

Property Value

string

Close

Gets the word for closing a message.

string Close { get; }

Property Value

string

Connect

Gets the word for connecting.

string Connect { get; }

Property Value

string

Disconnect

Gets the word for disconnecting.

string Disconnect { get; }

Property Value

string

ExitAndDisconnect

Gets the words for ending the UI, which disconnects first while connected.

string ExitAndDisconnect { get; }

Property Value

string

IsRightToLeft

Gets a value indicating whether the words run right to left, as in Arabic and Persian.

bool IsRightToLeft { get; }

Property Value

bool

KillSwitchBlockingMessage

Gets the words that say the kill switch is blocking the network while there is no connection.

string KillSwitchBlockingMessage { get; }

Property Value

string

Open

Gets the word for opening the window.

string Open { get; }

Property Value

string

Methods

ConnectionStateText(AppConnectionState)

Gets the words for a connection's state.

string ConnectionStateText(AppConnectionState connectionState)

Parameters

connectionState AppConnectionState

The state.

Returns

string

The words.

SetCultureAsync(CultureInfo, CancellationToken)

Sets the language to show where the host has no app to take it from: the words fall back to the language alone, then to English.

Task SetCultureAsync(CultureInfo culture, CancellationToken cancellationToken)

Parameters

culture CultureInfo

The culture, as the device's.

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

Task

A task that represents the asynchronous operation.

Exceptions

OperationCanceledException

cancellationToken was canceled.