mirror of
https://github.com/stuff-by-3-random-dudes/UWUVCI-AIO-WPF
synced 2025-02-16 10:38:23 +00:00
Program will now be able to restart again!
This commit is contained in:
parent
eba3c07aad
commit
3d30ac8882
1 changed files with 42 additions and 4 deletions
|
@ -1246,7 +1246,16 @@ namespace UWUVCI_AIO_WPF
|
|||
cm.ShowDialog();
|
||||
|
||||
Process p = new Process();
|
||||
p.StartInfo.FileName = System.Windows.Application.ResourceAssembly.Location;
|
||||
|
||||
var fileName = System.Windows.Application.ResourceAssembly.Location;
|
||||
foreach (var file in Directory.GetFiles(Directory.GetCurrentDirectory(), "*.exe"))
|
||||
if (Path.GetFileName(file).Contains(Path.GetFileNameWithoutExtension(fileName)))
|
||||
{
|
||||
fileName = file;
|
||||
break;
|
||||
}
|
||||
|
||||
p.StartInfo.FileName = fileName;
|
||||
p.StartInfo.Arguments = (debug ? "--debug " : "") + "--skip" + (saveworkaround ? " --spacebypass" : "");
|
||||
p.Start();
|
||||
|
||||
|
@ -1285,7 +1294,17 @@ namespace UWUVCI_AIO_WPF
|
|||
mw.Close();
|
||||
|
||||
Process p = new Process();
|
||||
p.StartInfo.FileName = System.Windows.Application.ResourceAssembly.Location;
|
||||
|
||||
var fileName = System.Windows.Application.ResourceAssembly.Location;
|
||||
foreach (var file in Directory.GetFiles(Directory.GetCurrentDirectory(), "*.exe"))
|
||||
if (Path.GetFileName(file).Contains(Path.GetFileNameWithoutExtension(fileName)))
|
||||
{
|
||||
fileName = file;
|
||||
break;
|
||||
}
|
||||
|
||||
p.StartInfo.FileName = fileName;
|
||||
|
||||
p.StartInfo.Arguments = (debug ? "--debug " : "") + "--skip";
|
||||
p.Start();
|
||||
|
||||
|
@ -1340,7 +1359,17 @@ namespace UWUVCI_AIO_WPF
|
|||
cm.ShowDialog();
|
||||
|
||||
Process p = new Process();
|
||||
p.StartInfo.FileName = System.Windows.Application.ResourceAssembly.Location;
|
||||
|
||||
var fileName = System.Windows.Application.ResourceAssembly.Location;
|
||||
foreach (var file in Directory.GetFiles(Directory.GetCurrentDirectory(), "*.exe"))
|
||||
if (Path.GetFileName(file).Contains(Path.GetFileNameWithoutExtension(fileName)))
|
||||
{
|
||||
fileName = file;
|
||||
break;
|
||||
}
|
||||
|
||||
p.StartInfo.FileName = fileName;
|
||||
|
||||
p.StartInfo.Arguments = (debug ? "--debug " : "") + "--skip";
|
||||
p.Start();
|
||||
|
||||
|
@ -3168,7 +3197,16 @@ namespace UWUVCI_AIO_WPF
|
|||
{
|
||||
using (Process p = new Process())
|
||||
{
|
||||
p.StartInfo.FileName = System.Windows.Application.ResourceAssembly.Location;
|
||||
var fileName = System.Windows.Application.ResourceAssembly.Location;
|
||||
foreach (var file in Directory.GetFiles(Directory.GetCurrentDirectory(), "*.exe"))
|
||||
if (Path.GetFileName(file).Contains(Path.GetFileNameWithoutExtension(fileName)))
|
||||
{
|
||||
fileName = file;
|
||||
break;
|
||||
}
|
||||
|
||||
p.StartInfo.FileName = fileName;
|
||||
|
||||
p.StartInfo.Arguments = (debug ? "--debug " : "") + "--skip" + (saveworkaround ? " --spacebypass" : "");
|
||||
p.Start();
|
||||
Environment.Exit(0);
|
||||
|
|
Loading…
Add table
Reference in a new issue