mirror of
https://github.com/BlossomiShymae/Needlework.Net.git
synced 2025-12-06 18:20:47 +01:00
27 lines
643 B
C#
27 lines
643 B
C#
using CommunityToolkit.Mvvm.Input;
|
|
using System.Diagnostics;
|
|
using System.Net.Http;
|
|
|
|
namespace Needlework.Net.ViewModels
|
|
{
|
|
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();
|
|
}
|
|
}
|
|
}
|