This repository has been archived on 2026-03-14. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Eco/VideoBrowser/Controls/CefSharpBrowser/AddIns/IsSecureAddIn.cs
2023-07-24 12:00:34 +02:00

49 lines
1.3 KiB
C#

namespace VideoBrowser.Controls.CefSharpBrowser.AddIns
{
using VideoBrowser.Controls.CefSharpBrowser.Resources;
using VideoBrowser.Controls.CefSharpBrowser.ViewModels;
using VideoBrowser.Extensions;
/// <summary>
/// Defines the <see cref="IsSecureAddIn" />.
/// </summary>
public class IsSecureAddIn : AddInButton
{
private string _url;
public IsSecureAddIn()
{
this.Icon = BrowserIcons.Lock;
this.ToolTip = "The connection is secure";
}
/// <summary>
/// Gets or sets the Url.
/// </summary>
public string Url
{
get => _url;
set
{
if (!this.Set(this.PropertyChangedHandler, ref _url, value) || string.IsNullOrEmpty(this.Url))
{
return;
}
this.IsVisible = this.Url.Contains("https://");
}
}
#region Methods
/// <summary>
/// The Execute.
/// </summary>
/// <param name="viewModel">The viewModel<see cref="WebBrowserTabControlViewModel"/>.</param>
protected override void Execute(WebBrowserTabControlViewModel viewModel)
{
}
#endregion Methods
}
}