31 lines
859 B
C#
31 lines
859 B
C#
using System.Diagnostics;
|
|
using System.Windows;
|
|
|
|
namespace Livia.Views.Controls;
|
|
|
|
/// <summary>
|
|
/// Interaction logic for LicenseInfoControl.xaml
|
|
/// </summary>
|
|
public partial class LicenseInfoControl
|
|
{
|
|
public string LicenseTitle { get; set; } = "";
|
|
public string LicenseContent { get; set; } = "";
|
|
public string LicenseUrl { get; set; } = "";
|
|
|
|
public LicenseInfoControl()
|
|
{
|
|
InitializeComponent();
|
|
DataContext = this;
|
|
}
|
|
|
|
private void LinkButtonClick(object sender, RoutedEventArgs e)
|
|
{
|
|
// for .NET Core you need to add UseShellExecute = true
|
|
// see https://docs.microsoft.com/dotnet/api/system.diagnostics.processstartinfo.useshellexecute#property-value
|
|
ProcessStartInfo psi = new(LicenseUrl)
|
|
{
|
|
UseShellExecute = true
|
|
};
|
|
Process.Start(psi);
|
|
}
|
|
} |