mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-04-21 04:26:29 +02:00
Version 3.0.364
This commit is contained in:
parent
91d42552c7
commit
0b9196a78d
91 changed files with 3452 additions and 555 deletions
|
@ -7,8 +7,8 @@ namespace TINK.ViewModel
|
|||
{
|
||||
public static class ViewModelResourceHelper
|
||||
{
|
||||
/// <summary> Get ressource prefix depending on platform.</summary>
|
||||
public static string RessourcePrefix
|
||||
/// <summary> Get resource prefix depending on platform.</summary>
|
||||
public static string ResourcePrefix
|
||||
{
|
||||
get
|
||||
{
|
||||
|
@ -24,19 +24,19 @@ namespace TINK.ViewModel
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets an an embedded html ressource.</summary>
|
||||
/// <summary> Gets an embedded html resource.</summary>
|
||||
/// <param name="resrouceName">Name of resource to get.</param>
|
||||
/// <returns></returns>
|
||||
public static string GetEmbeddedResource(string resrouceName)
|
||||
{
|
||||
var ressourceName = RessourcePrefix + resrouceName;
|
||||
Log.Verbose($"Using this resource prefix {RessourcePrefix}.");
|
||||
var resourceName = ResourcePrefix + resrouceName;
|
||||
Log.Verbose($"Using this resource prefix {ResourcePrefix}.");
|
||||
// note that the prefix includes the trailing period '.' that is required
|
||||
var assembly = typeof(ViewModelResourceHelper).GetTypeInfo().Assembly;
|
||||
var stream = assembly.GetManifestResourceStream(ressourceName);
|
||||
var stream = assembly.GetManifestResourceStream(resourceName);
|
||||
return stream != null
|
||||
? (new StreamReader(stream, Encoding.UTF8)).ReadToEnd()
|
||||
: string.Format("<!DOCTYPE html><html lang=\"de\"><body>An error occurred loading html- ressource {0}.</body>", ressourceName);
|
||||
: string.Format("<!DOCTYPE html><html lang=\"de\"><body>An error occurred loading html- resource {0}.</body>", resourceName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue