revert https://github.com/masckmaster2007/XPSLauncher/commit/bcd8d0053e115050510df49ac05377af2fa5506b
This commit is contained in:
1 parent
bcd8d0053e
commit
dfd98e303c
1 file changed
+3
-24
+3
-24
@@ -42,7 +42,6 @@ namespace XPSLauncher
|
|||||||
private static bool settingsOpen = false;
|
private static bool settingsOpen = false;
|
||||||
private static bool settingCloseOnLoad = false;
|
private static bool settingCloseOnLoad = false;
|
||||||
private static bool settingAllowMultipleInstances = false;
|
private static bool settingAllowMultipleInstances = false;
|
||||||
private static bool settingFix19GJP = false;
|
|
||||||
|
|
||||||
public Form1()
|
public Form1()
|
||||||
{
|
{
|
||||||
@@ -184,10 +183,10 @@ namespace XPSLauncher
|
|||||||
|
|
||||||
if (File.Exists(path) && !downloadingVersions[version] && !errorVersions[version])
|
if (File.Exists(path) && !downloadingVersions[version] && !errorVersions[version])
|
||||||
{
|
{
|
||||||
if ((settingAllowMultipleInstances && !IsProcessOpen(path)) || forceOpen)
|
if (settingAllowMultipleInstances || !IsProcessOpen(path) || forceOpen)
|
||||||
{
|
{
|
||||||
StartProcess(path);
|
StartProcess(path);
|
||||||
if(version == "1.9" && settingFix19GJP) {
|
if(version == "1.9") {
|
||||||
StartProcess(Path.Combine(executionPath, "gdps", "1.9", "XPS-Proxy.exe"));
|
StartProcess(Path.Combine(executionPath, "gdps", "1.9", "XPS-Proxy.exe"));
|
||||||
}
|
}
|
||||||
if (settingCloseOnLoad && !downloadingVersions["2.2"] && !downloadingVersions["2.1"] && !downloadingVersions["2.0"] && !downloadingVersions["1.9"])
|
if (settingCloseOnLoad && !downloadingVersions["2.2"] && !downloadingVersions["2.1"] && !downloadingVersions["2.0"] && !downloadingVersions["1.9"])
|
||||||
@@ -692,8 +691,7 @@ namespace XPSLauncher
|
|||||||
lastVersion = currentVersion,
|
lastVersion = currentVersion,
|
||||||
closeOnLoad = false,
|
closeOnLoad = false,
|
||||||
allowMultipleInstances = false,
|
allowMultipleInstances = false,
|
||||||
theme = 0,
|
theme = 0
|
||||||
fix19GJP = false
|
|
||||||
};
|
};
|
||||||
string jsonText = Newtonsoft.Json.JsonConvert.SerializeObject(json, Newtonsoft.Json.Formatting.Indented);
|
string jsonText = Newtonsoft.Json.JsonConvert.SerializeObject(json, Newtonsoft.Json.Formatting.Indented);
|
||||||
File.WriteAllText(configPath, jsonText);
|
File.WriteAllText(configPath, jsonText);
|
||||||
@@ -759,12 +757,6 @@ namespace XPSLauncher
|
|||||||
config.closeOnLoad = config.closeOnExit ?? false;
|
config.closeOnLoad = config.closeOnExit ?? false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.lastVersion == "2.2.0")
|
|
||||||
{
|
|
||||||
WriteConfig("fix19GJP", false);
|
|
||||||
config.fix19GJP = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
settingCloseOnLoad = config.closeOnLoad;
|
settingCloseOnLoad = config.closeOnLoad;
|
||||||
settingAllowMultipleInstances = config.allowMultipleInstances;
|
settingAllowMultipleInstances = config.allowMultipleInstances;
|
||||||
if (settingsOpen && settingCloseOnLoad)
|
if (settingsOpen && settingCloseOnLoad)
|
||||||
@@ -861,19 +853,6 @@ namespace XPSLauncher
|
|||||||
WriteConfig("allowMultipleInstances", settingAllowMultipleInstances);
|
WriteConfig("allowMultipleInstances", settingAllowMultipleInstances);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Toggle19GJPFix(object sender = null, EventArgs e = null)
|
|
||||||
{
|
|
||||||
if (settingFix19GJP)
|
|
||||||
{
|
|
||||||
settingFix19GJP = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
settingFix19GJP = true;
|
|
||||||
}
|
|
||||||
WriteConfig("fix19GJP", settingAllowMultipleInstances);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<int> GetPIDsByApplicationPath(string applicationPath)
|
public List<int> GetPIDsByApplicationPath(string applicationPath)
|
||||||
{
|
{
|
||||||
var pids = new List<int>();
|
var pids = new List<int>();
|
||||||
|
|||||||
Reference in new issue
Block a user