mirror of
https://github.com/LorisYounger/VPet.ModMaker.git
synced 2024-08-30 18:22:21 +00:00
更新
This commit is contained in:
parent
0fe086bd8b
commit
8d2baeb77f
@ -82,4 +82,28 @@ public static class NativeUtils
|
|||||||
}
|
}
|
||||||
return bitmapImage;
|
return bitmapImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 打开文件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="filePath">文件路径</param>
|
||||||
|
public static void OpenLink(string filePath)
|
||||||
|
{
|
||||||
|
System
|
||||||
|
.Diagnostics.Process.Start(
|
||||||
|
new System.Diagnostics.ProcessStartInfo(filePath) { UseShellExecute = true }
|
||||||
|
)
|
||||||
|
?.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 从资源管理器打开文件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="filePath">文件路径</param>
|
||||||
|
public static void OpenFileInExplorer(string filePath)
|
||||||
|
{
|
||||||
|
System
|
||||||
|
.Diagnostics.Process.Start("Explorer", $"/select,{Path.GetFullPath(filePath)}")
|
||||||
|
?.Close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -72,6 +72,6 @@ public partial class ModMakerWindow : WindowX
|
|||||||
|
|
||||||
private void Hyperlink_Click(object? sender, RoutedEventArgs e)
|
private void Hyperlink_Click(object? sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
Process.Start(new ProcessStartInfo("https://github.com/LorisYounger/VPet.ModMaker/wiki"));
|
NativeUtils.OpenLink("https://github.com/LorisYounger/VPet.ModMaker/wiki");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user