rename from Pixiview to Gallery

This commit is contained in:
2021-08-03 19:16:54 +08:00
parent 98676ce8b2
commit c41282a4b7
206 changed files with 7900 additions and 7891 deletions

39
Gallery/Login/HybridWebView.cs Executable file
View File

@ -0,0 +1,39 @@
using System;
using Xamarin.Essentials;
using Xamarin.Forms;
namespace Gallery.Login
{
public class HybridWebView : WebView
{
public static readonly BindableProperty UriProperty = BindableProperty.Create(
nameof(Uri),
typeof(string),
typeof(HybridWebView));
public static readonly BindableProperty UserAgentProperty = BindableProperty.Create(
nameof(UserAgent),
typeof(string),
typeof(HybridWebView));
public event EventHandler LoginHandle;
public string Uri
{
get => (string)GetValue(UriProperty);
set => SetValue(UriProperty, value);
}
public string UserAgent
{
get => (string)GetValue(UserAgentProperty);
set => SetValue(UserAgentProperty, value);
}
public void OnLoginHandle()
{
if (LoginHandle != null)
{
MainThread.BeginInvokeOnMainThread(() => LoginHandle(this, EventArgs.Empty));
}
}
}
}