mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-22 09:19:18 +01:00
Start some process calls through explorer. Launch process unelevated
Related to issue #1113
This commit is contained in:
parent
982c234fa7
commit
f263397ac0
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Security;
|
using System.Security;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@ -141,5 +142,17 @@ namespace DS4Windows
|
|||||||
throw;
|
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 { }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
using System.Diagnostics;
|
using DS4Windows;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
|
||||||
namespace DS4WinWPF.DS4Forms
|
namespace DS4WinWPF.DS4Forms
|
||||||
@ -12,53 +12,53 @@ namespace DS4WinWPF.DS4Forms
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
string version = DS4Windows.Global.exeversion;
|
string version = Global.exeversion;
|
||||||
headerLb.Content += version + ")";
|
headerLb.Content += version + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ChangeLogLink_Click(object sender, RoutedEventArgs e)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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/");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user