mirror of
https://github.com/BlossomiShymae/Needlework.Net.git
synced 2025-12-06 10:10:48 +01:00
26 lines
579 B
C#
26 lines
579 B
C#
using CommunityToolkit.Mvvm.Input;
|
|
using System.Diagnostics;
|
|
using System.Net.Http;
|
|
|
|
namespace Needlework.Net.ViewModels.Pages;
|
|
|
|
public partial class AboutViewModel : PageBase
|
|
{
|
|
public HttpClient HttpClient { get; }
|
|
|
|
public AboutViewModel(HttpClient httpClient) : base("About", "info-circle")
|
|
{
|
|
HttpClient = httpClient;
|
|
}
|
|
|
|
[RelayCommand]
|
|
private void OpenUrl(string url)
|
|
{
|
|
var process = new Process()
|
|
{
|
|
StartInfo = new ProcessStartInfo(url) { UseShellExecute = true }
|
|
};
|
|
process.Start();
|
|
}
|
|
}
|