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
Close
Gets the word for closing a message.
string Close { get; }
Property Value
Connect
Gets the word for connecting.
string Connect { get; }
Property Value
Disconnect
Gets the word for disconnecting.
string Disconnect { get; }
Property Value
ExitAndDisconnect
Gets the words for ending the UI, which disconnects first while connected.
string ExitAndDisconnect { get; }
Property Value
IsRightToLeft
Gets a value indicating whether the words run right to left, as in Arabic and Persian.
bool IsRightToLeft { get; }
Property Value
KillSwitchBlockingMessage
Gets the words that say the kill switch is blocking the network while there is no connection.
string KillSwitchBlockingMessage { get; }
Property Value
Open
Gets the word for opening the window.
string Open { get; }
Property Value
Methods
ConnectionStateText(AppConnectionState)
Gets the words for a connection's state.
string ConnectionStateText(AppConnectionState connectionState)
Parameters
connectionStateAppConnectionStateThe 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
cultureCultureInfoThe culture, as the device's.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- Task
A task that represents the asynchronous operation.
Exceptions
- OperationCanceledException
cancellationTokenwas canceled.