添加项目文件。
This commit is contained in:
31
WPFWCSDemo/ViewModels/Settings/AboutViewModel.cs
Normal file
31
WPFWCSDemo/ViewModels/Settings/AboutViewModel.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Security.Policy;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace WPFWCSDemo.ViewModels.Settings
|
||||
{
|
||||
public partial class AboutViewModel:ObservableObject
|
||||
{
|
||||
[RelayCommand]
|
||||
void WebNavigation()
|
||||
{
|
||||
string url = "http://www.yctd.cn/";
|
||||
|
||||
Uri uri = new Uri(url);
|
||||
|
||||
// 使用Process.Start打开默认浏览器
|
||||
Process.Start(new ProcessStartInfo
|
||||
{
|
||||
FileName = uri.ToString(),
|
||||
UseShellExecute = true
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user