Table of Contents

Class VpnServiceLocalization

Namespace
VpnHood.Core.Client.VpnServices.Abstractions
Assembly
VpnHood.Core.Client.VpnServices.Abstractions.dll

Represents the words the VPN service shows itself, as its notification's, in the app's language, and the color it shows them on.

public sealed class VpnServiceLocalization
Inheritance
VpnServiceLocalization
Inherited Members

Properties

ClientStates

Gets or sets the connection's states in the app's words, as its main page says them; a state without one is said in English. The default is none.

public IReadOnlyDictionary<ClientState, string> ClientStates { get; set; }

Property Value

IReadOnlyDictionary<ClientState, string>

Disconnect

Gets or sets the word of the notification's disconnect button. The default is "Disconnect".

public string Disconnect { get; set; }

Property Value

string

Manage

Gets or sets the word of the notification's button that opens the app. The default is "Manage".

public string Manage { get; set; }

Property Value

string

WindowBackgroundColor

Gets or sets the app's window color, as hex that TryParseColorFromHex(string) reads, which the notification takes on Android, or null.

public string? WindowBackgroundColor { get; set; }

Property Value

string

Methods

GetClientStateText(ClientState)

Gets a state's text: the app's word for it, or else English.

public string GetClientStateText(ClientState clientState)

Parameters

clientState ClientState

The state.

Returns

string

The state's text.

TryParseColorFromHex(string)

Reads a color written as hex: RRGGBB, which is opaque, or AARRGGBB, with or without #.

public static VhColor? TryParseColorFromHex(string hex)

Parameters

hex string

The text.

Returns

VhColor?

The color, or null where the text is empty or no such color.