diff --git a/DS4Windows/DS4Control/Util.cs b/DS4Windows/DS4Control/Util.cs index 5f1a252..923aa17 100644 --- a/DS4Windows/DS4Control/Util.cs +++ b/DS4Windows/DS4Control/Util.cs @@ -1,4 +1,5 @@ using System; +using System.Diagnostics; using System.Runtime.InteropServices; using System.Security; using System.Text; @@ -141,5 +142,17 @@ namespace DS4Windows throw; } } + + public static void StartProcessInExplorer(string path) + { + ProcessStartInfo startInfo = new ProcessStartInfo(); + startInfo.FileName = "explorer.exe"; + startInfo.Arguments = path; + try + { + using (Process temp = Process.Start(startInfo)) { } + } + catch { } + } } } diff --git a/DS4Windows/DS4Forms/About.xaml.cs b/DS4Windows/DS4Forms/About.xaml.cs index 156b672..e086521 100644 --- a/DS4Windows/DS4Forms/About.xaml.cs +++ b/DS4Windows/DS4Forms/About.xaml.cs @@ -1,4 +1,4 @@ -using System.Diagnostics; +using DS4Windows; using System.Windows; namespace DS4WinWPF.DS4Forms @@ -12,53 +12,53 @@ namespace DS4WinWPF.DS4Forms { InitializeComponent(); - string version = DS4Windows.Global.exeversion; + string version = Global.exeversion; headerLb.Content += version + ")"; } private void ChangeLogLink_Click(object sender, RoutedEventArgs e) { - Process.Start("https://docs.google.com/document/d/1CovpH08fbPSXrC6TmEprzgPwCe0tTjQ_HTFfDotpmxk/edit?usp=sharing"); + Util.StartProcessInExplorer("https://docs.google.com/document/d/1CovpH08fbPSXrC6TmEprzgPwCe0tTjQ_HTFfDotpmxk/edit?usp=sharing"); } private void PaypalLink_Click(object sender, RoutedEventArgs e) { - Process.Start("https://paypal.me/ryochan7"); + Util.StartProcessInExplorer("https://paypal.me/ryochan7"); } private void PatreonLink_Click(object sender, RoutedEventArgs e) { - Process.Start("https://patreon.com/user?u=501036"); + Util.StartProcessInExplorer("https://patreon.com/user?u=501036"); } private void SubscribeStartLink_Click(object sender, RoutedEventArgs e) { - Process.Start("https://subscribestar.com/ryochan7"); + Util.StartProcessInExplorer("https://subscribestar.com/ryochan7"); } private void SiteLink_Click(object sender, RoutedEventArgs e) { - Process.Start("https://ryochan7.github.io/ds4windows-site/"); + Util.StartProcessInExplorer("https://ryochan7.github.io/ds4windows-site/"); } private void SourceLink_Click(object sender, RoutedEventArgs e) { - Process.Start("https://github.com/Ryochan7/DS4Windows"); + Util.StartProcessInExplorer("https://github.com/Ryochan7/DS4Windows"); } private void Jays2KingsLink_Click(object sender, RoutedEventArgs e) { - Process.Start("https://github.com/Jays2Kings/"); + Util.StartProcessInExplorer("https://github.com/Jays2Kings/"); } private void InhexSTERLink_Click(object sender, RoutedEventArgs e) { - Process.Start("https://code.google.com/p/ds4-tool/"); + Util.StartProcessInExplorer("https://code.google.com/p/ds4-tool/"); } private void ElectrobrainsLink_Click(object sender, RoutedEventArgs e) { - Process.Start("https://code.google.com/r/brianfundakowskifeldman-ds4windows/"); + Util.StartProcessInExplorer("https://code.google.com/r/brianfundakowskifeldman-ds4windows/"); } } }