mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-12-23 15:46:29 +01:00
40 lines
No EOL
1.1 KiB
Text
40 lines
No EOL
1.1 KiB
Text
using System.Diagnostics;
|
|
using System.IO;
|
|
using System.Reflection;
|
|
using System.Text;
|
|
|
|
using Xamarin.Forms;
|
|
using Xamarin.Forms.Xaml;
|
|
|
|
namespace TINK.View
|
|
{
|
|
[XamlCompilation(XamlCompilationOptions.Compile)]
|
|
public partial class InfoPage : ContentPage
|
|
{
|
|
public InfoPage ()
|
|
{
|
|
InitializeComponent ();
|
|
|
|
#if __IOS__
|
|
var resourcePrefix = "TINK.iOS.";
|
|
#endif
|
|
#if __ANDROID__
|
|
var resourcePrefix = "TINK.Droid.";
|
|
#endif
|
|
#if WINDOWS_PHONE
|
|
var resourcePrefix = "TINK.WinPhone.";
|
|
#endif
|
|
|
|
Debug.WriteLine("Using this resource prefix: " + resourcePrefix);
|
|
// note that the prefix includes the trailing period '.' that is required
|
|
var assembly = typeof(InfoPage).GetTypeInfo().Assembly;
|
|
Stream stream = assembly.GetManifestResourceStream
|
|
(resourcePrefix + "HtmlResouces.Info.html");
|
|
var l_oHtmlViewSource = new HtmlWebViewSource
|
|
{
|
|
Html = (new StreamReader(stream, Encoding.UTF8)).ReadToEnd()
|
|
};
|
|
InfoWebView.Source = l_oHtmlViewSource;
|
|
}
|
|
}
|
|
} |