Compare commits
311 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
18123b2755 | ||
|
|
bbda0f33bd | ||
|
|
1edd364a33 | ||
|
|
89d6acb623 | ||
|
|
ff2f648379 | ||
|
|
0d9cf1cd91 | ||
|
|
40505f7628 | ||
|
|
3dee5372f2 | ||
|
|
6ee5b1014b | ||
|
|
189ba62385 | ||
|
|
b09e7ff2bc | ||
|
|
31492a0af3 | ||
|
|
f3d81252f0 | ||
|
|
e795b85ab8 | ||
|
|
3c4e4677d4 | ||
|
|
9f584da9ab | ||
|
|
a440848584 | ||
|
|
2301aa6425 | ||
|
|
263f2bf4c1 | ||
|
|
59d0c9a7ce | ||
|
|
19432a6362 | ||
|
|
97ec1cd385 | ||
|
|
162d60bbdc | ||
|
|
3bcdc7871d | ||
|
|
1f845a3682 | ||
|
|
a0a97a9451 | ||
|
|
c6261687b3 | ||
|
|
6deb311ecc | ||
|
|
0c6c8d5546 | ||
|
|
4e391c0e56 | ||
|
|
9788aa494a | ||
|
|
4f0cc7ab71 | ||
|
|
0bf9a00af2 | ||
|
|
fa9baced7a | ||
|
|
1f51f41954 | ||
|
|
bc8599315e | ||
|
|
1c49a33651 | ||
|
|
13ab8a74d6 | ||
|
|
51155f105c | ||
|
|
af46aa7c78 | ||
|
|
a7d46753aa | ||
|
|
161f257985 | ||
|
|
223de0ba4a | ||
|
|
2fa9c34e98 | ||
|
|
5d5011e409 | ||
|
|
fd4357bdad | ||
|
|
1a073f9661 | ||
|
|
e73c204d1c | ||
|
|
80cb0b46bc | ||
|
|
680a5f256a | ||
|
|
2b02d04219 | ||
|
|
7a61d73e65 | ||
|
|
972116ee96 | ||
|
|
d780607363 | ||
|
|
236004aef9 | ||
|
|
07bc133096 | ||
|
|
50427ef2d3 | ||
|
|
63eef42ca0 | ||
|
|
8723b195df | ||
|
|
ae86b47268 | ||
|
|
9901a0d770 | ||
|
|
da48607154 | ||
|
|
35f3a80eb1 | ||
|
|
0da1bf7a3b | ||
|
|
c027fca339 | ||
|
|
5ac98f5ef8 | ||
|
|
3cb0cca801 | ||
|
|
b4fd4c76a0 | ||
|
|
ecf19115c6 | ||
|
|
d475936bbb | ||
|
|
c404d69b54 | ||
|
|
6edc9cf7e9 | ||
|
|
71d89284f1 | ||
|
|
39473ba15c | ||
|
|
3f3fa3dc11 | ||
|
|
3f06099d38 | ||
|
|
450cf282aa | ||
|
|
804c452f6d | ||
|
|
c576f62d28 | ||
|
|
73651723dd | ||
|
|
82cc713372 | ||
|
|
6d0788268d | ||
|
|
c183cb6d7a | ||
|
|
3b83db0177 | ||
|
|
03f4dcb687 | ||
|
|
9415daba07 | ||
|
|
553571027d | ||
|
|
273ddda076 | ||
|
|
3c8f08a380 | ||
|
|
b5ac8175dc | ||
|
|
d765a9b6eb | ||
|
|
409afd8eac | ||
|
|
d7640d4c5d | ||
|
|
3828da4864 | ||
|
|
a45f7db85c | ||
|
|
df6a9e9286 | ||
|
|
c516f80dc1 | ||
|
|
0ef2f296f5 | ||
|
|
48597983e2 | ||
|
|
a6a4a057fe | ||
|
|
c7cfc07c9b | ||
|
|
51ad390584 | ||
|
|
b4c7795d25 | ||
|
|
78ef2a0355 | ||
|
|
4530424dec | ||
|
|
3543314ff0 | ||
|
|
4ade18bd31 | ||
|
|
951a899705 | ||
|
|
6d678a2e6e | ||
|
|
8b912e68ee | ||
|
|
8059834e91 | ||
|
|
4349603f51 | ||
|
|
160f254e57 | ||
|
|
45497396d1 | ||
|
|
d041ea6b6a | ||
|
|
a2e601ced0 | ||
|
|
35277ca729 | ||
|
|
f3ffe5d037 | ||
|
|
38866547ec | ||
|
|
f4cd9b3b9f | ||
|
|
e687c3f2ba | ||
|
|
97cbfdea4e | ||
|
|
af97e8aef1 | ||
|
|
2094ecb0ba | ||
|
|
928436eda3 | ||
|
|
5b1a7de921 | ||
|
|
e679f2a1b2 | ||
|
|
9113b376b9 | ||
|
|
9169ec9b81 | ||
|
|
41605aabb7 | ||
|
|
fe56be4ea1 | ||
|
|
e916ef9b45 | ||
|
|
aa51f380b5 | ||
|
|
a9883261da | ||
|
|
314a06d43f | ||
|
|
0992636fa3 | ||
|
|
184b7c9cbb | ||
|
|
47fd128509 | ||
|
|
5f88c09b1c | ||
|
|
525c99c0ae | ||
|
|
46bcdf0adf | ||
|
|
4b2a0d7e4e | ||
|
|
53f2508941 | ||
|
|
cb0ddaf084 | ||
|
|
3dd9b2c694 | ||
|
|
8516b14d4a | ||
|
|
cdc8f43a66 | ||
|
|
ce5cf80f96 | ||
|
|
c7522ccf10 | ||
|
|
f817cb7be5 | ||
|
|
f22acb4bd6 | ||
|
|
26d894e02c | ||
|
|
32f37cd98a | ||
|
|
66bd13d5d5 | ||
|
|
31e294ae4f | ||
|
|
3b771408ae | ||
|
|
e55f19c7e5 | ||
|
|
e24f6ee0e4 | ||
|
|
d1e92391d4 | ||
|
|
c24829f6a4 | ||
|
|
7f9ddb4875 | ||
|
|
c644e3e675 | ||
|
|
a9864c7fb5 | ||
|
|
2d57e47d55 | ||
|
|
377e5a6751 | ||
|
|
c17cc3f601 | ||
|
|
8bfd84fa16 | ||
|
|
629d4c3ee9 | ||
|
|
50284d0eb6 | ||
|
|
6a848513b1 | ||
|
|
5b5d3abd2b | ||
|
|
c06d606164 | ||
|
|
6b6fb66a7d | ||
|
|
80a85f3858 | ||
|
|
ee5222165c | ||
|
|
73367c9698 | ||
|
|
ce370d4575 | ||
|
|
374685eeae | ||
|
|
3453ca1c5b | ||
|
|
650913f1e8 | ||
|
|
07683d2342 | ||
|
|
519ec07af8 | ||
|
|
d356b68c33 | ||
|
|
69f3509c17 | ||
|
|
23d68ac9cc | ||
|
|
d4219bdd3f | ||
|
|
ff396081e1 | ||
|
|
b65df31ff9 | ||
|
|
c88c2c58a5 | ||
|
|
1d72df573a | ||
|
|
0f6001b312 | ||
|
|
f9f33336db | ||
|
|
8ba8322836 | ||
|
|
1142a67f88 | ||
|
|
95eb1d545e | ||
|
|
f234bae2a3 | ||
|
|
5ea6a48ee1 | ||
|
|
e6ac747f5d | ||
|
|
11e637bcb7 | ||
|
|
89935e4f80 | ||
|
|
f1f9ec47be | ||
|
|
ca69e44f99 | ||
|
|
820f5d1bb5 | ||
|
|
ee9ed6386d | ||
|
|
a97ca0b240 | ||
|
|
b5dc15cb9a | ||
|
|
75a41fb028 | ||
|
|
7cf1baec25 | ||
|
|
0763917adf | ||
|
|
2344d7ce51 | ||
|
|
f8724bae66 | ||
|
|
b705c56948 | ||
|
|
60b9fe5809 | ||
|
|
32ea38867a | ||
|
|
dd1044ee3d | ||
|
|
7f4e828567 | ||
|
|
64ec55ba54 | ||
|
|
39fa784540 | ||
|
|
4a20f2fd89 | ||
|
|
1a860399d9 | ||
|
|
502b259b8c | ||
|
|
c010fda0db | ||
|
|
743b9d1d54 | ||
|
|
7506282950 | ||
|
|
2346accccc | ||
|
|
dd69b75c7f | ||
|
|
a71ebaedc3 | ||
|
|
1c85b91f32 | ||
|
|
b130644c47 | ||
|
|
0febf9ef0d | ||
|
|
c1e9a5dcfc | ||
|
|
3ddba35295 | ||
|
|
2aede4a341 | ||
|
|
19d6e25f06 | ||
|
|
0b5d3bfddd | ||
|
|
823c2607d9 | ||
|
|
d8bbac3096 | ||
|
|
8af2b7dd66 | ||
|
|
d480f13024 | ||
|
|
40a02cc8e0 | ||
|
|
505c145794 | ||
|
|
79648f2e07 | ||
|
|
02b03328d1 | ||
|
|
34046ecb4b | ||
|
|
6ecba949c2 | ||
|
|
3edadfa475 | ||
|
|
99aab8bc2e | ||
|
|
0c52656a5e | ||
|
|
1e0be54c43 | ||
|
|
bf91c1f9f3 | ||
|
|
3314228b9c | ||
|
|
8c26242af7 | ||
|
|
a75bd355cf | ||
|
|
ea19b936cb | ||
|
|
3dbd5cee3a | ||
|
|
07c312fa33 | ||
|
|
8d15dcb5c9 | ||
|
|
fd9d2bfccc | ||
|
|
3497270b26 | ||
|
|
1f505e1a28 | ||
|
|
96758aba7e | ||
|
|
b538244b6f | ||
|
|
04e7e54556 | ||
|
|
372002dfa5 | ||
|
|
401b21b715 | ||
|
|
e09d1fec5d | ||
|
|
2e8ab3bd43 | ||
|
|
c060038e50 | ||
|
|
d73f84dbb4 | ||
|
|
3e69119df2 | ||
|
|
a9e11e3734 | ||
|
|
ca742146d9 | ||
|
|
de47ab6ad3 | ||
|
|
9cff4a32b2 | ||
|
|
1744ef86bf | ||
|
|
46b3bafeb7 | ||
|
|
76b372f822 | ||
|
|
782485edd0 | ||
|
|
84f444ab55 | ||
|
|
83283d6bda | ||
|
|
4cd3769115 | ||
|
|
c44b4adf60 | ||
|
|
fa59f45184 | ||
|
|
79323dfe58 | ||
|
|
2bfb402c25 | ||
|
|
13e1866820 | ||
|
|
1462aaa30e | ||
|
|
5fbe50b2f9 | ||
|
|
d747596ce1 | ||
|
|
696fff3f5d | ||
|
|
87108d5640 | ||
|
|
8bc0b1cbaf | ||
|
|
b6110ad703 | ||
|
|
f48d2ef40d | ||
|
|
3e4bfe22d8 | ||
|
|
199e2cbaec | ||
|
|
24f9f961b9 | ||
|
|
e9b3f52f0e | ||
|
|
acf0649150 | ||
|
|
df2e35d683 | ||
|
|
19074465a0 | ||
|
|
7d8e143963 | ||
|
|
48c004794c | ||
|
|
b011b3e7a2 | ||
|
|
43daff617a | ||
|
|
ef6a1dc5a4 | ||
|
|
8c5b2d623b | ||
|
|
d3a2c4012c | ||
|
|
67a9089952 | ||
|
|
22ecbee791 | ||
|
|
e07ffa54ee |
21
.gitignore
vendored
21
.gitignore
vendored
@@ -1,21 +1,8 @@
|
||||
################################################################################
|
||||
# This .gitignore file was automatically created by Microsoft(R) Visual Studio.
|
||||
################################################################################
|
||||
*.pdb
|
||||
*.xml
|
||||
*.xsd
|
||||
bin/
|
||||
adb/
|
||||
rclone/
|
||||
thumbnails/
|
||||
notes/
|
||||
AndroidSideloader.csproj.user
|
||||
|
||||
.vs/
|
||||
/.vs/AndroidSideloader/v16/.suo
|
||||
/adb/adb.exe
|
||||
installedPackages.json
|
||||
AndroidSideloader.csproj.user
|
||||
AndroidSideloader.csproj.user
|
||||
AndroidSideloader.csproj.user
|
||||
/AndroidSideloader v2.1.exe
|
||||
/crashlog.txt
|
||||
/debuglog.txt
|
||||
bin/
|
||||
packages/
|
||||
331
ADB.cs
331
ADB.cs
@@ -1,21 +1,16 @@
|
||||
using System;
|
||||
using JR.Utils.GUI.Forms;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using JR.Utils.GUI.Forms;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
|
||||
|
||||
class ADB
|
||||
internal class ADB
|
||||
{
|
||||
static Process adb = new Process();
|
||||
public static string adbFolderPath = "C:\\RSL\\platform-tools";
|
||||
public static string adbFilePath = adbFolderPath + "\\adb.exe";
|
||||
private static readonly Process adb = new Process();
|
||||
public static string adbFolderPath = Path.Combine(Path.GetPathRoot(Environment.SystemDirectory), "RSL", "platform-tools");
|
||||
public static string adbFilePath = Path.Combine(adbFolderPath, "adb.exe");
|
||||
public static string DeviceID = "";
|
||||
public static string package = "";
|
||||
public static ProcessOutput RunAdbCommandToString(string command)
|
||||
@@ -29,72 +24,75 @@ namespace AndroidSideloader
|
||||
}
|
||||
if (!command.Contains("dumpsys") && !command.Contains("shell pm list packages") && !command.Contains("KEYCODE_WAKEUP"))
|
||||
{
|
||||
|
||||
string logcmd = command;
|
||||
|
||||
if (logcmd.Contains(Environment.CurrentDirectory))
|
||||
{
|
||||
logcmd = logcmd.Replace($"{Environment.CurrentDirectory}", $"CurrentDirectory");
|
||||
Logger.Log($"Running command: {logcmd}");
|
||||
}
|
||||
adb.StartInfo.FileName = adbFilePath;
|
||||
adb.StartInfo.Arguments = command;
|
||||
adb.StartInfo.RedirectStandardError = true;
|
||||
adb.StartInfo.RedirectStandardInput = true;
|
||||
adb.StartInfo.RedirectStandardOutput = true;
|
||||
adb.StartInfo.CreateNoWindow = true;
|
||||
adb.StartInfo.UseShellExecute = false;
|
||||
adb.StartInfo.WorkingDirectory = adbFolderPath;
|
||||
adb.Start();
|
||||
adb.StandardInput.WriteLine(command);
|
||||
adb.StandardInput.Flush();
|
||||
adb.StandardInput.Close();
|
||||
|
||||
string output = "";
|
||||
string error = "";
|
||||
|
||||
try
|
||||
{
|
||||
output = adb.StandardOutput.ReadToEnd();
|
||||
error = adb.StandardError.ReadToEnd();
|
||||
}
|
||||
catch { }
|
||||
if (command.Contains("connect"))
|
||||
{
|
||||
bool graceful = adb.WaitForExit(3000); //Wait 3 secs.
|
||||
if (!graceful)
|
||||
{
|
||||
adb.Kill();
|
||||
}
|
||||
|
||||
_ = Logger.Log($"Running command: {logcmd}");
|
||||
}
|
||||
else
|
||||
adb.WaitForExit();
|
||||
if (error.Contains("ADB_VENDOR_KEYS") && !Properties.Settings.Default.adbdebugwarned)
|
||||
|
||||
using (Process adb = new Process())
|
||||
{
|
||||
DialogResult dialogResult = FlexibleMessageBox.Show("Please check inside your headset for ADB DEBUGGING prompt, check box to \"Always allow from this computer.\" and hit OK.\nPlease note that even if you have done this\nbefore it will reset itself from time to time.\n\nPress CANCEL if you want to disable this prompt (FOR DEBUGGING ONLY, NOT RECOMMENDED).", "ADB Debugging not enabled.", MessageBoxButtons.OKCancel);
|
||||
if (dialogResult == DialogResult.Cancel)
|
||||
adb.StartInfo.FileName = adbFilePath;
|
||||
adb.StartInfo.Arguments = command;
|
||||
adb.StartInfo.RedirectStandardError = true;
|
||||
adb.StartInfo.RedirectStandardOutput = true;
|
||||
adb.StartInfo.CreateNoWindow = true;
|
||||
adb.StartInfo.UseShellExecute = false;
|
||||
adb.StartInfo.WorkingDirectory = adbFolderPath;
|
||||
_ = adb.Start();
|
||||
|
||||
string output = "";
|
||||
string error = "";
|
||||
|
||||
try
|
||||
{
|
||||
Properties.Settings.Default.adbdebugwarned = true;
|
||||
Properties.Settings.Default.Save();
|
||||
output = adb.StandardOutput.ReadToEnd();
|
||||
error = adb.StandardError.ReadToEnd();
|
||||
}
|
||||
else
|
||||
ADB.WakeDevice();
|
||||
catch { }
|
||||
|
||||
if (command.Contains("connect"))
|
||||
{
|
||||
bool graceful = adb.WaitForExit(3000);
|
||||
if (!graceful)
|
||||
{
|
||||
adb.Kill();
|
||||
adb.WaitForExit();
|
||||
}
|
||||
}
|
||||
|
||||
if (error.Contains("ADB_VENDOR_KEYS") && !Properties.Settings.Default.adbdebugwarned)
|
||||
{
|
||||
ADBDebugWarning();
|
||||
}
|
||||
if (error.Contains("not enough storage space"))
|
||||
{
|
||||
_ = FlexibleMessageBox.Show(Program.form, "There is not enough room on your device to install this package. Please clear AT LEAST 2x the amount of the app you are trying to install.");
|
||||
}
|
||||
if (!output.Contains("version") && !output.Contains("KEYCODE_WAKEUP") && !output.Contains("Filesystem") && !output.Contains("package:") && !output.Equals(null))
|
||||
{
|
||||
_ = Logger.Log(output);
|
||||
}
|
||||
|
||||
_ = Logger.Log(error, LogLevel.ERROR);
|
||||
return new ProcessOutput(output, error);
|
||||
}
|
||||
if (error.Contains("not enough storage space"))
|
||||
{
|
||||
FlexibleMessageBox.Show("There is not enough room on your device to install this package. Please clear AT LEAST 2x the amount of the app you are trying to install.");
|
||||
}
|
||||
if (!output.Contains("version") && !output.Contains("KEYCODE_WAKEUP") && !output.Contains("Filesystem") && !output.Contains("package:") && !output.Equals(null))
|
||||
Logger.Log(output);
|
||||
Logger.Log(error);
|
||||
return new ProcessOutput(output, error);
|
||||
}
|
||||
|
||||
public static ProcessOutput RunAdbCommandToStringWOADB(string result, string path)
|
||||
{
|
||||
string command = result;
|
||||
string logcmd = command;
|
||||
if (logcmd.Contains(Environment.CurrentDirectory))
|
||||
{
|
||||
logcmd = logcmd.Replace($"{Environment.CurrentDirectory}", $"CurrentDirectory");
|
||||
Logger.Log($"Running command: {logcmd}");
|
||||
}
|
||||
|
||||
_ = Logger.Log($"Running command: {logcmd}");
|
||||
|
||||
adb.StartInfo.FileName = "cmd.exe";
|
||||
adb.StartInfo.RedirectStandardError = true;
|
||||
@@ -103,7 +101,7 @@ namespace AndroidSideloader
|
||||
adb.StartInfo.CreateNoWindow = true;
|
||||
adb.StartInfo.UseShellExecute = false;
|
||||
adb.StartInfo.WorkingDirectory = Path.GetDirectoryName(path);
|
||||
adb.Start();
|
||||
_ = adb.Start();
|
||||
adb.StandardInput.WriteLine(command);
|
||||
adb.StandardInput.Flush();
|
||||
adb.StandardInput.Close();
|
||||
@@ -124,34 +122,24 @@ namespace AndroidSideloader
|
||||
if (!graceful)
|
||||
{
|
||||
adb.Kill();
|
||||
}
|
||||
else
|
||||
adb.WaitForExit();
|
||||
}
|
||||
}
|
||||
else if (command.Contains("install"))
|
||||
else if (command.Contains("connect"))
|
||||
{
|
||||
bool graceful = adb.WaitForExit(120000);
|
||||
bool graceful = adb.WaitForExit(3000);
|
||||
if (!graceful)
|
||||
{
|
||||
adb.Kill();
|
||||
}
|
||||
else
|
||||
adb.WaitForExit();
|
||||
}
|
||||
}
|
||||
|
||||
if (error.Contains("ADB_VENDOR_KEYS") && Properties.Settings.Default.adbdebugwarned)
|
||||
{
|
||||
DialogResult dialogResult = FlexibleMessageBox.Show("Please check inside your headset for ADB DEBUGGING prompt, check box to \"Always allow from this computer.\" and hit OK.\nPlease note that even if you have done this\nbefore it will reset itself from time to time.\n\nPress CANCEL if you want to disable this prompt (FOR DEBUGGING ONLY, NOT RECOMMENDED).", "ADB Debugging not enabled.", MessageBoxButtons.OKCancel);
|
||||
if (dialogResult == DialogResult.Cancel)
|
||||
{
|
||||
Properties.Settings.Default.adbdebugwarned = true;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
else
|
||||
ADB.WakeDevice();
|
||||
ADBDebugWarning();
|
||||
}
|
||||
Logger.Log(output);
|
||||
Logger.Log(error);
|
||||
_ = Logger.Log(output);
|
||||
_ = Logger.Log(error, LogLevel.ERROR);
|
||||
return new ProcessOutput(output, error);
|
||||
}
|
||||
public static ProcessOutput RunCommandToString(string result, string path = "")
|
||||
@@ -159,9 +147,12 @@ namespace AndroidSideloader
|
||||
string command = result;
|
||||
string logcmd = command;
|
||||
if (logcmd.Contains(Environment.CurrentDirectory))
|
||||
{
|
||||
logcmd = logcmd.Replace($"{Environment.CurrentDirectory}", $"CurrentDirectory");
|
||||
Logger.Log($"Running command: {logcmd}");
|
||||
adb.StartInfo.FileName = @"C:\Windows\System32\cmd.exe";
|
||||
}
|
||||
|
||||
_ = Logger.Log($"Running command: {logcmd}");
|
||||
adb.StartInfo.FileName = $@"{Path.GetPathRoot(Environment.SystemDirectory)}\Windows\System32\cmd.exe";
|
||||
adb.StartInfo.Arguments = command;
|
||||
adb.StartInfo.RedirectStandardError = true;
|
||||
adb.StartInfo.RedirectStandardInput = true;
|
||||
@@ -169,7 +160,7 @@ namespace AndroidSideloader
|
||||
adb.StartInfo.CreateNoWindow = true;
|
||||
adb.StartInfo.UseShellExecute = false;
|
||||
adb.StartInfo.WorkingDirectory = Path.GetDirectoryName(path);
|
||||
adb.Start();
|
||||
_ = adb.Start();
|
||||
adb.StandardInput.WriteLine(command);
|
||||
adb.StandardInput.Flush();
|
||||
adb.StandardInput.Close();
|
||||
@@ -190,31 +181,34 @@ namespace AndroidSideloader
|
||||
if (!graceful)
|
||||
{
|
||||
adb.Kill();
|
||||
adb.WaitForExit();
|
||||
}
|
||||
}
|
||||
else
|
||||
adb.WaitForExit();
|
||||
|
||||
|
||||
if (error.Contains("ADB_VENDOR_KEYS") && Properties.Settings.Default.adbdebugwarned)
|
||||
{
|
||||
DialogResult dialogResult = FlexibleMessageBox.Show("Please check inside your headset for ADB DEBUGGING prompt, check box to \"Always allow from this computer.\" and hit OK.\nPlease note that even if you have done this\nbefore it will reset itself from time to time.\n\nPress CANCEL if you want to disable this prompt (FOR DEBUGGING ONLY, NOT RECOMMENDED).", "ADB Debugging not enabled.", MessageBoxButtons.OKCancel);
|
||||
ADBDebugWarning();
|
||||
}
|
||||
_ = Logger.Log(output);
|
||||
_ = Logger.Log(error, LogLevel.ERROR);
|
||||
return new ProcessOutput(output, error);
|
||||
}
|
||||
|
||||
public static void ADBDebugWarning()
|
||||
{
|
||||
Program.form.Invoke(() =>
|
||||
{
|
||||
DialogResult dialogResult = FlexibleMessageBox.Show(Program.form, "Please check inside your headset for ADB DEBUGGING prompt, check box to \"Always allow from this computer.\" and hit OK.\nPlease note that even if you have done this\nbefore it will reset itself from time to time.\n\nPress CANCEL if you want to disable this prompt (FOR DEBUGGING ONLY, NOT RECOMMENDED).", "ADB Debugging not enabled.", MessageBoxButtons.OKCancel);
|
||||
if (dialogResult == DialogResult.Cancel)
|
||||
{
|
||||
Properties.Settings.Default.adbdebugwarned = true;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
else
|
||||
ADB.WakeDevice();
|
||||
}
|
||||
Logger.Log(output);
|
||||
Logger.Log(error);
|
||||
return new ProcessOutput(output, error);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public static ProcessOutput UninstallPackage(string package)
|
||||
{
|
||||
WakeDevice();
|
||||
ProcessOutput output = new ProcessOutput("", "");
|
||||
output += RunAdbCommandToString($"shell pm uninstall {package}");
|
||||
return output;
|
||||
@@ -223,155 +217,96 @@ namespace AndroidSideloader
|
||||
public static string GetAvailableSpace()
|
||||
{
|
||||
long totalSize = 0;
|
||||
|
||||
long usedSize = 0;
|
||||
|
||||
long freeSize = 0;
|
||||
WakeDevice();
|
||||
var output = RunAdbCommandToString("shell df").Output.Split('\n');
|
||||
|
||||
string[] output = RunAdbCommandToString("shell df").Output.Split('\n');
|
||||
|
||||
foreach (string currLine in output)
|
||||
{
|
||||
if (currLine.StartsWith("/data/media"))
|
||||
if (currLine.StartsWith("/dev/fuse") || currLine.StartsWith("/data/media"))
|
||||
{
|
||||
var foo = currLine.Split(' ');
|
||||
int i = 0;
|
||||
foreach (string curr in foo)
|
||||
string[] foo = currLine.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
if (foo.Length >= 4)
|
||||
{
|
||||
if (curr.Length > 1)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
totalSize = Int64.Parse(curr) / 1000;
|
||||
break;
|
||||
case 2:
|
||||
usedSize = Int64.Parse(curr) / 1000;
|
||||
break;
|
||||
case 3:
|
||||
freeSize = Int64.Parse(curr) / 1000;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
totalSize = long.Parse(foo[1]) / 1000;
|
||||
usedSize = long.Parse(foo[2]) / 1000;
|
||||
freeSize = long.Parse(foo[3]) / 1000;
|
||||
break; // Assuming we only need the first matching line
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $"Total space: {String.Format("{0:0.00}", (double)totalSize / 1000)}GB\nUsed space: {String.Format("{0:0.00}", (double)usedSize / 1000)}GB\nFree space: {String.Format("{0:0.00}", (double)freeSize / 1000)}GB";
|
||||
return $"Total space: {string.Format("{0:0.00}", (double)totalSize / 1000)}GB\nUsed space: {string.Format("{0:0.00}", (double)usedSize / 1000)}GB\nFree space: {string.Format("{0:0.00}", (double)freeSize / 1000)}GB";
|
||||
}
|
||||
|
||||
public static bool wirelessadbON;
|
||||
|
||||
public static void WakeDevice()
|
||||
{
|
||||
RunAdbCommandToString("shell input keyevent KEYCODE_WAKEUP");
|
||||
if (!String.IsNullOrEmpty(Properties.Settings.Default.IPAddress) && !Properties.Settings.Default.Wired)
|
||||
RunAdbCommandToString(Properties.Settings.Default.IPAddress);
|
||||
}
|
||||
|
||||
|
||||
public static ProcessOutput Sideload(string path, string packagename = "")
|
||||
{
|
||||
|
||||
WakeDevice();
|
||||
ProcessOutput ret = new ProcessOutput();
|
||||
ret += RunAdbCommandToString($"install -g \"{path}\"");
|
||||
string out2 = ret.Output + ret.Error;
|
||||
if (out2.Contains("failed"))
|
||||
{
|
||||
string BackupFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), $"Rookie Backups");
|
||||
Logger.Log(out2);
|
||||
_ = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), $"Rookie Backups");
|
||||
_ = Logger.Log(out2);
|
||||
if (out2.Contains("offline") && !Properties.Settings.Default.nodevicemode)
|
||||
{
|
||||
DialogResult dialogResult2 = FlexibleMessageBox.Show("Device is offline. Press Yes to reconnect, or if you don't wish to connect and just want to download the game (requires unchecking \"Delete games after install\" from settings menu) then press No.", "Device offline.", MessageBoxButtons.YesNoCancel);
|
||||
if (dialogResult2 == DialogResult.Yes)
|
||||
ADB.WakeDevice();
|
||||
DialogResult dialogResult2 = FlexibleMessageBox.Show(Program.form, "Device is offline. Press Yes to reconnect, or if you don't wish to connect and just want to download the game (requires unchecking \"Delete games after install\" from settings menu) then press No.", "Device offline.", MessageBoxButtons.YesNoCancel);
|
||||
}
|
||||
if (out2.Contains($"signatures do not match previously") || out2.Contains("INSTALL_FAILED_VERSION_DOWNGRADE") || out2.Contains("signatures do not match") || out2.Contains("failed to install"))
|
||||
{
|
||||
ret.Error = string.Empty;
|
||||
ret.Output = string.Empty;
|
||||
ADB.WakeDevice();
|
||||
if (!Properties.Settings.Default.AutoReinstall)
|
||||
{
|
||||
DialogResult dialogResult1 = FlexibleMessageBox.Show("In place upgrade has failed. Rookie can attempt to backup your save data and\nreinstall the game automatically, however " +
|
||||
"some games do not store their saves\nin an accessible location(less than 5%). Continue with reinstall?", "In place upgrade failed.", MessageBoxButtons.OKCancel);
|
||||
if (dialogResult1 == DialogResult.Cancel)
|
||||
bool cancelClicked = false;
|
||||
|
||||
if (!Properties.Settings.Default.AutoReinstall)
|
||||
{
|
||||
Program.form.Invoke((MethodInvoker)(() =>
|
||||
{
|
||||
DialogResult dialogResult1 = FlexibleMessageBox.Show(Program.form, "In place upgrade has failed. Rookie can attempt to backup your save data and reinstall the game automatically, however some games do not store their saves in an accessible location (less than 5%). Continue with reinstall?", "In place upgrade failed.", MessageBoxButtons.OKCancel);
|
||||
if (dialogResult1 == DialogResult.Cancel)
|
||||
cancelClicked = true;
|
||||
}));
|
||||
}
|
||||
|
||||
if (cancelClicked)
|
||||
return ret;
|
||||
}
|
||||
|
||||
Program.form.ChangeTitle("Performing reinstall, please wait...");
|
||||
ADB.RunAdbCommandToString("kill-server");
|
||||
ADB.RunAdbCommandToString("devices");
|
||||
ADB.RunAdbCommandToString($"pull /sdcard/Android/data/{MainForm.CurrPCKG} \"{Environment.CurrentDirectory}\"");
|
||||
Program.form.ChangeTitle("Uninstalling game...");
|
||||
Sideloader.UninstallGame(MainForm.CurrPCKG);
|
||||
Program.form.ChangeTitle("Reinstalling Game");
|
||||
ret += ADB.RunAdbCommandToString($"install -g \"{path}\"");
|
||||
ADB.RunAdbCommandToString($"push \"{Environment.CurrentDirectory}\\{MainForm.CurrPCKG}\" /sdcard/Android/data/");
|
||||
if (Directory.Exists($"{Environment.CurrentDirectory}\\{MainForm.CurrPCKG}"))
|
||||
Directory.Delete($"{Environment.CurrentDirectory}\\{MainForm.CurrPCKG}", true);
|
||||
|
||||
Program.form.ChangeTitle(" \n\n");
|
||||
Program.form.changeTitle("Performing reinstall, please wait...");
|
||||
_ = ADB.RunAdbCommandToString("kill-server");
|
||||
_ = ADB.RunAdbCommandToString("devices");
|
||||
_ = ADB.RunAdbCommandToString($"pull /sdcard/Android/data/{MainForm.CurrPCKG} \"{Environment.CurrentDirectory}\"");
|
||||
Program.form.changeTitle("Uninstalling game...");
|
||||
_ = Sideloader.UninstallGame(MainForm.CurrPCKG);
|
||||
Program.form.changeTitle("Reinstalling Game");
|
||||
ret += ADB.RunAdbCommandToString($"install -g \"{path}\"");
|
||||
_ = ADB.RunAdbCommandToString($"push \"{Environment.CurrentDirectory}\\{MainForm.CurrPCKG}\" /sdcard/Android/data/");
|
||||
if (Directory.Exists($"{Environment.CurrentDirectory}\\{MainForm.CurrPCKG}"))
|
||||
{
|
||||
Directory.Delete($"{Environment.CurrentDirectory}\\{MainForm.CurrPCKG}", true);
|
||||
}
|
||||
|
||||
Program.form.changeTitle(" \n\n");
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
string gamenameforQU = Sideloader.PackageNametoGameName(packagename);
|
||||
if (Properties.Settings.Default.QUturnedon)
|
||||
{
|
||||
if (gamenameforQU.Contains("-QU") || path.Contains("-QU"))
|
||||
{
|
||||
string gameName = packagename;
|
||||
packagename = Sideloader.gameNameToPackageName(gameName);
|
||||
|
||||
Program.form.ChangeTitle("Pushing Custom QU S3 Config.JSON.");
|
||||
if (!Directory.Exists($"/sdcard/android/data/{packagename}"))
|
||||
RunAdbCommandToString($"shell mkdir /sdcard/android/data/{packagename}");
|
||||
if (!Directory.Exists($"/sdcard/android/data/{packagename}/private"))
|
||||
RunAdbCommandToString($"shell mkdir /sdcard/android/data/{packagename}/private");
|
||||
|
||||
Random r = new Random();
|
||||
int x = r.Next(999999999);
|
||||
int y = r.Next(9999999);
|
||||
|
||||
var sum = ((long)y * (long)1000000000) + (long)x;
|
||||
|
||||
int x2 = r.Next(999999999);
|
||||
int y2 = r.Next(9999999);
|
||||
|
||||
var sum2 = ((long)y2 * (long)1000000000) + (long)x2;
|
||||
ADB.WakeDevice();
|
||||
Properties.Settings.Default.QUStringF = $"{{\"user_id\":{sum},\"app_id\":\"{sum2}\",";
|
||||
Properties.Settings.Default.Save();
|
||||
string boff = Properties.Settings.Default.QUStringF + Properties.Settings.Default.QUString;
|
||||
File.WriteAllText($"{Properties.Settings.Default.MainDir}\\config.json", boff);
|
||||
string blank = "";
|
||||
File.WriteAllText($"{Properties.Settings.Default.MainDir}\\delete_settings", blank);
|
||||
ret += ADB.RunAdbCommandToString($"push \"{Properties.Settings.Default.MainDir}\\delete_settings\" /sdcard/android/data/{packagename}/private/delete_settings");
|
||||
ret += ADB.RunAdbCommandToString($"push \"{Properties.Settings.Default.MainDir}\\config.json\" /sdcard/android/data/{packagename}/private/config.json");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Program.form.ChangeTitle("");
|
||||
Program.form.changeTitle(string.Empty);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static ProcessOutput CopyOBB(string path)
|
||||
{
|
||||
WakeDevice();
|
||||
|
||||
string folder = Path.GetFileName(path);
|
||||
if (!folder.Contains("+") && !folder.Contains("_") && folder.Contains("."))
|
||||
{
|
||||
return RunAdbCommandToString($"push \"{path}\" \"/sdcard/Android/obb\"");
|
||||
}
|
||||
return new ProcessOutput();
|
||||
string lastFolder = Path.GetFileName(path);
|
||||
return folder.Contains(".")
|
||||
? RunAdbCommandToString($"shell rm -rf /sdcard/Android/obb/{lastFolder} && mkdir /sdcard/Android/obb/{lastFolder}") + RunAdbCommandToString($"push \"{path}\" \"/sdcard/Android/obb\"")
|
||||
: new ProcessOutput("No OBB Folder found");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<UseShortFileNames>True</UseShortFileNames>
|
||||
@@ -48,14 +49,14 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>icon.ico</ApplicationIcon>
|
||||
@@ -138,21 +139,35 @@
|
||||
<Reference Include="Costura, Version=4.1.0.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Costura.Fody.4.1.0\lib\net40\Costura.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.WebView2.Core, Version=1.0.1072.54, Culture=neutral, PublicKeyToken=2a8ab48044d2601e, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.Web.WebView2.1.0.1072.54\lib\net45\Microsoft.Web.WebView2.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.WebView2.WinForms, Version=1.0.1072.54, Culture=neutral, PublicKeyToken=2a8ab48044d2601e, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.Web.WebView2.1.0.1072.54\lib\net45\Microsoft.Web.WebView2.WinForms.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.WebView2.Wpf, Version=1.0.1072.54, Culture=neutral, PublicKeyToken=2a8ab48044d2601e, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.Web.WebView2.1.0.1072.54\lib\net45\Microsoft.Web.WebView2.Wpf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SergeUtils">
|
||||
<HintPath>.\SergeUtils.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System">
|
||||
<HintPath>..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.DirectoryServices" />
|
||||
<Reference Include="System.Management" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Drawing">
|
||||
<HintPath>..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Drawing.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
@@ -160,6 +175,9 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ADB.cs" />
|
||||
<Compile Include="RoundButton.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ColumnSort.cs" />
|
||||
<Compile Include="Donors.cs" />
|
||||
<Compile Include="DonorsListView.cs">
|
||||
@@ -169,6 +187,7 @@
|
||||
<DependentUpon>DonorsListView.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FlexibleMessageBox.cs" />
|
||||
<Compile Include="RoundedRectangleF.cs" />
|
||||
<Compile Include="Splash.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -182,6 +201,7 @@
|
||||
<Compile Include="NewApps.Designer.cs">
|
||||
<DependentUpon>NewApps.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Transparenter.cs" />
|
||||
<Compile Include="UpdateForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -212,13 +232,6 @@
|
||||
<DependentUpon>SettingsForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Sideloader.cs" />
|
||||
<Compile Include="spoofer.cs" />
|
||||
<Compile Include="SpoofForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SpoofForm.Designer.cs">
|
||||
<DependentUpon>SpoofForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Updater.cs" />
|
||||
<Compile Include="UsernameForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
@@ -268,13 +281,11 @@
|
||||
<DependentUpon>SettingsForm.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="SpoofForm.resx">
|
||||
<DependentUpon>SpoofForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="UsernameForm.resx">
|
||||
<DependentUpon>UsernameForm.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<None Include="codenames" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\DataSources\AndroidSideloader.Properties.Resources.datasource" />
|
||||
<None Include="Properties\DataSources\AndroidSideloader.Properties.Settings.datasource" />
|
||||
@@ -299,6 +310,8 @@
|
||||
<Content Include="changelog.txt" />
|
||||
<Content Include="icon.ico" />
|
||||
<Content Include="ChangelogHistory.txt" />
|
||||
<Content Include="Resources\pattern_cubes-1_1_1_0-0_0_1__000000_212121.png" />
|
||||
<Content Include="Resources\pattern_herringbone-2_1_3_0-0_90_1__000000_1c1c1c.png" />
|
||||
<Content Include="Resources\splash.jpg" />
|
||||
<None Include="Resources\battery11.png" />
|
||||
<None Include="Resources\battery.png" />
|
||||
@@ -327,6 +340,7 @@
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('packages\Fody.6.0.0\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Fody.6.0.0\build\Fody.targets'))" />
|
||||
<Error Condition="!Exists('packages\Costura.Fody.4.1.0\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Costura.Fody.4.1.0\build\Costura.Fody.props'))" />
|
||||
<Error Condition="!Exists('packages\Microsoft.Web.WebView2.1.0.1072.54\build\Microsoft.Web.WebView2.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Web.WebView2.1.0.1072.54\build\Microsoft.Web.WebView2.targets'))" />
|
||||
</Target>
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
@@ -336,4 +350,5 @@
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<Import Project="packages\Microsoft.Web.WebView2.1.0.1072.54\build\Microsoft.Web.WebView2.targets" Condition="Exists('packages\Microsoft.Web.WebView2.1.0.1072.54\build\Microsoft.Web.WebView2.targets')" />
|
||||
</Project>
|
||||
81
App.config
81
App.config
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="AndroidSideloader.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
<section name="AndroidADB.Sideloader.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="AndroidSideloader.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
||||
<section name="AndroidADB.Sideloader.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
|
||||
</startup>
|
||||
<userSettings>
|
||||
<AndroidSideloader.Properties.Settings>
|
||||
@@ -41,9 +41,6 @@
|
||||
<setting name="SpoofGames" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="BandwithLimit" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="BigFontStyle" serializeAs="String">
|
||||
<value>Microsoft Sans Serif, 14pt</value>
|
||||
</setting>
|
||||
@@ -59,36 +56,9 @@
|
||||
<setting name="ADBPath" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="QUsett" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="QuChecked" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="QUhz" serializeAs="String">
|
||||
<value>0</value>
|
||||
</setting>
|
||||
<setting name="QUres" serializeAs="String">
|
||||
<value>0</value>
|
||||
</setting>
|
||||
<setting name="QUy" serializeAs="String">
|
||||
<value>0</value>
|
||||
</setting>
|
||||
<setting name="QUx" serializeAs="String">
|
||||
<value>0</value>
|
||||
</setting>
|
||||
<setting name="QUname" serializeAs="String">
|
||||
<value>Change Me</value>
|
||||
</setting>
|
||||
<setting name="QUString" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="MainDir" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="QUStringF" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="delsh" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
@@ -107,9 +77,6 @@
|
||||
<setting name="PackageNameToCB" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="EnterKeyInstall" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="DownUpHeld" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
@@ -125,9 +92,6 @@
|
||||
<setting name="CurrentCrashName" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="QUturnedon" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="adbdebugwarned" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
@@ -174,23 +138,44 @@
|
||||
<value>White</value>
|
||||
</setting>
|
||||
<setting name="ComboBoxColor" serializeAs="String">
|
||||
<value>50, 50, 50</value>
|
||||
<value>25, 25, 25</value>
|
||||
</setting>
|
||||
<setting name="SubButtonColor" serializeAs="String">
|
||||
<value>40, 40, 40</value>
|
||||
<value>25, 25, 25</value>
|
||||
</setting>
|
||||
<setting name="TextBoxColor" serializeAs="String">
|
||||
<value>29, 29, 29</value>
|
||||
<value>25, 25, 25</value>
|
||||
</setting>
|
||||
<setting name="ButtonColor" serializeAs="String">
|
||||
<value>50, 50, 50</value>
|
||||
<value>Black</value>
|
||||
</setting>
|
||||
<setting name="BackColor" serializeAs="String">
|
||||
<value>50, 50, 50</value>
|
||||
<value>1, 1, 1</value>
|
||||
</setting>
|
||||
<setting name="AppPackages" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="TrailersOn" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="downloadDir" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="customDownloadDir" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="customBackupDir" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="backupDir" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="singleThreadMode" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="virtualFilesystemCompatibility" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
</AndroidSideloader.Properties.Settings>
|
||||
<AndroidADB.Sideloader.Properties.Settings>
|
||||
<setting name="checkForUpdates" serializeAs="String">
|
||||
@@ -242,11 +227,11 @@
|
||||
<value>Microsoft Sans Serif, 11.25pt</value>
|
||||
</setting>
|
||||
<setting name="BackPicturePath" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="SpoofGames" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
</AndroidADB.Sideloader.Properties.Settings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
</configuration>
|
||||
|
||||
@@ -1,4 +1,171 @@
|
||||
RSL 2.13
|
||||
RSL 2.26
|
||||
|
||||
- Feature: Top right update labels will now show the amount of games per state
|
||||
- Feature: Open Download Dir and Run ADB Commands added to left sidebar
|
||||
- Feature: Toggle sideloading button
|
||||
- Feature: Show progress of extraction
|
||||
- Fix: Crash when failing to write to the StoredIP.txt
|
||||
- Fix: Drag and drop + Copy OBB for Quest 3 users
|
||||
- Fix: Properly kill off WebView2 instances
|
||||
- Fix: Added parents to dialogs
|
||||
- Fix: GUI freezing on launch
|
||||
- Fix: No Device Mode output
|
||||
- Chore: Make missing space message more user-friendly
|
||||
- Chore: Remove QU Settings
|
||||
|
||||
RSL 2.25.1
|
||||
|
||||
- Fix: Device not authorized prompt showing up after authorization.
|
||||
|
||||
RSL 2.25
|
||||
|
||||
- Fix: Fix to unauthorized device bug
|
||||
- Chore: Update Wiki URL
|
||||
|
||||
|
||||
RSL 2.24
|
||||
|
||||
- Feature: Added "Open Download" and "Open Backup" Directory buttons to Settings Menu
|
||||
- Fix: OBB Pushes for Quest 3 Devices
|
||||
- Fix: Crash when attempting to backup
|
||||
- Fix: Searchbar Anchoring when resizing
|
||||
- Fix: Remove instances where OBBs are pushed multiple times
|
||||
- Fix: Additional Logging and Startup Optimizations
|
||||
|
||||
RSL 2.23
|
||||
|
||||
- Fix: Rookie should now only prompt for newer versions of all games
|
||||
- Fix: Crash when attempting to delete invalid directories or files
|
||||
- Feature: Enable Maximize Button
|
||||
|
||||
RSL 2.22
|
||||
|
||||
- Fix: Crash on failed extractions.
|
||||
- Fix: Trailers controls not functioning properly.
|
||||
- Fix: No Device Mode having the wrong output message.
|
||||
- Chore: Remove ADB.WakeDevice() due to being non-functional.
|
||||
- Chore: Make changeTitlebarToDevice less prone to crashes and more robust.
|
||||
|
||||
RSL 2.21
|
||||
|
||||
- Feature: Search now shows all results found
|
||||
- Feature: Add --no-rclone-updating launch flag
|
||||
- Feature: Add lime-green color to various after download jobs
|
||||
- Feature: Update Sideloader Launcher to check for Rookie
|
||||
- Feature: Add the ability to download into virtual filesystems (Settings)
|
||||
- Feature: Add stacktrace & innerexception to crashlog
|
||||
- Feature: Add CallerInfo to debuglog
|
||||
- Feature: Rookie will now tell the user when there's a running RCLONE Job
|
||||
- Fix: Rookie will no longer repeat "All tasks finished." in No Device Mode
|
||||
- Fix: Rookie should no longer delete the entire OBB/Data folder when uninstalling a game
|
||||
- Fix: Rookie should no longer freeze on the OBB Comparison
|
||||
- Fix: The free disclaimer on launch is no longer broken
|
||||
- Fix: Use new process for every ADB command
|
||||
- Fix: Do not delete game files on an OBB Mismatch anymore
|
||||
- Fix: Change all hardcoded C:/ paths to dynamically grab the system drive for further compatability
|
||||
- Fix: Rookie should now function on 32 Bit again
|
||||
- Fix: Fix crash on failed extraction
|
||||
- Chore: Update quota message to be up to date
|
||||
- Chore: Code rewrites for logging system, obb comparison, updater
|
||||
- Chore: Several redundant code removals
|
||||
- Chore: Change Install w/ Enter Key to Download w/ Enter Key
|
||||
- Chore: Several code cleanups & optimizations
|
||||
~ Chax
|
||||
|
||||
RSL 2.20
|
||||
|
||||
- Feature: Added manual IP on Wireless ADB
|
||||
- Feature: Rookie will now delete old OBB Folders before pushing new obb folders
|
||||
- Feature: Add Single-Thread mode in settings (For users with download issues using multiple threads)
|
||||
- Fix: Device Storage display
|
||||
- Fix: Games that come with install.txt will now check for a device to avoid freezes
|
||||
- Fix: "No Device Mode" checkbox can't have "Delete after Download and Install" enabled at the same time anymore
|
||||
- Fix: Removing Queue Items should no longer ever crash Rookie
|
||||
- Fix: Rookie will no longer reload the gamelist if you have filtered it
|
||||
- Fix: Check if the rclone we are killing is ours
|
||||
- Fix: Put zip extraction into a thread to avoid freezing the UI
|
||||
- Fix: Filters should no longer cause crashes.
|
||||
- Chore: Update RCLONE to 1.62.2
|
||||
- Chore: Cleaning up the code for the Trailers, progress bar, dropdown categories, redundant internet checks, and other code cleanup
|
||||
- Chore: Other UI and message box display cleanup
|
||||
- Chore: Optimize the code for getting the thumbnail paths
|
||||
- Chore: Log Levels added to Debuglog
|
||||
|
||||
- Thank you to Chax for the new features and fixes!
|
||||
~ fenopy
|
||||
|
||||
RSL 2.19
|
||||
|
||||
- Feature: Added streaming Game Trailers (enable in Settings)
|
||||
- Feature: Added custom Download Directories
|
||||
- Feature: Added custom Backup Directories
|
||||
- Feature: Added Game Filtering (click on the Colored-Labels in the Top-Right)
|
||||
- Feature: When uninstalling games, Rookie will now ask if you want to back up save data
|
||||
- Feature: "No Device Mode" now automatically disables "Delete after Download and Install"
|
||||
- Feature: Offline Mode now has the ability to donate new games/updates
|
||||
- Fix: OBBs will no longer be attempted to push in "No Device Mode"
|
||||
- Fix: Comparing OBB sizes will no longer error during "No Device Mode"
|
||||
- Fix: Comparing OBB Sizes will no longer state "Input string was not in a correct format", it will now properly tell the user what is wrong
|
||||
- Fix: The GitHub Error when starting up will now show the actual URL it tries to access
|
||||
- Fix: Added a check to make Rookie not attempt to get available space when no devices are connected
|
||||
- Removed Bandwidth Limit settings
|
||||
|
||||
- Thank you to Chax for the new features!
|
||||
- Thank you to JP for the Trailers framework!
|
||||
~ fenopy
|
||||
|
||||
RSL 2.18
|
||||
|
||||
- Moving Rookie onto a different Directory than C: will not break Pull App To Desktop anymore
|
||||
- Rookie should now tell the user why it couldnt get the Rclone/ADB etc. Files
|
||||
- Dialogs will should now no longer hide behind Rookie.
|
||||
- ADB was updated to the latest version.
|
||||
|
||||
~ Chax & fenopy
|
||||
|
||||
RSL 2.17
|
||||
|
||||
- Various bugfixes
|
||||
|
||||
~SytheZN
|
||||
~fenopy
|
||||
|
||||
RSL 2.16
|
||||
|
||||
- Fix misleading error message when not enough disk space
|
||||
- Fix downloads silently failing in some cases
|
||||
- Fix failure to detect failed extraction when archive corrupt
|
||||
- Fix UI issues when resizing main form
|
||||
- Various code cleanups
|
||||
|
||||
~SytheZN
|
||||
~fenopy
|
||||
|
||||
RSL 2.15
|
||||
|
||||
- Massive UI Changes:
|
||||
- Rounded buttons
|
||||
- Added version Number at Bottom Left
|
||||
- Changed fonts to some extend
|
||||
- Added background pattern to category buttons and MainForm background
|
||||
- Added an animation when opening/closing category
|
||||
- Overall darker theme
|
||||
- New splash
|
||||
|
||||
~Chax
|
||||
|
||||
RSL 2.14
|
||||
|
||||
- Added upload config for easier config management
|
||||
- Improved upload logic to handle failures better
|
||||
|
||||
~SytheZN
|
||||
|
||||
- Much better theme
|
||||
|
||||
~fenopy
|
||||
|
||||
RSL 2.13
|
||||
|
||||
- Added new config mode for use with http mirror
|
||||
- Removed previous http mirror workarounds
|
||||
|
||||
@@ -6,20 +6,11 @@ using System.Windows.Forms;
|
||||
/// </summary>
|
||||
public class ListViewColumnSorter : IComparer
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies the column to be sorted
|
||||
/// </summary>
|
||||
private int ColumnToSort;
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the order in which to sort (i.e. 'Ascending').
|
||||
/// </summary>
|
||||
private SortOrder OrderOfSort;
|
||||
|
||||
/// <summary>
|
||||
/// Case insensitive comparer object
|
||||
/// </summary>
|
||||
private CaseInsensitiveComparer ObjectCompare;
|
||||
private readonly CaseInsensitiveComparer ObjectCompare;
|
||||
|
||||
/// <summary>
|
||||
/// Class constructor. Initializes various elements
|
||||
@@ -27,10 +18,10 @@ public class ListViewColumnSorter : IComparer
|
||||
public ListViewColumnSorter()
|
||||
{
|
||||
// Initialize the column to '0'
|
||||
ColumnToSort = 0;
|
||||
SortColumn = 0;
|
||||
|
||||
// Initialize the sort order to 'none'
|
||||
OrderOfSort = SortOrder.Ascending;
|
||||
Order = SortOrder.Ascending;
|
||||
|
||||
// Initialize the CaseInsensitiveComparer object
|
||||
ObjectCompare = new CaseInsensitiveComparer();
|
||||
@@ -50,39 +41,30 @@ public class ListViewColumnSorter : IComparer
|
||||
// Cast the objects to be compared to ListViewItem objects
|
||||
listviewX = (ListViewItem)x;
|
||||
listviewY = (ListViewItem)y;
|
||||
if (ColumnToSort == 5 ) {
|
||||
if (SortColumn == 5)
|
||||
{
|
||||
try
|
||||
{
|
||||
int yNum = int.Parse(cleanNumber(listviewY.SubItems[ColumnToSort].Text));
|
||||
int xNum = int.Parse(cleanNumber(listviewX.SubItems[ColumnToSort].Text));
|
||||
if (xNum == yNum )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else if(xNum > yNum && OrderOfSort == SortOrder.Ascending)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
} catch { }
|
||||
int yNum = int.Parse(cleanNumber(listviewY.SubItems[SortColumn].Text));
|
||||
int xNum = int.Parse(cleanNumber(listviewX.SubItems[SortColumn].Text));
|
||||
return xNum == yNum ? 0 : xNum > yNum && Order == SortOrder.Ascending ? -1 : 1;
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
// Compare the two items
|
||||
compareResult = ObjectCompare.Compare(listviewX.SubItems[ColumnToSort].Text, listviewY.SubItems[ColumnToSort].Text);
|
||||
compareResult = ObjectCompare.Compare(listviewX.SubItems[SortColumn].Text, listviewY.SubItems[SortColumn].Text);
|
||||
|
||||
// Calculate correct return value based on object comparison
|
||||
if (OrderOfSort == SortOrder.Ascending)
|
||||
if (Order == SortOrder.Ascending)
|
||||
{
|
||||
// Ascending sort is selected, return normal result of compare operation
|
||||
return compareResult;
|
||||
}
|
||||
else if (OrderOfSort == SortOrder.Descending)
|
||||
else if (Order == SortOrder.Descending)
|
||||
{
|
||||
// Descending sort is selected, return negative result of compare operation
|
||||
return (-compareResult);
|
||||
return -compareResult;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -94,32 +76,12 @@ public class ListViewColumnSorter : IComparer
|
||||
/// <summary>
|
||||
/// Gets or sets the number of the column to which to apply the sorting operation (Defaults to '0').
|
||||
/// </summary>
|
||||
public int SortColumn
|
||||
{
|
||||
set
|
||||
{
|
||||
ColumnToSort = value;
|
||||
}
|
||||
get
|
||||
{
|
||||
return ColumnToSort;
|
||||
}
|
||||
}
|
||||
public int SortColumn { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the order of sorting to apply (for example, 'Ascending' or 'Descending').
|
||||
/// </summary>
|
||||
public SortOrder Order
|
||||
{
|
||||
set
|
||||
{
|
||||
OrderOfSort = value;
|
||||
}
|
||||
get
|
||||
{
|
||||
return OrderOfSort;
|
||||
}
|
||||
}
|
||||
public SortOrder Order { set; get; }
|
||||
|
||||
private string cleanNumber(string number)
|
||||
{
|
||||
|
||||
37
Donors.cs
37
Donors.cs
@@ -1,22 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
class Donors
|
||||
internal class Donors
|
||||
{
|
||||
public static int GameNameIndex = 0;
|
||||
public static int PackageNameIndex = 1;
|
||||
public static int VersionCodeIndex = 2;
|
||||
public static int UpdateOrNew = 3;
|
||||
/* Game Name
|
||||
* Package Name
|
||||
* Version Code
|
||||
* Update or New app
|
||||
*/
|
||||
/* Game Name
|
||||
* Package Name
|
||||
* Version Code
|
||||
* Update or New app
|
||||
*/
|
||||
public static List<string> newAppProperties = new List<string>();
|
||||
public static List<string> donorGameProperties = new List<string>();
|
||||
|
||||
@@ -26,38 +22,33 @@ namespace AndroidSideloader
|
||||
{
|
||||
donorGameProperties.Clear();
|
||||
donorGames.Clear();
|
||||
if (!MainForm.DonorApps.Equals(""))
|
||||
if (!string.IsNullOrEmpty(MainForm.donorApps))
|
||||
{
|
||||
string[] gameListSplited = MainForm.DonorApps.Split(new[] { '\n' });
|
||||
string[] gameListSplited = MainForm.donorApps.Split('\n');
|
||||
foreach (string game in gameListSplited)
|
||||
{
|
||||
if (game.Length > 1)
|
||||
{
|
||||
string[] splitGame = game.Split(';');
|
||||
donorGames.Add(splitGame);
|
||||
donorGames.Add(game.Split(';'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void initNewApps()
|
||||
{
|
||||
newApps.Clear();
|
||||
if (!DonorsListViewForm.newAppsForList.Equals(""))
|
||||
if (!string.IsNullOrEmpty(DonorsListViewForm.newAppsForList))
|
||||
{
|
||||
string[] newListSplited = DonorsListViewForm.newAppsForList.Split(new[] { '\n' });
|
||||
string[] newListSplited = DonorsListViewForm.newAppsForList.Split('\n');
|
||||
foreach (string game in newListSplited)
|
||||
{
|
||||
if (game.Length > 1)
|
||||
{
|
||||
string[] splitGame = game.Split(';');
|
||||
newApps.Add(splitGame);
|
||||
newApps.Add(game.Split(';'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
78
DonorsListView.Designer.cs
generated
78
DonorsListView.Designer.cs
generated
@@ -30,20 +30,21 @@ namespace AndroidSideloader
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DonorsListViewForm));
|
||||
this.DonorsListView = new System.Windows.Forms.ListView();
|
||||
this.GameNameIndex = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.PackageNameIndex = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.VersionCodeIndex = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.UpdateOrNew = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.SkipButton = new System.Windows.Forms.Button();
|
||||
this.SkipButton = new AndroidSideloader.RoundButton();
|
||||
this.DonateButton = new AndroidSideloader.RoundButton();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.bothdet = new System.Windows.Forms.Label();
|
||||
this.newdet = new System.Windows.Forms.Label();
|
||||
this.upddet = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.TimerDesc = new System.Windows.Forms.Label();
|
||||
this.DonateButton = new System.Windows.Forms.Button();
|
||||
this.DonationTimer = new System.Windows.Forms.Timer(this.components);
|
||||
this.panel1.SuspendLayout();
|
||||
this.panel2.SuspendLayout();
|
||||
@@ -110,14 +111,15 @@ namespace AndroidSideloader
|
||||
// panel1
|
||||
//
|
||||
this.panel1.BackColor = global::AndroidSideloader.Properties.Settings.Default.BackColor;
|
||||
this.panel1.BackgroundImage = global::AndroidSideloader.Properties.Resources.pattern_cubes_1_1_1_0_0_0_1__000000_212121;
|
||||
this.panel1.Controls.Add(this.SkipButton);
|
||||
this.panel1.Controls.Add(this.DonateButton);
|
||||
this.panel1.Controls.Add(this.panel2);
|
||||
this.panel1.Controls.Add(this.bothdet);
|
||||
this.panel1.Controls.Add(this.newdet);
|
||||
this.panel1.Controls.Add(this.upddet);
|
||||
this.panel1.Controls.Add(this.label2);
|
||||
this.panel1.Controls.Add(this.TimerDesc);
|
||||
this.panel1.Controls.Add(this.DonateButton);
|
||||
this.panel1.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "BackColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.panel1.Location = new System.Drawing.Point(-7, -7);
|
||||
this.panel1.Name = "panel1";
|
||||
@@ -129,21 +131,56 @@ namespace AndroidSideloader
|
||||
//
|
||||
// SkipButton
|
||||
//
|
||||
this.SkipButton.BackColor = global::AndroidSideloader.Properties.Settings.Default.SubButtonColor;
|
||||
this.SkipButton.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.SkipButton.Active2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.SkipButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.SkipButton.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.SkipButton.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "SubButtonColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.SkipButton.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.SkipButton.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.SkipButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.SkipButton.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.SkipButton.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.SkipButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F);
|
||||
this.SkipButton.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.SkipButton.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.SkipButton.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.SkipButton.Location = new System.Drawing.Point(22, 277);
|
||||
this.SkipButton.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.SkipButton.Name = "SkipButton";
|
||||
this.SkipButton.Radius = 5;
|
||||
this.SkipButton.Size = new System.Drawing.Size(102, 36);
|
||||
this.SkipButton.TabIndex = 1;
|
||||
this.SkipButton.Stroke = true;
|
||||
this.SkipButton.StrokeColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(74)))), ((int)(((byte)(74)))));
|
||||
this.SkipButton.TabIndex = 96;
|
||||
this.SkipButton.Text = "Skip";
|
||||
this.SkipButton.UseVisualStyleBackColor = true;
|
||||
this.SkipButton.Transparency = false;
|
||||
this.SkipButton.Click += new System.EventHandler(this.SkipButton_Click);
|
||||
//
|
||||
// DonateButton
|
||||
//
|
||||
this.DonateButton.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.DonateButton.Active2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.DonateButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.DonateButton.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.DonateButton.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "SubButtonColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.DonateButton.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.DonateButton.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.DonateButton.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.DonateButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F);
|
||||
this.DonateButton.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.DonateButton.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.DonateButton.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.DonateButton.Location = new System.Drawing.Point(130, 277);
|
||||
this.DonateButton.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.DonateButton.Name = "DonateButton";
|
||||
this.DonateButton.Radius = 5;
|
||||
this.DonateButton.Size = new System.Drawing.Size(311, 36);
|
||||
this.DonateButton.Stroke = true;
|
||||
this.DonateButton.StrokeColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(74)))), ((int)(((byte)(74)))));
|
||||
this.DonateButton.TabIndex = 95;
|
||||
this.DonateButton.Text = "Automatically share selected apps";
|
||||
this.DonateButton.Transparency = false;
|
||||
this.DonateButton.Click += new System.EventHandler(this.DonateButton_Click);
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
this.panel2.BackColor = global::AndroidSideloader.Properties.Settings.Default.SubButtonColor;
|
||||
@@ -232,24 +269,6 @@ namespace AndroidSideloader
|
||||
this.TimerDesc.MouseMove += new System.Windows.Forms.MouseEventHandler(this.DonorsListViewForm_MouseMove);
|
||||
this.TimerDesc.MouseUp += new System.Windows.Forms.MouseEventHandler(this.DonorsListViewForm_MouseUp);
|
||||
//
|
||||
// DonateButton
|
||||
//
|
||||
this.DonateButton.BackColor = global::AndroidSideloader.Properties.Settings.Default.SubButtonColor;
|
||||
this.DonateButton.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "SubButtonColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.DonateButton.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.DonateButton.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.DonateButton.Enabled = false;
|
||||
this.DonateButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.DonateButton.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.DonateButton.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.DonateButton.Location = new System.Drawing.Point(130, 277);
|
||||
this.DonateButton.Name = "DonateButton";
|
||||
this.DonateButton.Size = new System.Drawing.Size(311, 36);
|
||||
this.DonateButton.TabIndex = 1;
|
||||
this.DonateButton.Text = "Automatically share selected apps";
|
||||
this.DonateButton.UseVisualStyleBackColor = true;
|
||||
this.DonateButton.Click += new System.EventHandler(this.DonateButton_Click);
|
||||
//
|
||||
// DonorsListViewForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
@@ -260,6 +279,7 @@ namespace AndroidSideloader
|
||||
this.Controls.Add(this.panel1);
|
||||
this.ForeColor = System.Drawing.Color.White;
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "DonorsListViewForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Load += new System.EventHandler(this.DonorsListViewForm_Load);
|
||||
@@ -270,25 +290,25 @@ namespace AndroidSideloader
|
||||
this.panel1.PerformLayout();
|
||||
this.panel2.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.Activate();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.ListView DonorsListView;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Button DonateButton;
|
||||
private System.Windows.Forms.Label TimerDesc;
|
||||
private System.Windows.Forms.ColumnHeader GameNameIndex;
|
||||
private System.Windows.Forms.ColumnHeader PackageNameIndex;
|
||||
private System.Windows.Forms.ColumnHeader VersionCodeIndex;
|
||||
private System.Windows.Forms.ColumnHeader UpdateOrNew;
|
||||
public System.Windows.Forms.Timer DonationTimer;
|
||||
private System.Windows.Forms.Button SkipButton;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label bothdet;
|
||||
private System.Windows.Forms.Label newdet;
|
||||
private System.Windows.Forms.Label upddet;
|
||||
private System.Windows.Forms.Panel panel2;
|
||||
private RoundButton DonateButton;
|
||||
private RoundButton SkipButton;
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,6 @@
|
||||
using AndroidSideloader.Utilities;
|
||||
using JR.Utils.GUI.Forms;
|
||||
using Newtonsoft.Json;
|
||||
using SergeUtils;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AndroidSideloader
|
||||
@@ -40,25 +28,33 @@ namespace AndroidSideloader
|
||||
DonorsListView.EndUpdate();
|
||||
}
|
||||
|
||||
public static string DonorsLocal = MainForm.DonorApps;
|
||||
public static string DonorsLocal = MainForm.donorApps;
|
||||
public static bool ifuploads = false;
|
||||
public static string newAppsForList = "";
|
||||
|
||||
|
||||
private void DonorsListViewForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
MainForm.updatesnotified = true;
|
||||
MainForm.updatesNotified = true;
|
||||
if (MainForm.updates && MainForm.newapps)
|
||||
{
|
||||
bothdet.Visible = true;
|
||||
}
|
||||
else if (MainForm.updates && !MainForm.newapps)
|
||||
{
|
||||
upddet.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
newdet.Visible = true;
|
||||
}
|
||||
|
||||
foreach (ListViewItem listItem in DonorsListView.Items)
|
||||
{
|
||||
{
|
||||
if (listItem.SubItems[Donors.UpdateOrNew].Text.Contains("Update"))
|
||||
{
|
||||
listItem.BackColor = Color.FromArgb(0, 79, 97);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -81,50 +77,46 @@ namespace AndroidSideloader
|
||||
}
|
||||
if (uncheckednewapps)
|
||||
{
|
||||
|
||||
|
||||
NewApps NewAppForm = new NewApps();
|
||||
NewAppForm.ShowDialog();
|
||||
this.Hide();
|
||||
_ = NewAppForm.ShowDialog();
|
||||
Hide();
|
||||
}
|
||||
else
|
||||
this.Hide();
|
||||
int count = 0;
|
||||
count = DonorsListView.CheckedItems.Count;
|
||||
string[] gamesToUpload;
|
||||
gamesToUpload = new string[count];
|
||||
{
|
||||
Hide();
|
||||
}
|
||||
int count = DonorsListView.CheckedItems.Count;
|
||||
_ = new string[count];
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
ulong vcode = Convert.ToUInt64(DonorsListView.CheckedItems[i].SubItems[Donors.VersionCodeIndex].Text);
|
||||
if (DonorsListView.CheckedItems[i].SubItems[Donors.UpdateOrNew].Text.Contains("Update"))
|
||||
await Program.form.extractAndPrepareGameToUploadAsync(DonorsListView.CheckedItems[i].SubItems[Donors.GameNameIndex].Text, DonorsListView.CheckedItems[i].SubItems[Donors.PackageNameIndex].Text, vcode, true);
|
||||
else
|
||||
await Program.form.extractAndPrepareGameToUploadAsync(DonorsListView.CheckedItems[i].SubItems[Donors.GameNameIndex].Text, DonorsListView.CheckedItems[i].SubItems[Donors.PackageNameIndex].Text, vcode, false);
|
||||
{
|
||||
await Program.form.extractAndPrepareGameToUploadAsync(DonorsListView.CheckedItems[i].SubItems[Donors.GameNameIndex].Text, DonorsListView.CheckedItems[i].SubItems[Donors.PackageNameIndex].Text, vcode, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
await Program.form.extractAndPrepareGameToUploadAsync(DonorsListView.CheckedItems[i].SubItems[Donors.GameNameIndex].Text, DonorsListView.CheckedItems[i].SubItems[Donors.PackageNameIndex].Text, vcode, false);
|
||||
}
|
||||
|
||||
ifuploads = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (ifuploads)
|
||||
{
|
||||
MainForm.DoUpload();
|
||||
MainForm.doUpload();
|
||||
}
|
||||
this.Close();
|
||||
}
|
||||
Close();
|
||||
}
|
||||
|
||||
private void DonorsListView_ItemChecked(object sender, ItemCheckedEventArgs e)
|
||||
{
|
||||
if (DonorsListView.CheckedItems.Count == 0)
|
||||
{
|
||||
SkipButton.Enabled = true;
|
||||
DonateButton.Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
DonateButton.Enabled = true;
|
||||
SkipButton.Enabled = false;
|
||||
}
|
||||
SkipButton.Enabled = DonorsListView.CheckedItems.Count == 0;
|
||||
DonateButton.Enabled = !SkipButton.Enabled;
|
||||
}
|
||||
|
||||
|
||||
private void SkipButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool uncheckednewapps = false;
|
||||
@@ -142,9 +134,9 @@ namespace AndroidSideloader
|
||||
if (uncheckednewapps)
|
||||
{
|
||||
NewApps NewAppForm = new NewApps();
|
||||
NewAppForm.ShowDialog();
|
||||
_ = NewAppForm.ShowDialog();
|
||||
}
|
||||
this.Close();
|
||||
Close();
|
||||
}
|
||||
|
||||
private void DonorsListViewForm_MouseDown(object sender, MouseEventArgs e)
|
||||
@@ -157,9 +149,9 @@ namespace AndroidSideloader
|
||||
{
|
||||
if (mouseDown)
|
||||
{
|
||||
this.Location = new Point(
|
||||
(this.Location.X - lastLocation.X) + e.X, (this.Location.Y - lastLocation.Y) + e.Y);
|
||||
this.Update();
|
||||
Location = new Point(
|
||||
Location.X - lastLocation.X + e.X, Location.Y - lastLocation.Y + e.Y);
|
||||
Update();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
6849
DonorsListView.resx
6849
DonorsListView.resx
File diff suppressed because it is too large
Load Diff
@@ -254,7 +254,7 @@ namespace JR.Utils.GUI.Forms
|
||||
/// The form to show the customized message box.
|
||||
/// It is defined as an internal class to keep the public interface of the FlexibleMessageBox clean.
|
||||
/// </summary>
|
||||
class FlexibleMessageBoxForm : Form
|
||||
private class FlexibleMessageBoxForm : Form
|
||||
{
|
||||
#region Form-Designer generated code
|
||||
|
||||
@@ -282,128 +282,128 @@ namespace JR.Utils.GUI.Forms
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.richTextBoxMessage = new System.Windows.Forms.RichTextBox();
|
||||
this.FlexibleMessageBoxFormBindingSource = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.pictureBoxForIcon = new System.Windows.Forms.PictureBox();
|
||||
this.button2 = new System.Windows.Forms.Button();
|
||||
this.button3 = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(this.FlexibleMessageBoxFormBindingSource)).BeginInit();
|
||||
this.panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBoxForIcon)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
components = new System.ComponentModel.Container();
|
||||
button1 = new System.Windows.Forms.Button();
|
||||
richTextBoxMessage = new System.Windows.Forms.RichTextBox();
|
||||
FlexibleMessageBoxFormBindingSource = new System.Windows.Forms.BindingSource(components);
|
||||
panel1 = new System.Windows.Forms.Panel();
|
||||
pictureBoxForIcon = new System.Windows.Forms.PictureBox();
|
||||
button2 = new System.Windows.Forms.Button();
|
||||
button3 = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)FlexibleMessageBoxFormBindingSource).BeginInit();
|
||||
panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBoxForIcon).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.button1.AutoSize = true;
|
||||
this.button1.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.button1.Location = new System.Drawing.Point(11, 67);
|
||||
this.button1.MinimumSize = new System.Drawing.Size(0, 24);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(75, 24);
|
||||
this.button1.TabIndex = 2;
|
||||
this.button1.Text = "OK";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Visible = false;
|
||||
button1.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right;
|
||||
button1.AutoSize = true;
|
||||
button1.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
button1.Location = new System.Drawing.Point(11, 67);
|
||||
button1.MinimumSize = new System.Drawing.Size(0, 24);
|
||||
button1.Name = "button1";
|
||||
button1.Size = new System.Drawing.Size(75, 24);
|
||||
button1.TabIndex = 2;
|
||||
button1.Text = "OK";
|
||||
button1.UseVisualStyleBackColor = true;
|
||||
button1.Visible = false;
|
||||
//
|
||||
// richTextBoxMessage
|
||||
//
|
||||
this.richTextBoxMessage.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.richTextBoxMessage.BackColor = System.Drawing.Color.White;
|
||||
this.richTextBoxMessage.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.richTextBoxMessage.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.FlexibleMessageBoxFormBindingSource, "MessageText", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.richTextBoxMessage.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.richTextBoxMessage.Location = new System.Drawing.Point(50, 26);
|
||||
this.richTextBoxMessage.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.richTextBoxMessage.Name = "richTextBoxMessage";
|
||||
this.richTextBoxMessage.ReadOnly = true;
|
||||
this.richTextBoxMessage.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
|
||||
this.richTextBoxMessage.Size = new System.Drawing.Size(200, 20);
|
||||
this.richTextBoxMessage.TabIndex = 0;
|
||||
this.richTextBoxMessage.TabStop = false;
|
||||
this.richTextBoxMessage.Text = "<Message>";
|
||||
this.richTextBoxMessage.LinkClicked += new System.Windows.Forms.LinkClickedEventHandler(this.richTextBoxMessage_LinkClicked);
|
||||
richTextBoxMessage.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom
|
||||
| System.Windows.Forms.AnchorStyles.Left
|
||||
| System.Windows.Forms.AnchorStyles.Right;
|
||||
richTextBoxMessage.BackColor = System.Drawing.Color.White;
|
||||
richTextBoxMessage.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
richTextBoxMessage.DataBindings.Add(new System.Windows.Forms.Binding("Text", FlexibleMessageBoxFormBindingSource, "MessageText", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
richTextBoxMessage.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
|
||||
richTextBoxMessage.Location = new System.Drawing.Point(50, 26);
|
||||
richTextBoxMessage.Margin = new System.Windows.Forms.Padding(0);
|
||||
richTextBoxMessage.Name = "richTextBoxMessage";
|
||||
richTextBoxMessage.ReadOnly = true;
|
||||
richTextBoxMessage.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
|
||||
richTextBoxMessage.Size = new System.Drawing.Size(200, 20);
|
||||
richTextBoxMessage.TabIndex = 0;
|
||||
richTextBoxMessage.TabStop = false;
|
||||
richTextBoxMessage.Text = "<Message>";
|
||||
richTextBoxMessage.LinkClicked += new System.Windows.Forms.LinkClickedEventHandler(richTextBoxMessage_LinkClicked);
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.panel1.BackColor = System.Drawing.Color.White;
|
||||
this.panel1.Controls.Add(this.pictureBoxForIcon);
|
||||
this.panel1.Controls.Add(this.richTextBoxMessage);
|
||||
this.panel1.Location = new System.Drawing.Point(-3, -4);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(268, 59);
|
||||
this.panel1.TabIndex = 1;
|
||||
panel1.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom
|
||||
| System.Windows.Forms.AnchorStyles.Left
|
||||
| System.Windows.Forms.AnchorStyles.Right;
|
||||
panel1.BackColor = System.Drawing.Color.White;
|
||||
panel1.Controls.Add(pictureBoxForIcon);
|
||||
panel1.Controls.Add(richTextBoxMessage);
|
||||
panel1.Location = new System.Drawing.Point(-3, -4);
|
||||
panel1.Name = "panel1";
|
||||
panel1.Size = new System.Drawing.Size(268, 59);
|
||||
panel1.TabIndex = 1;
|
||||
//
|
||||
// pictureBoxForIcon
|
||||
//
|
||||
this.pictureBoxForIcon.BackColor = System.Drawing.Color.Transparent;
|
||||
this.pictureBoxForIcon.Location = new System.Drawing.Point(15, 19);
|
||||
this.pictureBoxForIcon.Name = "pictureBoxForIcon";
|
||||
this.pictureBoxForIcon.Size = new System.Drawing.Size(32, 32);
|
||||
this.pictureBoxForIcon.TabIndex = 8;
|
||||
this.pictureBoxForIcon.TabStop = false;
|
||||
pictureBoxForIcon.BackColor = System.Drawing.Color.Transparent;
|
||||
pictureBoxForIcon.Location = new System.Drawing.Point(15, 19);
|
||||
pictureBoxForIcon.Name = "pictureBoxForIcon";
|
||||
pictureBoxForIcon.Size = new System.Drawing.Size(32, 32);
|
||||
pictureBoxForIcon.TabIndex = 8;
|
||||
pictureBoxForIcon.TabStop = false;
|
||||
//
|
||||
// button2
|
||||
//
|
||||
this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.button2.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.button2.Location = new System.Drawing.Point(92, 67);
|
||||
this.button2.MinimumSize = new System.Drawing.Size(0, 24);
|
||||
this.button2.Name = "button2";
|
||||
this.button2.Size = new System.Drawing.Size(75, 24);
|
||||
this.button2.TabIndex = 3;
|
||||
this.button2.Text = "OK";
|
||||
this.button2.UseVisualStyleBackColor = true;
|
||||
this.button2.Visible = false;
|
||||
button2.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right;
|
||||
button2.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
button2.Location = new System.Drawing.Point(92, 67);
|
||||
button2.MinimumSize = new System.Drawing.Size(0, 24);
|
||||
button2.Name = "button2";
|
||||
button2.Size = new System.Drawing.Size(75, 24);
|
||||
button2.TabIndex = 3;
|
||||
button2.Text = "OK";
|
||||
button2.UseVisualStyleBackColor = true;
|
||||
button2.Visible = false;
|
||||
//
|
||||
// button3
|
||||
//
|
||||
this.button3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.button3.AutoSize = true;
|
||||
this.button3.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.button3.Location = new System.Drawing.Point(173, 67);
|
||||
this.button3.MinimumSize = new System.Drawing.Size(0, 24);
|
||||
this.button3.Name = "button3";
|
||||
this.button3.Size = new System.Drawing.Size(75, 24);
|
||||
this.button3.TabIndex = 0;
|
||||
this.button3.Text = "OK";
|
||||
this.button3.UseVisualStyleBackColor = true;
|
||||
this.button3.Visible = false;
|
||||
button3.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right;
|
||||
button3.AutoSize = true;
|
||||
button3.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
button3.Location = new System.Drawing.Point(173, 67);
|
||||
button3.MinimumSize = new System.Drawing.Size(0, 24);
|
||||
button3.Name = "button3";
|
||||
button3.Size = new System.Drawing.Size(75, 24);
|
||||
button3.TabIndex = 0;
|
||||
button3.Text = "OK";
|
||||
button3.UseVisualStyleBackColor = true;
|
||||
button3.Visible = false;
|
||||
//
|
||||
// FlexibleMessageBoxForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(260, 102);
|
||||
this.Controls.Add(this.button3);
|
||||
this.Controls.Add(this.button2);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Controls.Add(this.button1);
|
||||
this.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.FlexibleMessageBoxFormBindingSource, "CaptionText", true));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.MinimumSize = new System.Drawing.Size(276, 140);
|
||||
this.Name = "FlexibleMessageBoxForm";
|
||||
this.ShowIcon = false;
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "<Caption>";
|
||||
this.Shown += new System.EventHandler(this.FlexibleMessageBoxForm_Shown);
|
||||
((System.ComponentModel.ISupportInitialize)(this.FlexibleMessageBoxFormBindingSource)).EndInit();
|
||||
this.panel1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBoxForIcon)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
ClientSize = new System.Drawing.Size(260, 102);
|
||||
Controls.Add(button3);
|
||||
Controls.Add(button2);
|
||||
Controls.Add(panel1);
|
||||
Controls.Add(button1);
|
||||
DataBindings.Add(new System.Windows.Forms.Binding("Text", FlexibleMessageBoxFormBindingSource, "CaptionText", true));
|
||||
MaximizeBox = false;
|
||||
MinimizeBox = false;
|
||||
MinimumSize = new System.Drawing.Size(276, 140);
|
||||
Name = "FlexibleMessageBoxForm";
|
||||
ShowIcon = false;
|
||||
SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show;
|
||||
StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
Text = "<Caption>";
|
||||
Shown += new System.EventHandler(FlexibleMessageBoxForm_Shown);
|
||||
((System.ComponentModel.ISupportInitialize)FlexibleMessageBoxFormBindingSource).EndInit();
|
||||
panel1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)pictureBoxForIcon).EndInit();
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
|
||||
this.Activate();
|
||||
Activate();
|
||||
}
|
||||
|
||||
private System.Windows.Forms.Button button1;
|
||||
@@ -419,19 +419,19 @@ namespace JR.Utils.GUI.Forms
|
||||
#region Private constants
|
||||
|
||||
//These separators are used for the "copy to clipboard" standard operation, triggered by Ctrl + C (behavior and clipboard format is like in a standard MessageBox)
|
||||
private static readonly String STANDARD_MESSAGEBOX_SEPARATOR_LINES = "---------------------------\n";
|
||||
private static readonly String STANDARD_MESSAGEBOX_SEPARATOR_SPACES = " ";
|
||||
private static readonly string STANDARD_MESSAGEBOX_SEPARATOR_LINES = "---------------------------\n";
|
||||
private static readonly string STANDARD_MESSAGEBOX_SEPARATOR_SPACES = " ";
|
||||
|
||||
//These are the possible buttons (in a standard MessageBox)
|
||||
private enum ButtonID { OK = 0, CANCEL, YES, NO, ABORT, RETRY, IGNORE };
|
||||
|
||||
|
||||
//These are the buttons texts for different languages.
|
||||
//If you want to add a new language, add it here and in the GetButtonText-Function
|
||||
private enum TwoLetterISOLanguageID { en, de, es, it };
|
||||
private static readonly String[] BUTTON_TEXTS_ENGLISH_EN = { "OK", "Cancel", "&Yes", "&No", "&Abort", "&Retry", "&Ignore" }; //Note: This is also the fallback language
|
||||
private static readonly String[] BUTTON_TEXTS_GERMAN_DE = { "OK", "Abbrechen", "&Ja", "&Nein", "&Abbrechen", "&Wiederholen", "&Ignorieren" };
|
||||
private static readonly String[] BUTTON_TEXTS_SPANISH_ES = { "Aceptar", "Cancelar", "&Sí", "&No", "&Abortar", "&Reintentar", "&Ignorar" };
|
||||
private static readonly String[] BUTTON_TEXTS_ITALIAN_IT = { "OK", "Annulla", "&Sì", "&No", "&Interrompi", "&Riprova", "&Ignora" };
|
||||
private static readonly string[] BUTTON_TEXTS_ENGLISH_EN = { "OK", "Cancel", "&Yes", "&No", "&Abort", "&Retry", "&Ignore" }; //Note: This is also the fallback language
|
||||
private static readonly string[] BUTTON_TEXTS_GERMAN_DE = { "OK", "Abbrechen", "&Ja", "&Nein", "&Abbrechen", "&Wiederholen", "&Ignorieren" };
|
||||
private static readonly string[] BUTTON_TEXTS_SPANISH_ES = { "Aceptar", "Cancelar", "&Sí", "&No", "&Abortar", "&Reintentar", "&Ignorar" };
|
||||
private static readonly string[] BUTTON_TEXTS_ITALIAN_IT = { "OK", "Annulla", "&Sì", "&No", "&Interrompi", "&Riprova", "&Ignora" };
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -439,7 +439,7 @@ namespace JR.Utils.GUI.Forms
|
||||
|
||||
private MessageBoxDefaultButton defaultButton;
|
||||
private int visibleButtonsCount;
|
||||
private TwoLetterISOLanguageID languageID = TwoLetterISOLanguageID.en;
|
||||
private readonly TwoLetterISOLanguageID languageID = TwoLetterISOLanguageID.en;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -453,10 +453,10 @@ namespace JR.Utils.GUI.Forms
|
||||
InitializeComponent();
|
||||
|
||||
//Try to evaluate the language. If this fails, the fallback language English will be used
|
||||
Enum.TryParse<TwoLetterISOLanguageID>(CultureInfo.CurrentUICulture.TwoLetterISOLanguageName, out this.languageID);
|
||||
_ = Enum.TryParse<TwoLetterISOLanguageID>(CultureInfo.CurrentUICulture.TwoLetterISOLanguageName, out languageID);
|
||||
|
||||
this.KeyPreview = true;
|
||||
this.KeyUp += FlexibleMessageBoxForm_KeyUp;
|
||||
KeyPreview = true;
|
||||
KeyUp += FlexibleMessageBoxForm_KeyUp;
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -470,9 +470,12 @@ namespace JR.Utils.GUI.Forms
|
||||
/// <returns>The string rows as 1-dimensional array</returns>
|
||||
private static string[] GetStringRows(string message)
|
||||
{
|
||||
if (string.IsNullOrEmpty(message)) return null;
|
||||
if (string.IsNullOrEmpty(message))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var messageRows = message.Split(new char[] { '\n' }, StringSplitOptions.None);
|
||||
string[] messageRows = message.Split(new char[] { '\n' }, StringSplitOptions.None);
|
||||
return messageRows;
|
||||
}
|
||||
|
||||
@@ -484,15 +487,15 @@ namespace JR.Utils.GUI.Forms
|
||||
/// <returns>The button text</returns>
|
||||
private string GetButtonText(ButtonID buttonID)
|
||||
{
|
||||
var buttonTextArrayIndex = Convert.ToInt32(buttonID);
|
||||
|
||||
switch (this.languageID)
|
||||
int buttonTextArrayIndex = Convert.ToInt32(buttonID);
|
||||
|
||||
switch (languageID)
|
||||
{
|
||||
case TwoLetterISOLanguageID.de: return BUTTON_TEXTS_GERMAN_DE[buttonTextArrayIndex];
|
||||
case TwoLetterISOLanguageID.es: return BUTTON_TEXTS_SPANISH_ES[buttonTextArrayIndex];
|
||||
case TwoLetterISOLanguageID.it: return BUTTON_TEXTS_ITALIAN_IT[buttonTextArrayIndex];
|
||||
|
||||
default: return BUTTON_TEXTS_ENGLISH_EN[buttonTextArrayIndex];
|
||||
default: return BUTTON_TEXTS_ENGLISH_EN[buttonTextArrayIndex];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -509,10 +512,7 @@ namespace JR.Utils.GUI.Forms
|
||||
const double MIN_FACTOR = 0.2;
|
||||
const double MAX_FACTOR = 1.0;
|
||||
|
||||
if (workingAreaFactor < MIN_FACTOR) return MIN_FACTOR;
|
||||
if (workingAreaFactor > MAX_FACTOR) return MAX_FACTOR;
|
||||
|
||||
return workingAreaFactor;
|
||||
return workingAreaFactor < MIN_FACTOR ? MIN_FACTOR : workingAreaFactor > MAX_FACTOR ? MAX_FACTOR : workingAreaFactor;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -526,10 +526,10 @@ namespace JR.Utils.GUI.Forms
|
||||
//If no owner given: Center on current screen
|
||||
if (owner == null)
|
||||
{
|
||||
var screen = Screen.FromPoint(Cursor.Position);
|
||||
Screen screen = Screen.FromPoint(Cursor.Position);
|
||||
flexibleMessageBoxForm.StartPosition = FormStartPosition.Manual;
|
||||
flexibleMessageBoxForm.Left = screen.Bounds.Left + screen.Bounds.Width / 2 - flexibleMessageBoxForm.Width / 2;
|
||||
flexibleMessageBoxForm.Top = screen.Bounds.Top + screen.Bounds.Height / 2 - flexibleMessageBoxForm.Height / 2;
|
||||
flexibleMessageBoxForm.Left = screen.Bounds.Left + (screen.Bounds.Width / 2) - (flexibleMessageBoxForm.Width / 2);
|
||||
flexibleMessageBoxForm.Top = screen.Bounds.Top + (screen.Bounds.Height / 2) - (flexibleMessageBoxForm.Height / 2);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -547,21 +547,24 @@ namespace JR.Utils.GUI.Forms
|
||||
Convert.ToInt32(SystemInformation.WorkingArea.Height * FlexibleMessageBoxForm.GetCorrectedWorkingAreaFactor(MAX_HEIGHT_FACTOR)));
|
||||
|
||||
//Get rows. Exit if there are no rows to render...
|
||||
var stringRows = GetStringRows(text);
|
||||
if (stringRows == null) return;
|
||||
string[] stringRows = GetStringRows(text);
|
||||
if (stringRows == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//Calculate whole text height
|
||||
var textHeight = TextRenderer.MeasureText(text, FONT).Height;
|
||||
|
||||
int textHeight = TextRenderer.MeasureText(text, FONT).Height;
|
||||
|
||||
//Calculate width for longest text line
|
||||
const int SCROLLBAR_WIDTH_OFFSET = 15;
|
||||
var longestTextRowWidth = stringRows.Max(textForRow => TextRenderer.MeasureText(textForRow, FONT).Width);
|
||||
var captionWidth = TextRenderer.MeasureText(caption, SystemFonts.CaptionFont).Width;
|
||||
var textWidth = Math.Max(longestTextRowWidth + SCROLLBAR_WIDTH_OFFSET, captionWidth);
|
||||
|
||||
int longestTextRowWidth = stringRows.Max(textForRow => TextRenderer.MeasureText(textForRow, FONT).Width);
|
||||
int captionWidth = TextRenderer.MeasureText(caption, SystemFonts.CaptionFont).Width;
|
||||
int textWidth = Math.Max(longestTextRowWidth + SCROLLBAR_WIDTH_OFFSET, captionWidth);
|
||||
|
||||
//Calculate margins
|
||||
var marginWidth = flexibleMessageBoxForm.Width - flexibleMessageBoxForm.richTextBoxMessage.Width;
|
||||
var marginHeight = flexibleMessageBoxForm.Height - flexibleMessageBoxForm.richTextBoxMessage.Height;
|
||||
int marginWidth = flexibleMessageBoxForm.Width - flexibleMessageBoxForm.richTextBoxMessage.Width;
|
||||
int marginHeight = flexibleMessageBoxForm.Height - flexibleMessageBoxForm.richTextBoxMessage.Height;
|
||||
|
||||
//Set calculated dialog size (if the calculated values exceed the maximums, they were cut by windows forms automatically)
|
||||
flexibleMessageBoxForm.Size = new Size(textWidth + marginWidth,
|
||||
@@ -625,7 +628,7 @@ namespace JR.Utils.GUI.Forms
|
||||
flexibleMessageBoxForm.button3.Visible = true;
|
||||
flexibleMessageBoxForm.button3.Text = flexibleMessageBoxForm.GetButtonText(ButtonID.IGNORE);
|
||||
flexibleMessageBoxForm.button3.DialogResult = DialogResult.Ignore;
|
||||
|
||||
|
||||
flexibleMessageBoxForm.ControlBox = false;
|
||||
break;
|
||||
|
||||
@@ -715,11 +718,11 @@ namespace JR.Utils.GUI.Forms
|
||||
/// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
|
||||
private void FlexibleMessageBoxForm_Shown(object sender, EventArgs e)
|
||||
{
|
||||
int buttonIndexToFocus = 1;
|
||||
Button buttonToFocus;
|
||||
|
||||
int buttonIndexToFocus;
|
||||
//Set the default button...
|
||||
switch (this.defaultButton)
|
||||
switch (defaultButton)
|
||||
{
|
||||
case MessageBoxDefaultButton.Button1:
|
||||
default:
|
||||
@@ -733,22 +736,14 @@ namespace JR.Utils.GUI.Forms
|
||||
break;
|
||||
}
|
||||
|
||||
if (buttonIndexToFocus > this.visibleButtonsCount) buttonIndexToFocus = this.visibleButtonsCount;
|
||||
|
||||
if (buttonIndexToFocus == 3)
|
||||
if (buttonIndexToFocus > visibleButtonsCount)
|
||||
{
|
||||
buttonToFocus = this.button3;
|
||||
}
|
||||
else if (buttonIndexToFocus == 2)
|
||||
{
|
||||
buttonToFocus = this.button2;
|
||||
}
|
||||
else
|
||||
{
|
||||
buttonToFocus = this.button1;
|
||||
buttonIndexToFocus = visibleButtonsCount;
|
||||
}
|
||||
|
||||
buttonToFocus.Focus();
|
||||
buttonToFocus = buttonIndexToFocus == 3 ? button3 : buttonIndexToFocus == 2 ? button2 : button1;
|
||||
|
||||
_ = buttonToFocus.Focus();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -761,7 +756,7 @@ namespace JR.Utils.GUI.Forms
|
||||
try
|
||||
{
|
||||
Cursor.Current = Cursors.WaitCursor;
|
||||
Process.Start(e.LinkText);
|
||||
_ = Process.Start(e.LinkText);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
@@ -780,20 +775,20 @@ namespace JR.Utils.GUI.Forms
|
||||
/// </summary>
|
||||
/// <param name="sender">The source of the event.</param>
|
||||
/// <param name="e">The <see cref="System.Windows.Forms.KeyEventArgs"/> instance containing the event data.</param>
|
||||
void FlexibleMessageBoxForm_KeyUp(object sender, KeyEventArgs e)
|
||||
private void FlexibleMessageBoxForm_KeyUp(object sender, KeyEventArgs e)
|
||||
{
|
||||
//Handle standard key strikes for clipboard copy: "Ctrl + C" and "Ctrl + Insert"
|
||||
if (e.Control && (e.KeyCode == Keys.C || e.KeyCode == Keys.Insert))
|
||||
{
|
||||
var buttonsTextLine = (this.button1.Visible ? this.button1.Text + STANDARD_MESSAGEBOX_SEPARATOR_SPACES : string.Empty)
|
||||
+ (this.button2.Visible ? this.button2.Text + STANDARD_MESSAGEBOX_SEPARATOR_SPACES : string.Empty)
|
||||
+ (this.button3.Visible ? this.button3.Text + STANDARD_MESSAGEBOX_SEPARATOR_SPACES : string.Empty);
|
||||
string buttonsTextLine = (button1.Visible ? button1.Text + STANDARD_MESSAGEBOX_SEPARATOR_SPACES : string.Empty)
|
||||
+ (button2.Visible ? button2.Text + STANDARD_MESSAGEBOX_SEPARATOR_SPACES : string.Empty)
|
||||
+ (button3.Visible ? button3.Text + STANDARD_MESSAGEBOX_SEPARATOR_SPACES : string.Empty);
|
||||
|
||||
//Build same clipboard text like the standard .Net MessageBox
|
||||
var textForClipboard = STANDARD_MESSAGEBOX_SEPARATOR_LINES
|
||||
+ this.Text + Environment.NewLine
|
||||
string textForClipboard = STANDARD_MESSAGEBOX_SEPARATOR_LINES
|
||||
+ Text + Environment.NewLine
|
||||
+ STANDARD_MESSAGEBOX_SEPARATOR_LINES
|
||||
+ this.richTextBoxMessage.Text + Environment.NewLine
|
||||
+ richTextBoxMessage.Text + Environment.NewLine
|
||||
+ STANDARD_MESSAGEBOX_SEPARATOR_LINES
|
||||
+ buttonsTextLine.Replace("&", string.Empty) + Environment.NewLine
|
||||
+ STANDARD_MESSAGEBOX_SEPARATOR_LINES;
|
||||
@@ -834,12 +829,14 @@ namespace JR.Utils.GUI.Forms
|
||||
public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton)
|
||||
{
|
||||
//Create a new instance of the FlexibleMessageBox form
|
||||
var flexibleMessageBoxForm = new FlexibleMessageBoxForm();
|
||||
flexibleMessageBoxForm.ShowInTaskbar = false;
|
||||
FlexibleMessageBoxForm flexibleMessageBoxForm = new FlexibleMessageBoxForm
|
||||
{
|
||||
ShowInTaskbar = false,
|
||||
|
||||
//Bind the caption and the message text
|
||||
flexibleMessageBoxForm.CaptionText = caption;
|
||||
flexibleMessageBoxForm.MessageText = text;
|
||||
//Bind the caption and the message text
|
||||
CaptionText = caption,
|
||||
MessageText = text
|
||||
};
|
||||
flexibleMessageBoxForm.FlexibleMessageBoxFormBindingSource.DataSource = flexibleMessageBoxForm;
|
||||
|
||||
//Set the buttons visibilities and texts. Also set a default button.
|
||||
|
||||
3032
MainForm.Designer.cs
generated
3032
MainForm.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
3539
MainForm.cs
3539
MainForm.cs
File diff suppressed because it is too large
Load Diff
116
MainForm.resx
116
MainForm.resx
@@ -117,142 +117,64 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="startsideloadbutton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="devicesbutton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>752, 113</value>
|
||||
</metadata>
|
||||
<metadata name="obbcopybutton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>498, 113</value>
|
||||
</metadata>
|
||||
<metadata name="backupbutton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>256, 113</value>
|
||||
</metadata>
|
||||
<metadata name="restorebutton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 113</value>
|
||||
</metadata>
|
||||
<metadata name="getApkButton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>2205, 65</value>
|
||||
</metadata>
|
||||
<metadata name="uninstallAppButton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>1921, 65</value>
|
||||
</metadata>
|
||||
<metadata name="pullAppToDesktopBtn_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>1614, 65</value>
|
||||
</metadata>
|
||||
<metadata name="copyBulkObbButton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>1322, 65</value>
|
||||
</metadata>
|
||||
<metadata name="downloadInstallGameButton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>963, 65</value>
|
||||
</metadata>
|
||||
<metadata name="aboutBtn_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>761, 65</value>
|
||||
</metadata>
|
||||
<metadata name="settingsButton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>515, 65</value>
|
||||
</metadata>
|
||||
<metadata name="InstallQUset_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>290, 65</value>
|
||||
</metadata>
|
||||
<metadata name="removeQUSetting_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 65</value>
|
||||
</metadata>
|
||||
<metadata name="QuestOptionsButton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>1827, 17</value>
|
||||
</metadata>
|
||||
<metadata name="ADBWirelessDisable_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>1537, 17</value>
|
||||
</metadata>
|
||||
<metadata name="ADBWirelessEnable_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>1252, 17</value>
|
||||
</metadata>
|
||||
<metadata name="UpdateGamesButton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>955, 17</value>
|
||||
</metadata>
|
||||
<metadata name="listApkButton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>718, 17</value>
|
||||
</metadata>
|
||||
<metadata name="speedLabel_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>499, 17</value>
|
||||
<value>219, 17</value>
|
||||
</metadata>
|
||||
<metadata name="etaLabel_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>304, 17</value>
|
||||
</metadata>
|
||||
<metadata name="MountButton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>994, 113</value>
|
||||
</metadata>
|
||||
<metadata name="EnterInstallBox_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>1231, 113</value>
|
||||
<value>178, 56</value>
|
||||
</metadata>
|
||||
<metadata name="startsideloadbutton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="devicesbutton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>752, 113</value>
|
||||
<value>197, 95</value>
|
||||
</metadata>
|
||||
<metadata name="obbcopybutton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>498, 113</value>
|
||||
<value>17, 95</value>
|
||||
</metadata>
|
||||
<metadata name="backupbutton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>256, 113</value>
|
||||
<value>1454, 56</value>
|
||||
</metadata>
|
||||
<metadata name="restorebutton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 113</value>
|
||||
<value>1284, 56</value>
|
||||
</metadata>
|
||||
<metadata name="getApkButton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>2205, 65</value>
|
||||
<value>1113, 56</value>
|
||||
</metadata>
|
||||
<metadata name="uninstallAppButton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>1921, 65</value>
|
||||
<value>913, 56</value>
|
||||
</metadata>
|
||||
<metadata name="pullAppToDesktopBtn_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>1614, 65</value>
|
||||
<value>698, 56</value>
|
||||
</metadata>
|
||||
<metadata name="copyBulkObbButton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>1322, 65</value>
|
||||
</metadata>
|
||||
<metadata name="downloadInstallGameButton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>963, 65</value>
|
||||
<value>493, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aboutBtn_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>761, 65</value>
|
||||
<value>369, 95</value>
|
||||
</metadata>
|
||||
<metadata name="settingsButton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>515, 65</value>
|
||||
</metadata>
|
||||
<metadata name="InstallQUset_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>290, 65</value>
|
||||
</metadata>
|
||||
<metadata name="removeQUSetting_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 65</value>
|
||||
<value>319, 56</value>
|
||||
</metadata>
|
||||
<metadata name="QuestOptionsButton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>1827, 17</value>
|
||||
<value>1158, 17</value>
|
||||
</metadata>
|
||||
<metadata name="ADBWirelessDisable_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>1537, 17</value>
|
||||
<value>954, 17</value>
|
||||
</metadata>
|
||||
<metadata name="ADBWirelessEnable_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>1252, 17</value>
|
||||
<value>754, 17</value>
|
||||
</metadata>
|
||||
<metadata name="UpdateGamesButton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>955, 17</value>
|
||||
<value>545, 17</value>
|
||||
</metadata>
|
||||
<metadata name="listApkButton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>718, 17</value>
|
||||
<value>376, 17</value>
|
||||
</metadata>
|
||||
<metadata name="speedLabel_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>499, 17</value>
|
||||
<value>219, 17</value>
|
||||
</metadata>
|
||||
<metadata name="etaLabel_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>304, 17</value>
|
||||
</metadata>
|
||||
<metadata name="MountButton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>994, 113</value>
|
||||
</metadata>
|
||||
<metadata name="EnterInstallBox_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>1231, 113</value>
|
||||
<value>178, 56</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -16,10 +16,7 @@ namespace AndroidSideloader.Models
|
||||
public string Password
|
||||
{
|
||||
get => password;
|
||||
set
|
||||
{
|
||||
password = Encoding.UTF8.GetString(Convert.FromBase64String(value));
|
||||
}
|
||||
set => password = Encoding.UTF8.GetString(Convert.FromBase64String(value));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
52
NewApps.Designer.cs
generated
52
NewApps.Designer.cs
generated
@@ -29,12 +29,13 @@ namespace AndroidSideloader
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NewApps));
|
||||
this.NewAppsListView = new System.Windows.Forms.ListView();
|
||||
this.GameNameIndex = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.PackageNameIndex = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.NewAppsButton = new System.Windows.Forms.Button();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.NewAppsButton = new AndroidSideloader.RoundButton();
|
||||
this.panel2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
@@ -73,26 +74,6 @@ namespace AndroidSideloader
|
||||
//
|
||||
this.PackageNameIndex.Width = 0;
|
||||
//
|
||||
// NewAppsButton
|
||||
//
|
||||
this.NewAppsButton.BackColor = global::AndroidSideloader.Properties.Settings.Default.SubButtonColor;
|
||||
this.NewAppsButton.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "SubButtonColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.NewAppsButton.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.NewAppsButton.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.NewAppsButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.NewAppsButton.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.NewAppsButton.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.NewAppsButton.Location = new System.Drawing.Point(12, 212);
|
||||
this.NewAppsButton.Name = "NewAppsButton";
|
||||
this.NewAppsButton.Size = new System.Drawing.Size(288, 29);
|
||||
this.NewAppsButton.TabIndex = 2;
|
||||
this.NewAppsButton.Text = "Accept";
|
||||
this.NewAppsButton.UseVisualStyleBackColor = true;
|
||||
this.NewAppsButton.Click += new System.EventHandler(this.DonateButton_Click);
|
||||
this.NewAppsButton.MouseDown += new System.Windows.Forms.MouseEventHandler(this.label2_MouseDown);
|
||||
this.NewAppsButton.MouseMove += new System.Windows.Forms.MouseEventHandler(this.label2_MouseMove);
|
||||
this.NewAppsButton.MouseUp += new System.Windows.Forms.MouseEventHandler(this.label2_MouseUp);
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
this.panel2.BackColor = global::AndroidSideloader.Properties.Settings.Default.SubButtonColor;
|
||||
@@ -119,18 +100,41 @@ namespace AndroidSideloader
|
||||
this.label2.MouseMove += new System.Windows.Forms.MouseEventHandler(this.label2_MouseMove);
|
||||
this.label2.MouseUp += new System.Windows.Forms.MouseEventHandler(this.label2_MouseUp);
|
||||
//
|
||||
// NewAppsButton
|
||||
//
|
||||
this.NewAppsButton.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.NewAppsButton.Active2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.NewAppsButton.BackColor = System.Drawing.Color.Transparent;
|
||||
this.NewAppsButton.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.NewAppsButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F);
|
||||
this.NewAppsButton.ForeColor = System.Drawing.Color.White;
|
||||
this.NewAppsButton.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.NewAppsButton.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.NewAppsButton.Location = new System.Drawing.Point(12, 212);
|
||||
this.NewAppsButton.Name = "NewAppsButton";
|
||||
this.NewAppsButton.Radius = 5;
|
||||
this.NewAppsButton.Size = new System.Drawing.Size(288, 29);
|
||||
this.NewAppsButton.Stroke = true;
|
||||
this.NewAppsButton.StrokeColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(74)))), ((int)(((byte)(74)))));
|
||||
this.NewAppsButton.TabIndex = 2;
|
||||
this.NewAppsButton.Text = "Accept";
|
||||
this.NewAppsButton.Transparency = false;
|
||||
this.NewAppsButton.Click += new System.EventHandler(this.DonateButton_Click);
|
||||
//
|
||||
// NewApps
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = global::AndroidSideloader.Properties.Settings.Default.BackColor;
|
||||
this.BackgroundImage = global::AndroidSideloader.Properties.Resources.pattern_cubes_1_1_1_0_0_0_1__000000_212121;
|
||||
this.ClientSize = new System.Drawing.Size(313, 248);
|
||||
this.ControlBox = false;
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.NewAppsButton);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.panel2);
|
||||
this.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "BackColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "NewApps";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Load += new System.EventHandler(this.NewApps_Load);
|
||||
@@ -140,16 +144,16 @@ namespace AndroidSideloader
|
||||
this.panel2.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
this.Activate();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.ListView NewAppsListView;
|
||||
private System.Windows.Forms.ColumnHeader GameNameIndex;
|
||||
private System.Windows.Forms.Button NewAppsButton;
|
||||
private System.Windows.Forms.Panel panel2;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.ColumnHeader PackageNameIndex;
|
||||
private RoundButton NewAppsButton;
|
||||
}
|
||||
}
|
||||
19
NewApps.cs
19
NewApps.cs
@@ -1,11 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AndroidSideloader
|
||||
@@ -30,10 +25,10 @@ namespace AndroidSideloader
|
||||
{
|
||||
if (mouseDown)
|
||||
{
|
||||
this.Location = new Point(
|
||||
(this.Location.X - lastLocation.X) + e.X, (this.Location.Y - lastLocation.Y) + e.Y);
|
||||
Location = new Point(
|
||||
Location.X - lastLocation.X + e.X, Location.Y - lastLocation.Y + e.Y);
|
||||
|
||||
this.Update();
|
||||
Update();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,8 +53,8 @@ namespace AndroidSideloader
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
}
|
||||
MainForm.newpackageupload();
|
||||
this.Close();
|
||||
MainForm.newPackageUpload();
|
||||
Close();
|
||||
}
|
||||
|
||||
private void NewApps_Load(object sender, EventArgs e)
|
||||
@@ -71,7 +66,9 @@ namespace AndroidSideloader
|
||||
{
|
||||
ListViewItem NGame = new ListViewItem(release);
|
||||
if (!NewAppList.Contains(NGame))
|
||||
NewAppList.Add(NGame);
|
||||
{
|
||||
NewAppList.Add(NGame);
|
||||
}
|
||||
}
|
||||
ListViewItem[] arr = NewAppList.ToArray();
|
||||
NewAppsListView.BeginUpdate();
|
||||
|
||||
6849
NewApps.resx
6849
NewApps.resx
File diff suppressed because it is too large
Load Diff
28
Program.cs
28
Program.cs
@@ -1,22 +1,22 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.Security.Permissions;
|
||||
using System.IO;
|
||||
using System.Security.Permissions;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
static class Program
|
||||
internal static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
[SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.ControlAppDomain)]
|
||||
static void Main()
|
||||
private static void Main()
|
||||
{
|
||||
|
||||
|
||||
AppDomain currentDomain = AppDomain.CurrentDomain;
|
||||
currentDomain.UnhandledException += new UnhandledExceptionEventHandler(MyHandler);
|
||||
currentDomain.UnhandledException += new UnhandledExceptionEventHandler(CrashHandler);
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
|
||||
@@ -25,11 +25,21 @@ namespace AndroidSideloader
|
||||
//form.Show();
|
||||
}
|
||||
public static MainForm form;
|
||||
static void MyHandler(object sender, UnhandledExceptionEventArgs args)
|
||||
|
||||
private static void CrashHandler(object sender, UnhandledExceptionEventArgs args)
|
||||
{
|
||||
// Capture unhandled exceptions and write to file.
|
||||
Exception e = (Exception)args.ExceptionObject;
|
||||
string innerExceptionMessage = (e.InnerException != null)
|
||||
? e.InnerException.Message
|
||||
: "None";
|
||||
string date_time = DateTime.Now.ToString("dddd, MMMM dd @ hh:mmtt (UTC)");
|
||||
File.WriteAllText(Sideloader.CrashLogPath, $"Date/Time of crash: {date_time}\nMessage: {e.Message}\nData: {e.Data}\nSource: {e.Source}\nTargetSite: {e.TargetSite}");
|
||||
File.WriteAllText(Sideloader.CrashLogPath, $"Date/Time of crash: {date_time}\nMessage: {e.Message}\nInner Message: {innerExceptionMessage}\nData: {e.Data}\nSource: {e.Source}\nTargetSite: {e.TargetSite}\nStack Trace: \n{e.StackTrace}\n\n\nDebuglog: \n\n\n");
|
||||
// If a debuglog exists we append it to the crashlog.
|
||||
if (File.Exists(Properties.Settings.Default.CurrentLogPath))
|
||||
{
|
||||
File.AppendAllText(Sideloader.CrashLogPath, File.ReadAllText($"{Properties.Settings.Default.CurrentLogPath}"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
|
||||
34
Properties/Resources.Designer.cs
generated
34
Properties/Resources.Designer.cs
generated
@@ -100,6 +100,36 @@ namespace AndroidSideloader.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap Pattern {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Pattern", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap pattern_cubes_1_1_1_0_0_0_1__000000_212121 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("pattern_cubes-1_1_1_0-0_0_1__000000_212121", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap pattern_herringbone_2_1_3_0_0_90_1__000000_1c1c1c {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("pattern_herringbone_2_1_3_0_0_90_1__000000_1c1c1c", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -113,9 +143,9 @@ namespace AndroidSideloader.Properties {
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap splash {
|
||||
public static System.Drawing.Bitmap splashimage {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("splash", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("splashimage", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,11 +118,17 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="battery" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\battery.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="battery1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\battery11.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="battery" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\battery.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="pattern_herringbone_2_1_3_0_0_90_1__000000_1c1c1c" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\pattern_herringbone-2_1_3_0-0_90_1__000000_1c1c1c.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="splashimage" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\splashimage.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="battery11" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\battery1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
@@ -133,7 +139,10 @@
|
||||
<data name="SearchGlass" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SearchGlass.PNG;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="splash" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\splash.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="Pattern" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Pattern.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="pattern_cubes-1_1_1_0-0_0_1__000000_212121" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\pattern_cubes-1_1_1_0-0_0_1__000000_212121.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
241
Properties/Settings.Designer.cs
generated
241
Properties/Settings.Designer.cs
generated
@@ -12,7 +12,7 @@ namespace AndroidSideloader.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.3.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.6.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
@@ -143,18 +143,6 @@ namespace AndroidSideloader.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string BandwithLimit {
|
||||
get {
|
||||
return ((string)(this["BandwithLimit"]));
|
||||
}
|
||||
set {
|
||||
this["BandwithLimit"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Microsoft Sans Serif, 14pt")]
|
||||
@@ -215,101 +203,7 @@ namespace AndroidSideloader.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
public bool QUsett {
|
||||
get {
|
||||
return ((bool)(this["QUsett"]));
|
||||
}
|
||||
set {
|
||||
this["QUsett"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string QuChecked {
|
||||
get {
|
||||
return ((string)(this["QuChecked"]));
|
||||
}
|
||||
set {
|
||||
this["QuChecked"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("0")]
|
||||
public string QUhz {
|
||||
get {
|
||||
return ((string)(this["QUhz"]));
|
||||
}
|
||||
set {
|
||||
this["QUhz"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("0")]
|
||||
public string QUres {
|
||||
get {
|
||||
return ((string)(this["QUres"]));
|
||||
}
|
||||
set {
|
||||
this["QUres"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("0")]
|
||||
public string QUy {
|
||||
get {
|
||||
return ((string)(this["QUy"]));
|
||||
}
|
||||
set {
|
||||
this["QUy"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("0")]
|
||||
public string QUx {
|
||||
get {
|
||||
return ((string)(this["QUx"]));
|
||||
}
|
||||
set {
|
||||
this["QUx"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Change Me")]
|
||||
public string QUname {
|
||||
get {
|
||||
return ((string)(this["QUname"]));
|
||||
}
|
||||
set {
|
||||
this["QUname"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string QUString {
|
||||
get {
|
||||
return ((string)(this["QUString"]));
|
||||
}
|
||||
set {
|
||||
this["QUString"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
@@ -322,18 +216,7 @@ namespace AndroidSideloader.Properties {
|
||||
this["MainDir"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string QUStringF {
|
||||
get {
|
||||
return ((string)(this["QUStringF"]));
|
||||
}
|
||||
set {
|
||||
this["QUStringF"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
@@ -407,18 +290,6 @@ namespace AndroidSideloader.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
public bool EnterKeyInstall {
|
||||
get {
|
||||
return ((bool)(this["EnterKeyInstall"]));
|
||||
}
|
||||
set {
|
||||
this["EnterKeyInstall"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
@@ -478,19 +349,7 @@ namespace AndroidSideloader.Properties {
|
||||
this["CurrentCrashName"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
public bool QUturnedon {
|
||||
get {
|
||||
return ((bool)(this["QUturnedon"]));
|
||||
}
|
||||
set {
|
||||
this["QUturnedon"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
@@ -672,7 +531,7 @@ namespace AndroidSideloader.Properties {
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("50, 50, 50")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("25, 25, 25")]
|
||||
public global::System.Drawing.Color ComboBoxColor {
|
||||
get {
|
||||
return ((global::System.Drawing.Color)(this["ComboBoxColor"]));
|
||||
@@ -684,7 +543,7 @@ namespace AndroidSideloader.Properties {
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("40, 40, 40")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("25, 25, 25")]
|
||||
public global::System.Drawing.Color SubButtonColor {
|
||||
get {
|
||||
return ((global::System.Drawing.Color)(this["SubButtonColor"]));
|
||||
@@ -696,7 +555,7 @@ namespace AndroidSideloader.Properties {
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("29, 29, 29")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("25, 25, 25")]
|
||||
public global::System.Drawing.Color TextBoxColor {
|
||||
get {
|
||||
return ((global::System.Drawing.Color)(this["TextBoxColor"]));
|
||||
@@ -708,7 +567,7 @@ namespace AndroidSideloader.Properties {
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("50, 50, 50")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Black")]
|
||||
public global::System.Drawing.Color ButtonColor {
|
||||
get {
|
||||
return ((global::System.Drawing.Color)(this["ButtonColor"]));
|
||||
@@ -720,7 +579,7 @@ namespace AndroidSideloader.Properties {
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("50, 50, 50")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("1, 1, 1")]
|
||||
public global::System.Drawing.Color BackColor {
|
||||
get {
|
||||
return ((global::System.Drawing.Color)(this["BackColor"]));
|
||||
@@ -741,5 +600,89 @@ namespace AndroidSideloader.Properties {
|
||||
this["AppPackages"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
public bool TrailersOn {
|
||||
get {
|
||||
return ((bool)(this["TrailersOn"]));
|
||||
}
|
||||
set {
|
||||
this["TrailersOn"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string downloadDir {
|
||||
get {
|
||||
return ((string)(this["downloadDir"]));
|
||||
}
|
||||
set {
|
||||
this["downloadDir"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
public bool customDownloadDir {
|
||||
get {
|
||||
return ((bool)(this["customDownloadDir"]));
|
||||
}
|
||||
set {
|
||||
this["customDownloadDir"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
public bool customBackupDir {
|
||||
get {
|
||||
return ((bool)(this["customBackupDir"]));
|
||||
}
|
||||
set {
|
||||
this["customBackupDir"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string backupDir {
|
||||
get {
|
||||
return ((string)(this["backupDir"]));
|
||||
}
|
||||
set {
|
||||
this["backupDir"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
public bool singleThreadMode {
|
||||
get {
|
||||
return ((bool)(this["singleThreadMode"]));
|
||||
}
|
||||
set {
|
||||
this["singleThreadMode"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
public bool virtualFilesystemCompatibility {
|
||||
get {
|
||||
return ((bool)(this["virtualFilesystemCompatibility"]));
|
||||
}
|
||||
set {
|
||||
this["virtualFilesystemCompatibility"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,9 +32,6 @@
|
||||
<Setting Name="SpoofGames" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="BandwithLimit" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="BigFontStyle" Type="System.Drawing.Font" Scope="User">
|
||||
<Value Profile="(Default)">Microsoft Sans Serif, 14pt</Value>
|
||||
</Setting>
|
||||
@@ -50,36 +47,9 @@
|
||||
<Setting Name="ADBPath" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="QUsett" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="QuChecked" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="QUhz" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">0</Value>
|
||||
</Setting>
|
||||
<Setting Name="QUres" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">0</Value>
|
||||
</Setting>
|
||||
<Setting Name="QUy" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">0</Value>
|
||||
</Setting>
|
||||
<Setting Name="QUx" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">0</Value>
|
||||
</Setting>
|
||||
<Setting Name="QUname" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">Change Me</Value>
|
||||
</Setting>
|
||||
<Setting Name="QUString" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="MainDir" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="QUStringF" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="delsh" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
@@ -98,9 +68,6 @@
|
||||
<Setting Name="PackageNameToCB" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="EnterKeyInstall" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="DownUpHeld" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
@@ -116,9 +83,6 @@
|
||||
<Setting Name="CurrentCrashName" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="QUturnedon" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="adbdebugwarned" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
@@ -165,22 +129,43 @@
|
||||
<Value Profile="(Default)">White</Value>
|
||||
</Setting>
|
||||
<Setting Name="ComboBoxColor" Type="System.Drawing.Color" Scope="User">
|
||||
<Value Profile="(Default)">50, 50, 50</Value>
|
||||
<Value Profile="(Default)">25, 25, 25</Value>
|
||||
</Setting>
|
||||
<Setting Name="SubButtonColor" Type="System.Drawing.Color" Scope="User">
|
||||
<Value Profile="(Default)">40, 40, 40</Value>
|
||||
<Value Profile="(Default)">25, 25, 25</Value>
|
||||
</Setting>
|
||||
<Setting Name="TextBoxColor" Type="System.Drawing.Color" Scope="User">
|
||||
<Value Profile="(Default)">29, 29, 29</Value>
|
||||
<Value Profile="(Default)">25, 25, 25</Value>
|
||||
</Setting>
|
||||
<Setting Name="ButtonColor" Type="System.Drawing.Color" Scope="User">
|
||||
<Value Profile="(Default)">50, 50, 50</Value>
|
||||
<Value Profile="(Default)">Black</Value>
|
||||
</Setting>
|
||||
<Setting Name="BackColor" Type="System.Drawing.Color" Scope="User">
|
||||
<Value Profile="(Default)">50, 50, 50</Value>
|
||||
<Value Profile="(Default)">1, 1, 1</Value>
|
||||
</Setting>
|
||||
<Setting Name="AppPackages" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="TrailersOn" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="downloadDir" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="customDownloadDir" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="customBackupDir" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="backupDir" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="singleThreadMode" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="virtualFilesystemCompatibility" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
629
QuestForm.Designer.cs
generated
629
QuestForm.Designer.cs
generated
@@ -32,297 +32,147 @@ namespace AndroidSideloader
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(QuestForm));
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.ResetQU = new System.Windows.Forms.Button();
|
||||
this.deleteButton = new System.Windows.Forms.Button();
|
||||
this.questPics = new System.Windows.Forms.Button();
|
||||
this.questVids = new System.Windows.Forms.Button();
|
||||
this.label11 = new System.Windows.Forms.Label();
|
||||
this.QUon = new System.Windows.Forms.CheckBox();
|
||||
this.button3 = new System.Windows.Forms.Button();
|
||||
this.label12 = new System.Windows.Forms.Label();
|
||||
this.label13 = new System.Windows.Forms.Label();
|
||||
this.DeleteShots = new System.Windows.Forms.CheckBox();
|
||||
this.splitter1 = new System.Windows.Forms.Splitter();
|
||||
this.label10 = new System.Windows.Forms.Label();
|
||||
this.label14 = new System.Windows.Forms.Label();
|
||||
this.label15 = new System.Windows.Forms.Label();
|
||||
this.label16 = new System.Windows.Forms.Label();
|
||||
this.CPUComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.GPUComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.ResolutionLabel = new System.Windows.Forms.Label();
|
||||
this.GlobalUsername = new System.Windows.Forms.TextBox();
|
||||
this.FOVy = new System.Windows.Forms.TextBox();
|
||||
this.FOVx = new System.Windows.Forms.TextBox();
|
||||
this.UsrBox = new System.Windows.Forms.TextBox();
|
||||
this.ResBox = new System.Windows.Forms.TextBox();
|
||||
this.TextureResTextBox = new System.Windows.Forms.TextBox();
|
||||
this.QUEnable = new System.Windows.Forms.Button();
|
||||
this.WifiWake = new System.Windows.Forms.Button();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.QURfrRt = new System.Windows.Forms.ComboBox();
|
||||
this.RefreshRateComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.button1 = new AndroidSideloader.RoundButton();
|
||||
this.questVids = new AndroidSideloader.RoundButton();
|
||||
this.questPics = new AndroidSideloader.RoundButton();
|
||||
this.button3 = new AndroidSideloader.RoundButton();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label1.ForeColor = System.Drawing.Color.LightCyan;
|
||||
this.label1.Location = new System.Drawing.Point(31, 5);
|
||||
this.label1.Location = new System.Drawing.Point(72, 276);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(309, 20);
|
||||
this.label1.Size = new System.Drawing.Size(165, 20);
|
||||
this.label1.TabIndex = 6;
|
||||
this.label1.Text = "Temporary settings for all Quest apps";
|
||||
this.label1.Text = "Temporary Settings";
|
||||
this.label1.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label2.ForeColor = System.Drawing.Color.LightSteelBlue;
|
||||
this.label2.Location = new System.Drawing.Point(70, 28);
|
||||
this.label2.Location = new System.Drawing.Point(83, 303);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(231, 32);
|
||||
this.label2.Size = new System.Drawing.Size(143, 16);
|
||||
this.label2.TabIndex = 6;
|
||||
this.label2.Text = "Reboot to reset. - Turn screen off, \r\nthen back on with hold button to apply.";
|
||||
this.label2.Text = "Reboot Quest to Reset";
|
||||
this.label2.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label3.ForeColor = System.Drawing.Color.LightCyan;
|
||||
this.label3.Location = new System.Drawing.Point(57, 339);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(256, 20);
|
||||
this.label3.TabIndex = 6;
|
||||
this.label3.Text = "QU Settings (for -QU releases)";
|
||||
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label4.ForeColor = System.Drawing.Color.LightSteelBlue;
|
||||
this.label4.Location = new System.Drawing.Point(16, 363);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(338, 16);
|
||||
this.label4.TabIndex = 6;
|
||||
this.label4.Text = "Persists on device reboot. Enter 0 to reset any category.\r\n";
|
||||
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// ResetQU
|
||||
//
|
||||
this.ResetQU.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.ResetQU.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.ResetQU.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.5F);
|
||||
this.ResetQU.ForeColor = System.Drawing.SystemColors.ControlLight;
|
||||
this.ResetQU.Location = new System.Drawing.Point(189, 555);
|
||||
this.ResetQU.Name = "ResetQU";
|
||||
this.ResetQU.Size = new System.Drawing.Size(168, 28);
|
||||
this.ResetQU.TabIndex = 14;
|
||||
this.ResetQU.Text = "RESET ALL FIELDS";
|
||||
this.ResetQU.UseVisualStyleBackColor = false;
|
||||
this.ResetQU.Visible = false;
|
||||
this.ResetQU.Click += new System.EventHandler(this.ResetQU_click);
|
||||
//
|
||||
// deleteButton
|
||||
//
|
||||
this.deleteButton.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.deleteButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.deleteButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.5F);
|
||||
this.deleteButton.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.deleteButton.Location = new System.Drawing.Point(13, 606);
|
||||
this.deleteButton.Name = "deleteButton";
|
||||
this.deleteButton.Size = new System.Drawing.Size(167, 25);
|
||||
this.deleteButton.TabIndex = 15;
|
||||
this.deleteButton.Text = "DELETE SAVED SETTINGS";
|
||||
this.deleteButton.UseVisualStyleBackColor = false;
|
||||
this.deleteButton.Visible = false;
|
||||
this.deleteButton.Click += new System.EventHandler(this.DeleteButton_Click);
|
||||
//
|
||||
// questPics
|
||||
//
|
||||
this.questPics.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.questPics.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.questPics.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.5F);
|
||||
this.questPics.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.questPics.Location = new System.Drawing.Point(15, 265);
|
||||
this.questPics.Name = "questPics";
|
||||
this.questPics.Size = new System.Drawing.Size(165, 25);
|
||||
this.questPics.TabIndex = 5;
|
||||
this.questPics.Text = "SCREENSHOTS";
|
||||
this.questPics.UseVisualStyleBackColor = false;
|
||||
this.questPics.Click += new System.EventHandler(this.questPics_Click);
|
||||
//
|
||||
// questVids
|
||||
//
|
||||
this.questVids.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.questVids.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.questVids.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.5F);
|
||||
this.questVids.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.questVids.Location = new System.Drawing.Point(189, 265);
|
||||
this.questVids.Name = "questVids";
|
||||
this.questVids.Size = new System.Drawing.Size(167, 25);
|
||||
this.questVids.TabIndex = 6;
|
||||
this.questVids.Text = "VIDEOSHOTS";
|
||||
this.questVids.UseVisualStyleBackColor = false;
|
||||
this.questVids.Click += new System.EventHandler(this.questVids_Click);
|
||||
//
|
||||
// label11
|
||||
//
|
||||
this.label11.AutoSize = true;
|
||||
this.label11.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label11.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label11.ForeColor = System.Drawing.Color.LightCyan;
|
||||
this.label11.Location = new System.Drawing.Point(26, 217);
|
||||
this.label11.Location = new System.Drawing.Point(18, 94);
|
||||
this.label11.Name = "label11";
|
||||
this.label11.Size = new System.Drawing.Size(319, 20);
|
||||
this.label11.Size = new System.Drawing.Size(272, 20);
|
||||
this.label11.TabIndex = 6;
|
||||
this.label11.Text = "Transfer screen/videoshots to Desktop";
|
||||
this.label11.Text = "Transfer screenshots to Desktop";
|
||||
this.label11.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// QUon
|
||||
//
|
||||
this.QUon.AutoSize = true;
|
||||
this.QUon.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.QUon.Cursor = System.Windows.Forms.Cursors.Default;
|
||||
this.QUon.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.QUon.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
|
||||
this.QUon.ForeColor = System.Drawing.Color.LightSkyBlue;
|
||||
this.QUon.Location = new System.Drawing.Point(111, 383);
|
||||
this.QUon.Name = "QUon";
|
||||
this.QUon.Size = new System.Drawing.Size(148, 21);
|
||||
this.QUon.TabIndex = 8;
|
||||
this.QUon.Text = "Enable QU Settings";
|
||||
this.QUon.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.QUon.UseVisualStyleBackColor = true;
|
||||
this.QUon.CheckedChanged += new System.EventHandler(this.QUon_CheckedChanged);
|
||||
//
|
||||
// button3
|
||||
//
|
||||
this.button3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.button3.Enabled = false;
|
||||
this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.button3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.5F);
|
||||
this.button3.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.button3.Location = new System.Drawing.Point(278, 700);
|
||||
this.button3.Name = "button3";
|
||||
this.button3.Size = new System.Drawing.Size(81, 25);
|
||||
this.button3.TabIndex = 17;
|
||||
this.button3.Text = "APPLY";
|
||||
this.button3.UseVisualStyleBackColor = false;
|
||||
this.button3.Click += new System.EventHandler(this.button3_Click);
|
||||
//
|
||||
// label12
|
||||
//
|
||||
this.label12.AutoSize = true;
|
||||
this.label12.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label12.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label12.ForeColor = System.Drawing.Color.LightCyan;
|
||||
this.label12.Location = new System.Drawing.Point(121, 656);
|
||||
this.label12.Location = new System.Drawing.Point(92, 9);
|
||||
this.label12.Name = "label12";
|
||||
this.label12.Size = new System.Drawing.Size(128, 20);
|
||||
this.label12.Size = new System.Drawing.Size(124, 20);
|
||||
this.label12.TabIndex = 6;
|
||||
this.label12.Text = "Set username*";
|
||||
this.label12.Text = "Set Username";
|
||||
this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// label13
|
||||
//
|
||||
this.label13.AutoSize = true;
|
||||
this.label13.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label13.ForeColor = System.Drawing.Color.LightSteelBlue;
|
||||
this.label13.Location = new System.Drawing.Point(83, 678);
|
||||
this.label13.Name = "label13";
|
||||
this.label13.Size = new System.Drawing.Size(204, 16);
|
||||
this.label13.TabIndex = 6;
|
||||
this.label13.Text = "*For games not released by -QU.";
|
||||
this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// DeleteShots
|
||||
//
|
||||
this.DeleteShots.AutoSize = true;
|
||||
this.DeleteShots.BackColor = System.Drawing.Color.Transparent;
|
||||
this.DeleteShots.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.DeleteShots.Cursor = System.Windows.Forms.Cursors.Default;
|
||||
this.DeleteShots.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.DeleteShots.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
|
||||
this.DeleteShots.ForeColor = System.Drawing.Color.LightSkyBlue;
|
||||
this.DeleteShots.Location = new System.Drawing.Point(64, 296);
|
||||
this.DeleteShots.Location = new System.Drawing.Point(33, 232);
|
||||
this.DeleteShots.Name = "DeleteShots";
|
||||
this.DeleteShots.Size = new System.Drawing.Size(242, 21);
|
||||
this.DeleteShots.TabIndex = 7;
|
||||
this.DeleteShots.Text = "Delete files on Quest after transfer";
|
||||
this.DeleteShots.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.DeleteShots.UseVisualStyleBackColor = true;
|
||||
this.DeleteShots.UseVisualStyleBackColor = false;
|
||||
this.DeleteShots.CheckedChanged += new System.EventHandler(this.DeleteShots_CheckedChanged);
|
||||
//
|
||||
// splitter1
|
||||
//
|
||||
this.splitter1.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitter1.Name = "splitter1";
|
||||
this.splitter1.Size = new System.Drawing.Size(3, 737);
|
||||
this.splitter1.Size = new System.Drawing.Size(3, 486);
|
||||
this.splitter1.TabIndex = 14;
|
||||
this.splitter1.TabStop = false;
|
||||
//
|
||||
// label10
|
||||
//
|
||||
this.label10.BackColor = System.Drawing.Color.White;
|
||||
this.label10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.label10.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.label10.Location = new System.Drawing.Point(-7, 327);
|
||||
this.label10.Location = new System.Drawing.Point(-4, 261);
|
||||
this.label10.Name = "label10";
|
||||
this.label10.Size = new System.Drawing.Size(394, 3);
|
||||
this.label10.TabIndex = 15;
|
||||
//
|
||||
// label14
|
||||
//
|
||||
this.label14.BackColor = System.Drawing.Color.White;
|
||||
this.label14.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.label14.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.label14.Location = new System.Drawing.Point(-15, 211);
|
||||
this.label14.Location = new System.Drawing.Point(-4, 80);
|
||||
this.label14.Name = "label14";
|
||||
this.label14.Size = new System.Drawing.Size(394, 3);
|
||||
this.label14.TabIndex = 17;
|
||||
//
|
||||
// label15
|
||||
//
|
||||
this.label15.BackColor = System.Drawing.Color.White;
|
||||
this.label15.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.label15.Location = new System.Drawing.Point(-12, 646);
|
||||
this.label15.Name = "label15";
|
||||
this.label15.Size = new System.Drawing.Size(394, 3);
|
||||
this.label15.TabIndex = 18;
|
||||
//
|
||||
// label16
|
||||
//
|
||||
this.label16.AutoSize = true;
|
||||
this.label16.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label16.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.label16.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label16.ForeColor = System.Drawing.Color.LightSteelBlue;
|
||||
this.label16.Location = new System.Drawing.Point(14, 241);
|
||||
this.label16.Location = new System.Drawing.Point(34, 153);
|
||||
this.label16.Name = "label16";
|
||||
this.label16.Size = new System.Drawing.Size(343, 16);
|
||||
this.label16.Size = new System.Drawing.Size(240, 16);
|
||||
this.label16.TabIndex = 6;
|
||||
this.label16.Text = "Desktop\\Quest Screenshots Desktop\\Quest Videoshots";
|
||||
this.label16.Text = "Exports to: Desktop\\Quest Screenshots";
|
||||
this.label16.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// CPUComboBox
|
||||
//
|
||||
this.CPUComboBox.BackColor = global::AndroidSideloader.Properties.Settings.Default.ComboBoxColor;
|
||||
this.CPUComboBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.CPUComboBox.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.CPUComboBox.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.CPUComboBox.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "ComboBoxColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.CPUComboBox.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.CPUComboBox.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.CPUComboBox.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
@@ -333,18 +183,17 @@ namespace AndroidSideloader
|
||||
"2",
|
||||
"3",
|
||||
"4"});
|
||||
this.CPUComboBox.Location = new System.Drawing.Point(13, 123);
|
||||
this.CPUComboBox.Location = new System.Drawing.Point(38, 383);
|
||||
this.CPUComboBox.Name = "CPUComboBox";
|
||||
this.CPUComboBox.Size = new System.Drawing.Size(346, 26);
|
||||
this.CPUComboBox.Size = new System.Drawing.Size(232, 26);
|
||||
this.CPUComboBox.TabIndex = 2;
|
||||
this.CPUComboBox.Text = "Select CPU level (0 for default)";
|
||||
//
|
||||
// GPUComboBox
|
||||
//
|
||||
this.GPUComboBox.BackColor = global::AndroidSideloader.Properties.Settings.Default.ComboBoxColor;
|
||||
this.GPUComboBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.GPUComboBox.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.GPUComboBox.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.GPUComboBox.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "ComboBoxColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.GPUComboBox.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.GPUComboBox.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.GPUComboBox.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
@@ -355,98 +204,24 @@ namespace AndroidSideloader
|
||||
"2",
|
||||
"3",
|
||||
"4"});
|
||||
this.GPUComboBox.Location = new System.Drawing.Point(13, 94);
|
||||
this.GPUComboBox.Location = new System.Drawing.Point(38, 354);
|
||||
this.GPUComboBox.Name = "GPUComboBox";
|
||||
this.GPUComboBox.Size = new System.Drawing.Size(346, 26);
|
||||
this.GPUComboBox.Size = new System.Drawing.Size(232, 26);
|
||||
this.GPUComboBox.TabIndex = 1;
|
||||
this.GPUComboBox.Text = "Select GPU level (0 for default)";
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.label7.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.label7.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.label7.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.label7.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.label7.Location = new System.Drawing.Point(13, 532);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(63, 18);
|
||||
this.label7.TabIndex = 3;
|
||||
this.label7.Text = "Fov - X";
|
||||
this.label7.Visible = false;
|
||||
//
|
||||
// label8
|
||||
//
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.label8.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.label8.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.label8.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.label8.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.label8.Location = new System.Drawing.Point(191, 532);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(62, 18);
|
||||
this.label8.TabIndex = 3;
|
||||
this.label8.Text = "Fov - Y";
|
||||
this.label8.Visible = false;
|
||||
//
|
||||
// label9
|
||||
//
|
||||
this.label9.AutoSize = true;
|
||||
this.label9.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.label9.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.label9.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.label9.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.label9.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.label9.Location = new System.Drawing.Point(12, 583);
|
||||
this.label9.Name = "label9";
|
||||
this.label9.Size = new System.Drawing.Size(107, 18);
|
||||
this.label9.TabIndex = 3;
|
||||
this.label9.Text = "Refresh Rate";
|
||||
this.label9.Visible = false;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.label6.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.label6.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.label6.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.label6.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.label6.Location = new System.Drawing.Point(93, 484);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(194, 18);
|
||||
this.label6.TabIndex = 3;
|
||||
this.label6.Text = "Enter Custom Username";
|
||||
this.label6.Visible = false;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.label5.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.label5.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.label5.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.label5.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.label5.Location = new System.Drawing.Point(16, 434);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(385, 18);
|
||||
this.label5.TabIndex = 3;
|
||||
this.label5.Text = "Custom Resolution Width (Height auto calculated)";
|
||||
this.label5.Visible = false;
|
||||
//
|
||||
// ResolutionLabel
|
||||
//
|
||||
this.ResolutionLabel.AutoSize = true;
|
||||
this.ResolutionLabel.BackColor = System.Drawing.Color.Transparent;
|
||||
this.ResolutionLabel.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.ResolutionLabel.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.ResolutionLabel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.ResolutionLabel.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.ResolutionLabel.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.ResolutionLabel.Location = new System.Drawing.Point(9, 180);
|
||||
this.ResolutionLabel.Location = new System.Drawing.Point(38, 413);
|
||||
this.ResolutionLabel.Name = "ResolutionLabel";
|
||||
this.ResolutionLabel.Size = new System.Drawing.Size(175, 18);
|
||||
this.ResolutionLabel.Size = new System.Drawing.Size(153, 18);
|
||||
this.ResolutionLabel.TabIndex = 3;
|
||||
this.ResolutionLabel.Text = "Resolution (0=default)";
|
||||
//
|
||||
@@ -458,76 +233,12 @@ namespace AndroidSideloader
|
||||
this.GlobalUsername.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.GlobalUsername.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.GlobalUsername.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.GlobalUsername.Location = new System.Drawing.Point(12, 701);
|
||||
this.GlobalUsername.Location = new System.Drawing.Point(33, 39);
|
||||
this.GlobalUsername.Name = "GlobalUsername";
|
||||
this.GlobalUsername.Size = new System.Drawing.Size(262, 24);
|
||||
this.GlobalUsername.Size = new System.Drawing.Size(142, 24);
|
||||
this.GlobalUsername.TabIndex = 12;
|
||||
this.GlobalUsername.TextChanged += new System.EventHandler(this.GlobalUsername_TextChanged);
|
||||
//
|
||||
// FOVy
|
||||
//
|
||||
this.FOVy.BackColor = global::AndroidSideloader.Properties.Settings.Default.TextBoxColor;
|
||||
this.FOVy.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "TextBoxColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.FOVy.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.FOVy.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.FOVy.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.FOVy.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.FOVy.Location = new System.Drawing.Point(189, 507);
|
||||
this.FOVy.Name = "FOVy";
|
||||
this.FOVy.Size = new System.Drawing.Size(169, 24);
|
||||
this.FOVy.TabIndex = 12;
|
||||
this.FOVy.Text = "0";
|
||||
this.FOVy.Visible = false;
|
||||
this.FOVy.TextChanged += new System.EventHandler(this.FOVy_TextChanged);
|
||||
//
|
||||
// FOVx
|
||||
//
|
||||
this.FOVx.BackColor = global::AndroidSideloader.Properties.Settings.Default.TextBoxColor;
|
||||
this.FOVx.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "TextBoxColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.FOVx.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.FOVx.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.FOVx.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.FOVx.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.FOVx.Location = new System.Drawing.Point(13, 507);
|
||||
this.FOVx.Name = "FOVx";
|
||||
this.FOVx.Size = new System.Drawing.Size(169, 24);
|
||||
this.FOVx.TabIndex = 11;
|
||||
this.FOVx.Text = "0";
|
||||
this.FOVx.Visible = false;
|
||||
this.FOVx.TextChanged += new System.EventHandler(this.FOVx_TextChanged);
|
||||
//
|
||||
// UsrBox
|
||||
//
|
||||
this.UsrBox.BackColor = global::AndroidSideloader.Properties.Settings.Default.TextBoxColor;
|
||||
this.UsrBox.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "TextBoxColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.UsrBox.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.UsrBox.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.UsrBox.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.UsrBox.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.UsrBox.Location = new System.Drawing.Point(13, 459);
|
||||
this.UsrBox.Name = "UsrBox";
|
||||
this.UsrBox.Size = new System.Drawing.Size(345, 24);
|
||||
this.UsrBox.TabIndex = 10;
|
||||
this.UsrBox.Text = "0";
|
||||
this.UsrBox.Visible = false;
|
||||
this.UsrBox.TextChanged += new System.EventHandler(this.UsrBox_TextChanged);
|
||||
//
|
||||
// ResBox
|
||||
//
|
||||
this.ResBox.BackColor = global::AndroidSideloader.Properties.Settings.Default.TextBoxColor;
|
||||
this.ResBox.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "TextBoxColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.ResBox.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.ResBox.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.ResBox.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.ResBox.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.ResBox.Location = new System.Drawing.Point(13, 409);
|
||||
this.ResBox.Name = "ResBox";
|
||||
this.ResBox.Size = new System.Drawing.Size(345, 24);
|
||||
this.ResBox.TabIndex = 9;
|
||||
this.ResBox.Text = "0";
|
||||
this.ResBox.Visible = false;
|
||||
this.ResBox.TextChanged += new System.EventHandler(this.ResBox_TextChanged);
|
||||
//
|
||||
// TextureResTextBox
|
||||
//
|
||||
this.TextureResTextBox.BackColor = global::AndroidSideloader.Properties.Settings.Default.TextBoxColor;
|
||||
@@ -536,93 +247,17 @@ namespace AndroidSideloader
|
||||
this.TextureResTextBox.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.TextureResTextBox.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.TextureResTextBox.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.TextureResTextBox.Location = new System.Drawing.Point(13, 152);
|
||||
this.TextureResTextBox.Location = new System.Drawing.Point(38, 436);
|
||||
this.TextureResTextBox.Name = "TextureResTextBox";
|
||||
this.TextureResTextBox.Size = new System.Drawing.Size(167, 24);
|
||||
this.TextureResTextBox.Size = new System.Drawing.Size(111, 24);
|
||||
this.TextureResTextBox.TabIndex = 3;
|
||||
this.TextureResTextBox.Text = "0";
|
||||
//
|
||||
// QUEnable
|
||||
//
|
||||
this.QUEnable.BackColor = global::AndroidSideloader.Properties.Settings.Default.SubButtonColor;
|
||||
this.QUEnable.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.QUEnable.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.QUEnable.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "SubButtonColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.QUEnable.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.QUEnable.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.QUEnable.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.QUEnable.Location = new System.Drawing.Point(189, 606);
|
||||
this.QUEnable.Name = "QUEnable";
|
||||
this.QUEnable.Size = new System.Drawing.Size(170, 25);
|
||||
this.QUEnable.TabIndex = 16;
|
||||
this.QUEnable.Text = "APPLY";
|
||||
this.QUEnable.UseVisualStyleBackColor = false;
|
||||
this.QUEnable.Visible = false;
|
||||
this.QUEnable.Click += new System.EventHandler(this.QUEnable_Click);
|
||||
//
|
||||
// WifiWake
|
||||
//
|
||||
this.WifiWake.BackColor = global::AndroidSideloader.Properties.Settings.Default.SubButtonColor;
|
||||
this.WifiWake.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.WifiWake.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.WifiWake.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "SubButtonColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.WifiWake.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.WifiWake.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.WifiWake.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.WifiWake.Location = new System.Drawing.Point(189, 180);
|
||||
this.WifiWake.Name = "WifiWake";
|
||||
this.WifiWake.Size = new System.Drawing.Size(170, 25);
|
||||
this.WifiWake.TabIndex = 4;
|
||||
this.WifiWake.Text = "ENABLE WIFI WAKE";
|
||||
this.WifiWake.UseVisualStyleBackColor = false;
|
||||
this.WifiWake.Click += new System.EventHandler(this.WifiWake_Click);
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.BackColor = global::AndroidSideloader.Properties.Settings.Default.SubButtonColor;
|
||||
this.button1.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.button1.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.button1.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "SubButtonColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.button1.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.button1.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.button1.Location = new System.Drawing.Point(189, 152);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(169, 25);
|
||||
this.button1.TabIndex = 4;
|
||||
this.button1.Text = "APPLY";
|
||||
this.button1.UseVisualStyleBackColor = false;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// QURfrRt
|
||||
//
|
||||
this.QURfrRt.BackColor = global::AndroidSideloader.Properties.Settings.Default.ComboBoxColor;
|
||||
this.QURfrRt.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.QURfrRt.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.QURfrRt.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "ComboBoxColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.QURfrRt.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.QURfrRt.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.QURfrRt.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.QURfrRt.FormattingEnabled = true;
|
||||
this.QURfrRt.Items.AddRange(new object[] {
|
||||
"0",
|
||||
"72",
|
||||
"90",
|
||||
"120"});
|
||||
this.QURfrRt.Location = new System.Drawing.Point(13, 555);
|
||||
this.QURfrRt.Name = "QURfrRt";
|
||||
this.QURfrRt.Size = new System.Drawing.Size(170, 26);
|
||||
this.QURfrRt.TabIndex = 13;
|
||||
this.QURfrRt.Text = "0";
|
||||
this.QURfrRt.Visible = false;
|
||||
this.QURfrRt.SelectedIndexChanged += new System.EventHandler(this.QURfrRt_SelectedIndexChanged);
|
||||
//
|
||||
// RefreshRateComboBox
|
||||
//
|
||||
this.RefreshRateComboBox.BackColor = global::AndroidSideloader.Properties.Settings.Default.ComboBoxColor;
|
||||
this.RefreshRateComboBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.RefreshRateComboBox.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.RefreshRateComboBox.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.RefreshRateComboBox.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "ComboBoxColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.RefreshRateComboBox.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.RefreshRateComboBox.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.RefreshRateComboBox.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
@@ -631,59 +266,141 @@ namespace AndroidSideloader
|
||||
"72",
|
||||
"90",
|
||||
"120"});
|
||||
this.RefreshRateComboBox.Location = new System.Drawing.Point(13, 65);
|
||||
this.RefreshRateComboBox.Location = new System.Drawing.Point(38, 325);
|
||||
this.RefreshRateComboBox.Name = "RefreshRateComboBox";
|
||||
this.RefreshRateComboBox.Size = new System.Drawing.Size(346, 26);
|
||||
this.RefreshRateComboBox.Size = new System.Drawing.Size(232, 26);
|
||||
this.RefreshRateComboBox.TabIndex = 0;
|
||||
this.RefreshRateComboBox.Text = "Select refresh rate";
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
|
||||
this.button1.Active2 = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
|
||||
this.button1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.button1.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F);
|
||||
this.button1.ForeColor = System.Drawing.Color.White;
|
||||
this.button1.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.button1.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.button1.Location = new System.Drawing.Point(185, 434);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Radius = 5;
|
||||
this.button1.Size = new System.Drawing.Size(85, 25);
|
||||
this.button1.Stroke = true;
|
||||
this.button1.StrokeColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(74)))), ((int)(((byte)(74)))));
|
||||
this.button1.TabIndex = 19;
|
||||
this.button1.Text = "APPLY";
|
||||
this.button1.Transparency = false;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// questVids
|
||||
//
|
||||
this.questVids.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
|
||||
this.questVids.Active2 = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
|
||||
this.questVids.BackColor = System.Drawing.Color.Transparent;
|
||||
this.questVids.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.questVids.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F);
|
||||
this.questVids.ForeColor = System.Drawing.Color.White;
|
||||
this.questVids.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.questVids.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.questVids.Location = new System.Drawing.Point(72, 178);
|
||||
this.questVids.Name = "questVids";
|
||||
this.questVids.Radius = 5;
|
||||
this.questVids.Size = new System.Drawing.Size(165, 25);
|
||||
this.questVids.Stroke = true;
|
||||
this.questVids.StrokeColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(74)))), ((int)(((byte)(74)))));
|
||||
this.questVids.TabIndex = 21;
|
||||
this.questVids.Text = "RECORDINGS";
|
||||
this.questVids.Transparency = false;
|
||||
this.questVids.Click += new System.EventHandler(this.questVids_Click);
|
||||
//
|
||||
// questPics
|
||||
//
|
||||
this.questPics.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
|
||||
this.questPics.Active2 = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
|
||||
this.questPics.BackColor = System.Drawing.Color.Transparent;
|
||||
this.questPics.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.questPics.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F);
|
||||
this.questPics.ForeColor = System.Drawing.Color.White;
|
||||
this.questPics.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.questPics.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.questPics.Location = new System.Drawing.Point(72, 124);
|
||||
this.questPics.Name = "questPics";
|
||||
this.questPics.Radius = 5;
|
||||
this.questPics.Size = new System.Drawing.Size(165, 25);
|
||||
this.questPics.Stroke = true;
|
||||
this.questPics.StrokeColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(74)))), ((int)(((byte)(74)))));
|
||||
this.questPics.TabIndex = 22;
|
||||
this.questPics.Text = "SCREENSHOTS";
|
||||
this.questPics.Transparency = false;
|
||||
this.questPics.Click += new System.EventHandler(this.questPics_Click);
|
||||
//
|
||||
// button3
|
||||
//
|
||||
this.button3.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
|
||||
this.button3.Active2 = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
|
||||
this.button3.BackColor = System.Drawing.Color.Transparent;
|
||||
this.button3.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.button3.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F);
|
||||
this.button3.ForeColor = System.Drawing.Color.White;
|
||||
this.button3.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.button3.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.button3.Location = new System.Drawing.Point(194, 38);
|
||||
this.button3.Name = "button3";
|
||||
this.button3.Radius = 5;
|
||||
this.button3.Size = new System.Drawing.Size(81, 25);
|
||||
this.button3.Stroke = true;
|
||||
this.button3.StrokeColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(74)))), ((int)(((byte)(74)))));
|
||||
this.button3.TabIndex = 27;
|
||||
this.button3.Text = "APPLY";
|
||||
this.button3.Transparency = false;
|
||||
this.button3.Click += new System.EventHandler(this.button3_Click);
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label3.ForeColor = System.Drawing.Color.LightSteelBlue;
|
||||
this.label3.Location = new System.Drawing.Point(37, 206);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(235, 16);
|
||||
this.label3.TabIndex = 28;
|
||||
this.label3.Text = "Exports to: Desktop\\Quest Recordings";
|
||||
this.label3.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// QuestForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
|
||||
this.ClientSize = new System.Drawing.Size(370, 737);
|
||||
this.Controls.Add(this.label15);
|
||||
this.BackgroundImage = global::AndroidSideloader.Properties.Resources.pattern_cubes_1_1_1_0_0_0_1__000000_212121;
|
||||
this.ClientSize = new System.Drawing.Size(309, 486);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.button3);
|
||||
this.Controls.Add(this.questPics);
|
||||
this.Controls.Add(this.questVids);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.label14);
|
||||
this.Controls.Add(this.label10);
|
||||
this.Controls.Add(this.splitter1);
|
||||
this.Controls.Add(this.questVids);
|
||||
this.Controls.Add(this.questPics);
|
||||
this.Controls.Add(this.button3);
|
||||
this.Controls.Add(this.deleteButton);
|
||||
this.Controls.Add(this.DeleteShots);
|
||||
this.Controls.Add(this.QUon);
|
||||
this.Controls.Add(this.ResetQU);
|
||||
this.Controls.Add(this.label13);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.label16);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label11);
|
||||
this.Controls.Add(this.label12);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.CPUComboBox);
|
||||
this.Controls.Add(this.GPUComboBox);
|
||||
this.Controls.Add(this.label7);
|
||||
this.Controls.Add(this.label8);
|
||||
this.Controls.Add(this.label9);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.ResolutionLabel);
|
||||
this.Controls.Add(this.GlobalUsername);
|
||||
this.Controls.Add(this.FOVy);
|
||||
this.Controls.Add(this.FOVx);
|
||||
this.Controls.Add(this.UsrBox);
|
||||
this.Controls.Add(this.ResBox);
|
||||
this.Controls.Add(this.TextureResTextBox);
|
||||
this.Controls.Add(this.QUEnable);
|
||||
this.Controls.Add(this.WifiWake);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.QURfrRt);
|
||||
this.Controls.Add(this.RefreshRateComboBox);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximumSize = new System.Drawing.Size(386, 776);
|
||||
this.MinimumSize = new System.Drawing.Size(386, 776);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximumSize = new System.Drawing.Size(325, 525);
|
||||
this.MinimumSize = new System.Drawing.Size(325, 525);
|
||||
this.Name = "QuestForm";
|
||||
this.ShowIcon = false;
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
@@ -693,49 +410,31 @@ namespace AndroidSideloader
|
||||
this.Load += new System.EventHandler(this.QuestForm_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
this.Activate();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.ComboBox RefreshRateComboBox;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.TextBox TextureResTextBox;
|
||||
private System.Windows.Forms.Label ResolutionLabel;
|
||||
private System.Windows.Forms.ComboBox GPUComboBox;
|
||||
private System.Windows.Forms.ComboBox CPUComboBox;
|
||||
private Label label1;
|
||||
private Label label2;
|
||||
private Label label3;
|
||||
private Label label4;
|
||||
private ComboBox QURfrRt;
|
||||
private TextBox ResBox;
|
||||
private TextBox UsrBox;
|
||||
private TextBox FOVx;
|
||||
private TextBox FOVy;
|
||||
private Button QUEnable;
|
||||
private Button ResetQU;
|
||||
private Label label5;
|
||||
private Label label6;
|
||||
private Label label7;
|
||||
private Label label8;
|
||||
private Label label9;
|
||||
private Button deleteButton;
|
||||
private Button questPics;
|
||||
private Button questVids;
|
||||
private Label label11;
|
||||
private CheckBox QUon;
|
||||
private Button button3;
|
||||
private Label label12;
|
||||
private Label label13;
|
||||
private CheckBox DeleteShots;
|
||||
private Splitter splitter1;
|
||||
private Label label10;
|
||||
private Label label14;
|
||||
private Label label15;
|
||||
private Label label16;
|
||||
private Button WifiWake;
|
||||
private TextBox GlobalUsername;
|
||||
private RoundButton button1;
|
||||
private RoundButton questVids;
|
||||
private RoundButton questPics;
|
||||
private RoundButton button3;
|
||||
private Label label3;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
283
QuestForm.cs
283
QuestForm.cs
@@ -1,8 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AndroidSideloader
|
||||
@@ -12,7 +9,6 @@ namespace AndroidSideloader
|
||||
public static int length = 0;
|
||||
public static string[] result;
|
||||
public bool settingsexist = false;
|
||||
public static bool QUSon = false;
|
||||
public bool delsh = false;
|
||||
public QuestForm()
|
||||
{
|
||||
@@ -27,112 +23,51 @@ namespace AndroidSideloader
|
||||
//Quest 2 settings, might remove them in the future since some of them are broken
|
||||
if (RefreshRateComboBox.SelectedIndex != -1)
|
||||
{
|
||||
ADB.WakeDevice();
|
||||
ADB.RunAdbCommandToString($"shell setprop debug.oculus.refreshRate {RefreshRateComboBox.SelectedItem.ToString()}");
|
||||
ADB.RunAdbCommandToString($"shell settings put global 90hz_global {RefreshRateComboBox.SelectedIndex}");
|
||||
ADB.RunAdbCommandToString($"shell settings put global 90hzglobal {RefreshRateComboBox.SelectedIndex}");
|
||||
_ = ADB.RunAdbCommandToString($"shell setprop debug.oculus.refreshRate {RefreshRateComboBox.SelectedItem}");
|
||||
_ = ADB.RunAdbCommandToString($"shell settings put global 90hz_global {RefreshRateComboBox.SelectedIndex}");
|
||||
_ = ADB.RunAdbCommandToString($"shell settings put global 90hzglobal {RefreshRateComboBox.SelectedIndex}");
|
||||
ChangesMade = true;
|
||||
}
|
||||
|
||||
if (TextureResTextBox.Text.Length > 0)
|
||||
{
|
||||
ADB.WakeDevice();
|
||||
int result;
|
||||
Int32.TryParse(TextureResTextBox.Text, out result);
|
||||
ADB.RunAdbCommandToString($"shell settings put global texture_size_Global {TextureResTextBox.Text}");
|
||||
ADB.RunAdbCommandToString($"shell setprop debug.oculus.textureWidth {TextureResTextBox.Text}");
|
||||
ADB.RunAdbCommandToString($"shell setprop debug.oculus.textureHeight {TextureResTextBox.Text}");
|
||||
_ = int.TryParse(TextureResTextBox.Text, out _);
|
||||
_ = ADB.RunAdbCommandToString($"shell settings put global texture_size_Global {TextureResTextBox.Text}");
|
||||
_ = ADB.RunAdbCommandToString($"shell setprop debug.oculus.textureWidth {TextureResTextBox.Text}");
|
||||
_ = ADB.RunAdbCommandToString($"shell setprop debug.oculus.textureHeight {TextureResTextBox.Text}");
|
||||
ChangesMade = true;
|
||||
}
|
||||
|
||||
if (CPUComboBox.SelectedIndex != -1)
|
||||
{
|
||||
ADB.RunAdbCommandToString($"shell setprop debug.oculus.cpuLevel {CPUComboBox.SelectedItem.ToString()}");
|
||||
_ = ADB.RunAdbCommandToString($"shell setprop debug.oculus.cpuLevel {CPUComboBox.SelectedItem}");
|
||||
ChangesMade = true;
|
||||
}
|
||||
|
||||
if (GPUComboBox.SelectedIndex != -1)
|
||||
{
|
||||
ADB.RunAdbCommandToString($"shell setprop debug.oculus.gpuLevel {GPUComboBox.SelectedItem.ToString()}");
|
||||
_ = ADB.RunAdbCommandToString($"shell setprop debug.oculus.gpuLevel {GPUComboBox.SelectedItem}");
|
||||
ChangesMade = true;
|
||||
}
|
||||
|
||||
if (ChangesMade)
|
||||
MessageBox.Show("Settings applied!");
|
||||
{
|
||||
_ = MessageBox.Show("Settings applied!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void setLength(Int32 value)
|
||||
public static void setLength(int value)
|
||||
{
|
||||
result = new string[value];
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void ResetQU_click(object sender, EventArgs e)
|
||||
{
|
||||
ResBox.Text = ("0");
|
||||
UsrBox.Text = ("Change Me");
|
||||
FOVx.Text = ("0");
|
||||
FOVy.Text = ("0");
|
||||
QURfrRt.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
private void DeleteShots_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (DeleteShots.Checked)
|
||||
delsh = true;
|
||||
else
|
||||
delsh = false;
|
||||
delsh = DeleteShots.Checked;
|
||||
}
|
||||
private void QUon_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (QUon.Checked)
|
||||
{
|
||||
ResBox.Visible = true;
|
||||
UsrBox.Visible = true;
|
||||
FOVx.Visible = true;
|
||||
FOVy.Visible = true;
|
||||
QURfrRt.Visible = true;
|
||||
ResetQU.Visible = true;
|
||||
QUEnable.Visible = true;
|
||||
label5.Visible = true;
|
||||
label6.Visible = true;
|
||||
label7.Visible = true;
|
||||
label8.Visible = true;
|
||||
label9.Visible = true;
|
||||
label10.Visible = true;
|
||||
deleteButton.Visible = true;
|
||||
ResBox.Text = Properties.Settings.Default.QUres;
|
||||
UsrBox.Text = Properties.Settings.Default.QUname;
|
||||
FOVy.Text = Properties.Settings.Default.QUy;
|
||||
FOVx.Text = Properties.Settings.Default.QUx;
|
||||
QURfrRt.SelectedValue = Properties.Settings.Default.QUhz;
|
||||
Properties.Settings.Default.QUturnedon = true;
|
||||
}
|
||||
else if (!QUon.Checked)
|
||||
{
|
||||
ResBox.Visible = false;
|
||||
UsrBox.Visible = false;
|
||||
FOVx.Visible = false;
|
||||
FOVy.Visible = false;
|
||||
QURfrRt.Visible = false;
|
||||
ResetQU.Visible = false;
|
||||
QUEnable.Visible = false;
|
||||
label5.Visible = false;
|
||||
label6.Visible = false;
|
||||
label7.Visible = false;
|
||||
label8.Visible = false;
|
||||
label9.Visible = false;
|
||||
label10.Visible = false;
|
||||
deleteButton.Visible = false;
|
||||
Properties.Settings.Default.QUturnedon = false;
|
||||
MessageBox.Show("Ok, Deleted your custom settings file.\nIf you would like to re-enable return here and apply settings again");
|
||||
File.Delete($"{Environment.CurrentDirectory}\\Config.Json");
|
||||
File.Delete($"{Environment.CurrentDirectory}\\delete_settings");
|
||||
}
|
||||
|
||||
}
|
||||
private static readonly Random random = new Random();
|
||||
private static readonly object syncLock = new object();
|
||||
public static int RandomNumber(int min, int max)
|
||||
@@ -142,60 +77,12 @@ namespace AndroidSideloader
|
||||
return random.Next(min, max);
|
||||
}
|
||||
}
|
||||
private void QUEnable_Click(object sender, EventArgs e)
|
||||
|
||||
|
||||
|
||||
|
||||
private void QuestForm_FormClosed(object sender, FormClosedEventArgs e)
|
||||
{
|
||||
|
||||
settingsexist = true;
|
||||
MessageBox.Show("OK, any -QU packages installed will have these settings applied!\nTo delete settings: goto main app window, select a game with top menu, and click \"Remove QU Setting\"");
|
||||
if (QUon.Checked)
|
||||
{
|
||||
Properties.Settings.Default.QUturnedon = true;
|
||||
Random r = new Random();
|
||||
|
||||
int x = r.Next(999999999);
|
||||
int y = r.Next(9999999);
|
||||
|
||||
var sum = ((long)y * (long)1000000000) + (long)x;
|
||||
|
||||
int x2 = r.Next(999999999);
|
||||
int y2 = r.Next(9999999);
|
||||
|
||||
var sum2 = ((long)y2 * (long)1000000000) + (long)x2;
|
||||
|
||||
QUSon = true;
|
||||
|
||||
string selected = this.QURfrRt.GetItemText(this.QURfrRt.SelectedItem);
|
||||
|
||||
Properties.Settings.Default.QUString = $"\"refresh_rate\":{selected},\"eye_texture_width\":{ResBox.Text},\"fov_x\":{FOVx.Text},\"fov_y\":{FOVy.Text},\"username\":\"{UsrBox.Text}\"}}";
|
||||
Properties.Settings.Default.QUStringF = $"{{\"user_id\":{sum},\"app_id\":\"{sum2}\",";
|
||||
Properties.Settings.Default.Save();
|
||||
File.WriteAllText($"{Properties.Settings.Default.MainDir}\\delete_settings", "");
|
||||
string boff = Properties.Settings.Default.QUStringF + Properties.Settings.Default.QUString;
|
||||
File.WriteAllText($"{Properties.Settings.Default.MainDir}\\config.json", boff);
|
||||
}
|
||||
else
|
||||
{
|
||||
Properties.Settings.Default.QUturnedon = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void QuestForm_FormClosed(object sender, FormClosedEventArgs e)
|
||||
{
|
||||
if (QUon.Checked)
|
||||
{
|
||||
Properties.Settings.Default.QUsett = true;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
if (!QUon.Checked)
|
||||
{
|
||||
Properties.Settings.Default.QUsett = false;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
if (DeleteShots.Checked)
|
||||
{
|
||||
Properties.Settings.Default.delsh = true;
|
||||
@@ -209,60 +96,14 @@ namespace AndroidSideloader
|
||||
}
|
||||
private void QuestForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (Properties.Settings.Default.delsh)
|
||||
DeleteShots.Checked = true;
|
||||
else
|
||||
DeleteShots.Checked = false;
|
||||
if (Properties.Settings.Default.QUsett)
|
||||
{
|
||||
ResBox.Text = Properties.Settings.Default.QUres;
|
||||
UsrBox.Text = Properties.Settings.Default.QUname;
|
||||
FOVy.Text = Properties.Settings.Default.QUy;
|
||||
FOVx.Text = Properties.Settings.Default.QUx;
|
||||
QURfrRt.Text = Properties.Settings.Default.QUhz;
|
||||
QUon.Checked = true;
|
||||
if (settingsexist)
|
||||
QUSon = true;
|
||||
}
|
||||
DeleteShots.Checked = Properties.Settings.Default.delsh;
|
||||
GlobalUsername.Text = Properties.Settings.Default.GlobalUsername;
|
||||
}
|
||||
|
||||
private void ResBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
Properties.Settings.Default.QUres = ResBox.Text;
|
||||
Properties.Settings.Default.Save();
|
||||
|
||||
}
|
||||
|
||||
private void UsrBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
Properties.Settings.Default.QUname = UsrBox.Text;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
|
||||
private void FOVx_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
Properties.Settings.Default.QUx = FOVx.Text;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
|
||||
private void FOVy_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
Properties.Settings.Default.QUy = FOVy.Text;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
|
||||
private void QURfrRt_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
string selected = this.QURfrRt.GetItemText(this.QURfrRt.SelectedItem);
|
||||
Properties.Settings.Default.QUhz = selected;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
private void DeleteButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
MessageBox.Show("Ok, Deleted your custom settings file.\nIf you would like to re-enable return here and apply settings again");
|
||||
_ = MessageBox.Show("Ok, Deleted your custom settings file.\nIf you would like to re-enable return here and apply settings again");
|
||||
File.Delete($"{Properties.Settings.Default.MainDir}\\Config.Json");
|
||||
}
|
||||
private void questPics_Click(object sender, EventArgs e)
|
||||
@@ -270,54 +111,58 @@ namespace AndroidSideloader
|
||||
string path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
|
||||
|
||||
if (!Directory.Exists($"{path}\\Quest ScreenShots"))
|
||||
Directory.CreateDirectory($"{path}\\Quest ScreenShots");
|
||||
MessageBox.Show("Please wait until you get the message that the transfer has finished.");
|
||||
ADB.WakeDevice();
|
||||
Program.form.ChangeTitle("Pulling files...");
|
||||
ADB.RunAdbCommandToString($"pull \"/sdcard/Oculus/Screenshots\" \"{path}\\Quest ScreenShots\"");
|
||||
if (delsh)
|
||||
{
|
||||
DialogResult dialogResult = MessageBox.Show("You have chosen to delete files from headset after transferring, so be sure to move them from your desktop to somewhere safe!", "Warning!", MessageBoxButtons.OKCancel);
|
||||
if (dialogResult == DialogResult.OK)
|
||||
{
|
||||
ADB.RunAdbCommandToString("shell rm -r /sdcard/Oculus/Screenshots");
|
||||
ADB.RunAdbCommandToString("shell mkdir /sdcard/Oculus/Screenshots");
|
||||
}
|
||||
_ = Directory.CreateDirectory($"{path}\\Quest ScreenShots");
|
||||
}
|
||||
MessageBox.Show("Transfer finished! ScreenShots can be found in a folder named Quest Screenshots on your desktop!");
|
||||
Program.form.ChangeTitle("Done!");
|
||||
}
|
||||
private void questVids_Click(object sender, EventArgs e)
|
||||
{
|
||||
string path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
|
||||
if (!Directory.Exists($"{path}\\Quest VideoShots"))
|
||||
Directory.CreateDirectory($"{path}\\Quest VideoShots");
|
||||
MessageBox.Show("Please wait until you get the message that the transfer has finished.");
|
||||
ADB.WakeDevice();
|
||||
Program.form.ChangeTitle("Pulling files...");
|
||||
ADB.RunAdbCommandToString($"pull \"/sdcard/Oculus/Videoshots\" \"{path}\\Quest VideoShots\"");
|
||||
|
||||
_ = MessageBox.Show("Please wait until you get the message that the transfer has finished.");
|
||||
Program.form.changeTitle("Pulling files...");
|
||||
_ = ADB.RunAdbCommandToString($"pull \"/sdcard/Oculus/Screenshots\" \"{path}\\Quest ScreenShots\"");
|
||||
if (delsh)
|
||||
{
|
||||
DialogResult dialogResult = MessageBox.Show("You have chosen to delete files from headset after transferring, so be sure to move them from your desktop to somewhere safe!", "Warning!", MessageBoxButtons.OKCancel);
|
||||
if (dialogResult == DialogResult.OK)
|
||||
{
|
||||
ADB.RunAdbCommandToString("shell rm -r /sdcard/Oculus/Videoshots");
|
||||
ADB.RunAdbCommandToString("shell mkdir /sdcard/Oculus/Videoshots");
|
||||
_ = ADB.RunAdbCommandToString("shell rm -r /sdcard/Oculus/Screenshots");
|
||||
_ = ADB.RunAdbCommandToString("shell mkdir /sdcard/Oculus/Screenshots");
|
||||
}
|
||||
}
|
||||
MessageBox.Show("Transfer finished! VideoShots can be found in a folder named Quest VideoShots on your desktop!");
|
||||
Program.form.ChangeTitle("Done!");
|
||||
_ = MessageBox.Show("Transfer finished! ScreenShots can be found in a folder named Quest Screenshots on your desktop!");
|
||||
Program.form.changeTitle("Done!");
|
||||
}
|
||||
private void questVids_Click(object sender, EventArgs e)
|
||||
{
|
||||
string path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
|
||||
if (!Directory.Exists($"{path}\\Quest Recordings"))
|
||||
{
|
||||
_ = Directory.CreateDirectory($"{path}\\Quest Recordings");
|
||||
}
|
||||
|
||||
_ = MessageBox.Show("Please wait until you get the message that the transfer has finished.");
|
||||
Program.form.changeTitle("Pulling files...");
|
||||
_ = ADB.RunAdbCommandToString($"pull \"/sdcard/Oculus/Videoshots\" \"{path}\\Quest Recordings\"");
|
||||
if (delsh)
|
||||
{
|
||||
DialogResult dialogResult = MessageBox.Show("You have chosen to delete files from headset after transferring, so be sure to move them from your desktop to somewhere safe!", "Warning!", MessageBoxButtons.OKCancel);
|
||||
if (dialogResult == DialogResult.OK)
|
||||
{
|
||||
_ = ADB.RunAdbCommandToString("shell rm -r /sdcard/Oculus/Videoshots");
|
||||
_ = ADB.RunAdbCommandToString("shell mkdir /sdcard/Oculus/Videoshots");
|
||||
}
|
||||
}
|
||||
_ = MessageBox.Show("Transfer finished! Recordings can be found in a folder named Quest Recordings on your desktop!");
|
||||
Program.form.changeTitle("Done!");
|
||||
}
|
||||
private void button3_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (GlobalUsername.Text.Contains(" "))
|
||||
{
|
||||
MessageBox.Show("Usernames with a space are not permitted.", "Detected a space in username!");
|
||||
_ = MessageBox.Show("Usernames with a space are not permitted.", "Detected a space in username!");
|
||||
}
|
||||
else
|
||||
{
|
||||
ADB.RunAdbCommandToString($"shell settings put global username {GlobalUsername.Text}");
|
||||
MessageBox.Show($"Username set as {GlobalUsername.Text}", "Success");
|
||||
_ = ADB.RunAdbCommandToString($"shell settings put global username {GlobalUsername.Text}");
|
||||
_ = MessageBox.Show($"Username set as {GlobalUsername.Text}", "Success");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -326,32 +171,22 @@ namespace AndroidSideloader
|
||||
{
|
||||
if (e.KeyCode == Keys.Escape)
|
||||
{
|
||||
this.Close();
|
||||
Close();
|
||||
}
|
||||
}
|
||||
protected override bool ProcessDialogKey(Keys keyData)
|
||||
{
|
||||
if (Form.ModifierKeys == Keys.None && keyData == Keys.Escape)
|
||||
{
|
||||
this.Close();
|
||||
Close();
|
||||
return true;
|
||||
}
|
||||
return base.ProcessDialogKey(keyData);
|
||||
}
|
||||
|
||||
private void WifiWake_Click(object sender, EventArgs e)
|
||||
{
|
||||
ADB.RunAdbCommandToString("shell settings put global wifi_wakeup_available 1");
|
||||
ADB.RunAdbCommandToString("shell settings put global wifi_wakeup_enabled 1");
|
||||
MessageBox.Show("Wake on Wifi enabled!\n\nNOTE: This requires having wireless ADB enabled to work. (Obviously)");
|
||||
}
|
||||
|
||||
private void GlobalUsername_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (GlobalUsername.TextLength > 0)
|
||||
button3.Enabled = true;
|
||||
else
|
||||
button3.Enabled = false;
|
||||
button3.Enabled = GlobalUsername.TextLength > 0;
|
||||
Properties.Settings.Default.GlobalUsername = GlobalUsername.Text;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
|
||||
6849
QuestForm.resx
6849
QuestForm.resx
File diff suppressed because it is too large
Load Diff
238
RCLONE.cs
238
RCLONE.cs
@@ -1,22 +1,44 @@
|
||||
using System;
|
||||
using JR.Utils.GUI.Forms;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Management;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using JR.Utils.GUI.Forms;
|
||||
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
class RCLONE
|
||||
internal class RCLONE
|
||||
{
|
||||
//Kill all rclone, using a static rclone variable doesn't work for some reason #tofix
|
||||
// Kill RCLONE Processes that were started from Rookie by looking for child processes.
|
||||
public static void killRclone()
|
||||
{
|
||||
foreach (var process in Process.GetProcessesByName("rclone"))
|
||||
process.Kill();
|
||||
var parentProcessId = Process.GetCurrentProcess().Id;
|
||||
var processes = Process.GetProcessesByName("rclone");
|
||||
|
||||
foreach (var process in processes)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (ManagementObject obj = new ManagementObject($"win32_process.handle='{process.Id}'"))
|
||||
{
|
||||
obj.Get();
|
||||
var ppid = Convert.ToInt32(obj["ParentProcessId"]);
|
||||
|
||||
if (ppid == parentProcessId)
|
||||
{
|
||||
process.Kill();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_ = Logger.Log($"Exception occured while attempting to shut down RCLONE with exception message: {ex.Message}", LogLevel.ERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//For custom configs that use a password
|
||||
// For custom configs that use a password
|
||||
public static void Init()
|
||||
{
|
||||
string PwTxtPath = Path.Combine(Environment.CurrentDirectory, "rclone\\pw.txt");
|
||||
@@ -26,61 +48,66 @@ namespace AndroidSideloader
|
||||
}
|
||||
}
|
||||
|
||||
//Change if you want to use a config
|
||||
// Change if you want to use a config
|
||||
public static string downloadConfigPath = "vrp.download.config";
|
||||
public static string uploadConfigPath = "vrp.upload.config";
|
||||
public static string rclonepw = "";
|
||||
|
||||
|
||||
private static Process rclone = new Process();
|
||||
|
||||
//Run rclone command
|
||||
public static ProcessOutput runRcloneCommand_DownloadConfig(string command, string bandwithLimit = "")
|
||||
private static readonly Process rclone = new Process();
|
||||
|
||||
// Run an RCLONE Command that accesses the Download Config.
|
||||
public static ProcessOutput runRcloneCommand_DownloadConfig(string command)
|
||||
{
|
||||
if (!MainForm.HasInternet || MainForm.isOffline)
|
||||
if (MainForm.isOffline)
|
||||
{
|
||||
return new ProcessOutput("", "No internet");
|
||||
}
|
||||
|
||||
ProcessOutput prcoutput = new ProcessOutput();
|
||||
//Rclone output is unicode, else it will show garbage instead of unicode characters
|
||||
// Rclone output is unicode, else it will show garbage instead of unicode characters
|
||||
rclone.StartInfo.StandardOutputEncoding = Encoding.UTF8;
|
||||
string originalCommand = command;
|
||||
|
||||
//set bandwidth limit
|
||||
if (bandwithLimit.Length > 0)
|
||||
{
|
||||
command += $" --bwlimit={bandwithLimit}";
|
||||
}
|
||||
|
||||
//set configpath if there is any
|
||||
// set configpath if there is any
|
||||
if (downloadConfigPath.Length > 0)
|
||||
{
|
||||
command += $" --config {downloadConfigPath}";
|
||||
}
|
||||
|
||||
//set rclonepw
|
||||
// set rclonepw
|
||||
if (rclonepw.Length > 0)
|
||||
{
|
||||
command += " --ask-password=false";
|
||||
}
|
||||
|
||||
string logcmd = Utilities.StringUtilities.RemoveEverythingBeforeFirst(command, "rclone.exe");
|
||||
if (logcmd.Contains($"\"{Properties.Settings.Default.CurrentLogPath}\""))
|
||||
{
|
||||
logcmd = logcmd.Replace($"\"{Properties.Settings.Default.CurrentLogPath}\"", $"\"{Properties.Settings.Default.CurrentLogName}\"");
|
||||
if (logcmd.Contains(Environment.CurrentDirectory))
|
||||
logcmd = logcmd.Replace($"{Environment.CurrentDirectory}", $"CurrentDirectory");
|
||||
Logger.Log($"Running Rclone command: {logcmd}");
|
||||
}
|
||||
|
||||
rclone.StartInfo.FileName = Environment.CurrentDirectory + "\\rclone\\rclone.exe";
|
||||
if (logcmd.Contains(Environment.CurrentDirectory))
|
||||
{
|
||||
logcmd = logcmd.Replace($"{Environment.CurrentDirectory}", $"CurrentDirectory");
|
||||
}
|
||||
|
||||
_ = Logger.Log($"Running Rclone command: {logcmd}");
|
||||
|
||||
rclone.StartInfo.FileName = Path.Combine(Environment.CurrentDirectory, "rclone", "rclone.exe");
|
||||
rclone.StartInfo.Arguments = command;
|
||||
rclone.StartInfo.RedirectStandardInput = true;
|
||||
rclone.StartInfo.RedirectStandardError = true;
|
||||
rclone.StartInfo.RedirectStandardOutput = true;
|
||||
rclone.StartInfo.WorkingDirectory = Environment.CurrentDirectory + "\\rclone";
|
||||
rclone.StartInfo.WorkingDirectory = Path.Combine(Environment.CurrentDirectory, "rclone");
|
||||
rclone.StartInfo.CreateNoWindow = true;
|
||||
//On debug we want to see when rclone is open
|
||||
if (MainForm.debugMode == true)
|
||||
// Display RCLONE Window if the binary is being run in Debug Mode.
|
||||
if (MainForm.debugMode)
|
||||
{
|
||||
rclone.StartInfo.CreateNoWindow = false;
|
||||
}
|
||||
rclone.StartInfo.UseShellExecute = false;
|
||||
rclone.Start();
|
||||
_ = rclone.Start();
|
||||
rclone.StandardInput.WriteLine(command);
|
||||
rclone.StandardInput.Flush();
|
||||
rclone.StandardInput.Close();
|
||||
@@ -89,20 +116,32 @@ namespace AndroidSideloader
|
||||
string error = rclone.StandardError.ReadToEnd();
|
||||
rclone.WaitForExit();
|
||||
|
||||
//if there is one of these errors, we switch the mirrors
|
||||
if (error.Contains("There is not enough space"))
|
||||
{
|
||||
Program.form.Invoke(() =>
|
||||
{
|
||||
_ = FlexibleMessageBox.Show(Program.form, $"There isn't enough disk space to download this game.\r\nPlease ensure you have at least 200MB more the game size available in {Properties.Settings.Default.downloadDir} and try again.",
|
||||
"NOT ENOUGH SPACE",
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Error);
|
||||
});
|
||||
return new ProcessOutput("Download failed.", "");
|
||||
}
|
||||
|
||||
// Switch mirror upon matching error output.
|
||||
if (error.Contains("400 Bad Request") || error.Contains("cannot fetch token") || error.Contains("authError") || error.Contains("quota") || error.Contains("exceeded") || error.Contains("directory not found") || error.Contains("Failed to"))
|
||||
{
|
||||
string oldRemote = MainForm.currentRemote;
|
||||
try
|
||||
{
|
||||
Program.form.SwitchMirrors();
|
||||
|
||||
|
||||
}
|
||||
catch
|
||||
{
|
||||
return new ProcessOutput("All mirrors are on quota or down...", "All mirrors are on quota or down...");
|
||||
}
|
||||
prcoutput = runRcloneCommand_DownloadConfig(originalCommand.Replace(oldRemote, MainForm.currentRemote), bandwithLimit);
|
||||
prcoutput = runRcloneCommand_DownloadConfig(originalCommand.Replace(oldRemote, MainForm.currentRemote));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -114,41 +153,24 @@ namespace AndroidSideloader
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(error))
|
||||
{
|
||||
Logger.Log($"Rclone error: {error}\n");
|
||||
_ = Logger.Log($"Rclone error: {error}\n", LogLevel.ERROR);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(output))
|
||||
{
|
||||
Logger.Log($"Rclone Output: {output}");
|
||||
_ = Logger.Log($"Rclone Output: {output}");
|
||||
}
|
||||
}
|
||||
|
||||
if (output.Contains("There is not enough space"))
|
||||
{
|
||||
FlexibleMessageBox.Show("There isn't enough space on your PC to properly install this game. Please have at least 2x the size of the game you are trying to download/install available on the drive where Rookie is installed.", "NOT ENOUGH SPACE");
|
||||
}
|
||||
return prcoutput;
|
||||
}
|
||||
|
||||
public static ProcessOutput runRcloneCommand_UploadConfig(string command, string bandwithLimit = "")
|
||||
public static ProcessOutput runRcloneCommand_UploadConfig(string command)
|
||||
{
|
||||
if (!MainForm.HasInternet || MainForm.isOffline)
|
||||
{
|
||||
return new ProcessOutput("", "No internet");
|
||||
}
|
||||
|
||||
ProcessOutput prcoutput = new ProcessOutput();
|
||||
//Rclone output is unicode, else it will show garbage instead of unicode characters
|
||||
// Rclone output is unicode, else it will show garbage instead of unicode characters
|
||||
rclone.StartInfo.StandardOutputEncoding = Encoding.UTF8;
|
||||
string originalCommand = command;
|
||||
|
||||
//set bandwidth limit
|
||||
if (bandwithLimit.Length > 0)
|
||||
{
|
||||
command += $" --bwlimit={bandwithLimit}";
|
||||
}
|
||||
|
||||
//set configpath if there is any
|
||||
// set configpath if there is any
|
||||
if (uploadConfigPath.Length > 0)
|
||||
{
|
||||
command += $" --config {uploadConfigPath}";
|
||||
@@ -156,25 +178,33 @@ namespace AndroidSideloader
|
||||
|
||||
string logcmd = Utilities.StringUtilities.RemoveEverythingBeforeFirst(command, "rclone.exe");
|
||||
if (logcmd.Contains($"\"{Properties.Settings.Default.CurrentLogPath}\""))
|
||||
{
|
||||
logcmd = logcmd.Replace($"\"{Properties.Settings.Default.CurrentLogPath}\"", $"\"{Properties.Settings.Default.CurrentLogName}\"");
|
||||
}
|
||||
|
||||
if (logcmd.Contains(Environment.CurrentDirectory))
|
||||
{
|
||||
logcmd = logcmd.Replace($"{Environment.CurrentDirectory}", $"CurrentDirectory");
|
||||
Logger.Log($"Running Rclone command: {logcmd}");
|
||||
}
|
||||
|
||||
_ = Logger.Log($"Running Rclone command: {logcmd}");
|
||||
|
||||
command += " --checkers 0 --no-check-dest --retries 1";
|
||||
|
||||
rclone.StartInfo.FileName = Environment.CurrentDirectory + "\\rclone\\rclone.exe";
|
||||
rclone.StartInfo.FileName = Path.Combine(Environment.CurrentDirectory, "rclone", "rclone.exe");
|
||||
rclone.StartInfo.Arguments = command;
|
||||
rclone.StartInfo.RedirectStandardInput = true;
|
||||
rclone.StartInfo.RedirectStandardError = true;
|
||||
rclone.StartInfo.RedirectStandardOutput = true;
|
||||
rclone.StartInfo.WorkingDirectory = Environment.CurrentDirectory + "\\rclone";
|
||||
rclone.StartInfo.WorkingDirectory = Path.Combine(Environment.CurrentDirectory, "rclone");
|
||||
rclone.StartInfo.CreateNoWindow = true;
|
||||
//On debug we want to see when rclone is open
|
||||
if (MainForm.debugMode == true)
|
||||
// Display RCLONE Window if the binary is being run in Debug Mode.
|
||||
if (MainForm.debugMode)
|
||||
{
|
||||
rclone.StartInfo.CreateNoWindow = false;
|
||||
}
|
||||
rclone.StartInfo.UseShellExecute = false;
|
||||
rclone.Start();
|
||||
_ = rclone.Start();
|
||||
rclone.StandardInput.WriteLine(command);
|
||||
rclone.StandardInput.Flush();
|
||||
rclone.StandardInput.Close();
|
||||
@@ -183,10 +213,10 @@ namespace AndroidSideloader
|
||||
string error = rclone.StandardError.ReadToEnd();
|
||||
rclone.WaitForExit();
|
||||
|
||||
//if there is one of these errors, we switch the mirrors
|
||||
// if there is one of these errors, we switch the mirrors
|
||||
if (error.Contains("400 Bad Request") || error.Contains("cannot fetch token") || error.Contains("authError") || error.Contains("quota") || error.Contains("exceeded") || error.Contains("directory not found") || error.Contains("Failed to"))
|
||||
{
|
||||
Logger.Log(error);
|
||||
_ = Logger.Log(error, LogLevel.ERROR);
|
||||
return new ProcessOutput("Upload Failed.", "Upload failed.");
|
||||
}
|
||||
else
|
||||
@@ -199,64 +229,58 @@ namespace AndroidSideloader
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(error))
|
||||
{
|
||||
Logger.Log($"Rclone error: {error}\n");
|
||||
_ = Logger.Log($"Rclone error: {error}\n", LogLevel.ERROR);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(output))
|
||||
{
|
||||
Logger.Log($"Rclone Output: {output}");
|
||||
_ = Logger.Log($"Rclone Output: {output}");
|
||||
}
|
||||
}
|
||||
|
||||
if (output.Contains("There is not enough space"))
|
||||
{
|
||||
FlexibleMessageBox.Show("There isn't enough space on your PC to properly install this game. Please have at least 2x the size of the game you are trying to download/install available on the drive where Rookie is installed.", "NOT ENOUGH SPACE");
|
||||
}
|
||||
return prcoutput;
|
||||
}
|
||||
|
||||
public static ProcessOutput runRcloneCommand_PublicConfig(string command, string bandwithLimit = "")
|
||||
public static ProcessOutput runRcloneCommand_PublicConfig(string command)
|
||||
{
|
||||
if (!MainForm.HasInternet || MainForm.isOffline)
|
||||
if (MainForm.isOffline)
|
||||
{
|
||||
return new ProcessOutput("", "No internet");
|
||||
}
|
||||
|
||||
ProcessOutput prcoutput = new ProcessOutput();
|
||||
//Rclone output is unicode, else it will show garbage instead of unicode characters
|
||||
// Rclone output is unicode, else it will show garbage instead of unicode characters
|
||||
rclone.StartInfo.StandardOutputEncoding = Encoding.UTF8;
|
||||
string originalCommand = command;
|
||||
|
||||
//set bandwidth limit
|
||||
if (bandwithLimit.Length > 0)
|
||||
{
|
||||
command += $" --bwlimit={bandwithLimit}";
|
||||
}
|
||||
|
||||
string logcmd = Utilities.StringUtilities.RemoveEverythingBeforeFirst(command, "rclone.exe");
|
||||
if (logcmd.Contains($"\"{Properties.Settings.Default.CurrentLogPath}\""))
|
||||
{
|
||||
logcmd = logcmd.Replace($"\"{Properties.Settings.Default.CurrentLogPath}\"", $"\"{Properties.Settings.Default.CurrentLogName}\"");
|
||||
}
|
||||
|
||||
if (logcmd.Contains(Environment.CurrentDirectory))
|
||||
{
|
||||
logcmd = logcmd.Replace($"{Environment.CurrentDirectory}", $"CurrentDirectory");
|
||||
Logger.Log($"Running Rclone command: {logcmd}");
|
||||
}
|
||||
|
||||
_ = Logger.Log($"Running Rclone command: {logcmd}");
|
||||
|
||||
//set http source & args
|
||||
command += $" --http-url {MainForm.PublicConfigFile.BaseUri} {MainForm.PublicMirrorExtraArgs}";
|
||||
|
||||
rclone.StartInfo.FileName = Environment.CurrentDirectory + "\\rclone\\rclone.exe";
|
||||
rclone.StartInfo.FileName = Path.Combine(Environment.CurrentDirectory, "rclone", "rclone.exe");
|
||||
rclone.StartInfo.Arguments = command;
|
||||
rclone.StartInfo.RedirectStandardInput = true;
|
||||
rclone.StartInfo.RedirectStandardError = true;
|
||||
rclone.StartInfo.RedirectStandardOutput = true;
|
||||
rclone.StartInfo.WorkingDirectory = Environment.CurrentDirectory + "\\rclone";
|
||||
rclone.StartInfo.WorkingDirectory = Path.Combine(Environment.CurrentDirectory, "rclone");
|
||||
rclone.StartInfo.CreateNoWindow = true;
|
||||
|
||||
//On debug we want to see when rclone is open
|
||||
if (MainForm.debugMode == true)
|
||||
// Display RCLONE Window if the binary is being run in Debug Mode.
|
||||
if (MainForm.debugMode)
|
||||
{
|
||||
rclone.StartInfo.CreateNoWindow = false;
|
||||
|
||||
}
|
||||
rclone.StartInfo.UseShellExecute = false;
|
||||
rclone.Start();
|
||||
_ = rclone.Start();
|
||||
rclone.StandardInput.WriteLine(command);
|
||||
rclone.StandardInput.Flush();
|
||||
rclone.StandardInput.Close();
|
||||
@@ -265,10 +289,32 @@ namespace AndroidSideloader
|
||||
string error = rclone.StandardError.ReadToEnd();
|
||||
rclone.WaitForExit();
|
||||
|
||||
//if there is one of these errors, we switch the mirrors
|
||||
if (error.Contains("400 Bad Request") || error.Contains("cannot fetch token") || error.Contains("authError") || error.Contains("quota") || error.Contains("exceeded") || error.Contains("directory not found") || error.Contains("Failed to"))
|
||||
if (error.Contains("There is not enough space"))
|
||||
{
|
||||
Logger.Log(error);
|
||||
Program.form.Invoke(() =>
|
||||
{
|
||||
_ = FlexibleMessageBox.Show(Program.form, $"There isn't enough disk space to download this game.\r\nPlease ensure you have at least 2x the game size available in {Properties.Settings.Default.downloadDir} and try again.",
|
||||
"NOT ENOUGH SPACE",
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Error);
|
||||
});
|
||||
return new ProcessOutput("Download failed.", string.Empty);
|
||||
}
|
||||
|
||||
if (error.Contains("Only one usage of each socket address (protocol/network address/port) is normally permitted"))
|
||||
{
|
||||
_ = Logger.Log(error, LogLevel.ERROR);
|
||||
return new ProcessOutput("Failed to fetch from public mirror.", "Failed to fetch from public mirror.\nYou may have a running RCLONE Task!\nCheck your Task Manager, Sort by Network Usage, and kill the process Rsync for Cloud Storage/Rclone");
|
||||
}
|
||||
else if (error.Contains("400 Bad Request")
|
||||
|| error.Contains("cannot fetch token")
|
||||
|| error.Contains("authError")
|
||||
|| error.Contains("quota")
|
||||
|| error.Contains("exceeded")
|
||||
|| error.Contains("directory not found")
|
||||
|| error.Contains("Failed to"))
|
||||
{
|
||||
_ = Logger.Log(error, LogLevel.ERROR);
|
||||
return new ProcessOutput("Failed to fetch from public mirror.", "Failed to fetch from public mirror.");
|
||||
}
|
||||
else
|
||||
@@ -281,19 +327,15 @@ namespace AndroidSideloader
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(error))
|
||||
{
|
||||
Logger.Log($"Rclone error: {error}\n");
|
||||
_ = Logger.Log($"Rclone error: {error}\n", LogLevel.ERROR);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(output))
|
||||
{
|
||||
Logger.Log($"Rclone Output: {output}");
|
||||
_ = Logger.Log($"Rclone Output: {output}");
|
||||
}
|
||||
}
|
||||
|
||||
if (output.Contains("There is not enough space"))
|
||||
{
|
||||
FlexibleMessageBox.Show("There isn't enough space on your PC to properly install this game. Please have at least 2x the size of the game you are trying to download/install available on the drive where Rookie is installed.", "NOT ENOUGH SPACE");
|
||||
}
|
||||
return prcoutput;
|
||||
}
|
||||
}
|
||||
|
||||
14
README.md
14
README.md
@@ -1,8 +1,8 @@
|
||||
# androidsideloader
|
||||

|
||||

|
||||
[](https://github.com/nerdunit/androidsideloader/releases)
|
||||

|
||||

|
||||

|
||||
[](https://github.com/VRPirates/rookie/releases)
|
||||

|
||||
|
||||
androidsideloader uses the GPL license, any forks of it must have their source code made public on the internet.
|
||||
|
||||
@@ -10,6 +10,6 @@ androidsideloader uses the GPL license, any forks of it must have their source c
|
||||
|
||||
This app may be buggy and have problems.
|
||||
|
||||
### This app might get detected as malware, however both the sideloader and the sideloader launcher are open source. And obviously, it isn't.
|
||||
See:
|
||||
https://www.virustotal.com/gui/file/977105693610cf360fc29339b918e224180ba393ba05a64b6255af3845cbf376/relations
|
||||
### This app might get detected as malware, however both the sideloader and the sideloader launcher are open source.
|
||||
Rookie 1.25.1 VirusTotal Scan (1/72)-
|
||||
https://www.virustotal.com/gui/file/dc3ed59057d508646a06a978c44ae72d473fd678129483ab186202046cbc713f
|
||||
|
||||
BIN
Resources/Pattern.png
Normal file
BIN
Resources/Pattern.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
BIN
Resources/pattern_cubes-1_1_1_0-0_0_1__000000_212121.png
Normal file
BIN
Resources/pattern_cubes-1_1_1_0-0_0_1__000000_212121.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 96 KiB |
BIN
Resources/pattern_herringbone-2_1_3_0-0_90_1__000000_1c1c1c.png
Normal file
BIN
Resources/pattern_herringbone-2_1_3_0-0_90_1__000000_1c1c1c.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 476 B |
BIN
Resources/splashimage.png
Normal file
BIN
Resources/splashimage.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
295
RoundButton.cs
Normal file
295
RoundButton.cs
Normal file
@@ -0,0 +1,295 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
[Description("Rounded Button")]
|
||||
public class RoundButton : Control, IButtonControl
|
||||
{
|
||||
#region Variables
|
||||
private int radius;
|
||||
private MouseState state;
|
||||
private RoundedRectangleF roundedRect;
|
||||
private Color inactive1, inactive2, active1, active2;
|
||||
private Color strokeColor;
|
||||
private bool stroke;
|
||||
|
||||
public bool Stroke
|
||||
{
|
||||
get => stroke;
|
||||
set
|
||||
{
|
||||
stroke = value;
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
public Color StrokeColor
|
||||
{
|
||||
get => strokeColor;
|
||||
set
|
||||
{
|
||||
strokeColor = value;
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region RoundButton
|
||||
public RoundButton()
|
||||
{
|
||||
Width = 65;
|
||||
Height = 30;
|
||||
stroke = false;
|
||||
strokeColor = Color.Gray;
|
||||
inactive1 = Color.FromArgb(44, 188, 210);
|
||||
inactive2 = Color.FromArgb(33, 167, 188);
|
||||
active1 = Color.FromArgb(64, 168, 183);
|
||||
active2 = Color.FromArgb(36, 164, 183);
|
||||
|
||||
|
||||
radius = 10;
|
||||
roundedRect = new RoundedRectangleF(Width, Height, radius);
|
||||
|
||||
SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer |
|
||||
ControlStyles.ResizeRedraw | ControlStyles.SupportsTransparentBackColor |
|
||||
ControlStyles.UserPaint, true);
|
||||
BackColor = Color.Transparent;
|
||||
ForeColor = Color.Black;
|
||||
Font = new System.Drawing.Font("Comic Sans MS", 10, FontStyle.Bold);
|
||||
state = MouseState.Leave;
|
||||
Transparency = false;
|
||||
}
|
||||
#endregion
|
||||
#region Events
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
#region Transparency
|
||||
if (Transparency)
|
||||
{
|
||||
Transparenter.MakeTransparent(this, e.Graphics);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Drawing
|
||||
e.Graphics.SmoothingMode = SmoothingMode.HighQuality;
|
||||
roundedRect = new RoundedRectangleF(Width, Height, radius);
|
||||
e.Graphics.FillRectangle(Brushes.Transparent, ClientRectangle);
|
||||
|
||||
int R1 = (active1.R + inactive1.R) / 2;
|
||||
int G1 = (active1.G + inactive1.G) / 2;
|
||||
int B1 = (active1.B + inactive1.B) / 2;
|
||||
|
||||
int R2 = (active2.R + inactive2.R) / 2;
|
||||
int G2 = (active2.G + inactive2.G) / 2;
|
||||
int B2 = (active2.B + inactive2.B) / 2;
|
||||
|
||||
Rectangle rect = new Rectangle(0, 0, Width, Height);
|
||||
|
||||
if (Enabled)
|
||||
{
|
||||
if (state == MouseState.Leave)
|
||||
{
|
||||
using (LinearGradientBrush inactiveGB = new LinearGradientBrush(rect, inactive1, inactive2, 90f))
|
||||
{
|
||||
e.Graphics.FillPath(inactiveGB, roundedRect.Path);
|
||||
}
|
||||
}
|
||||
else if (state == MouseState.Enter)
|
||||
{
|
||||
using (LinearGradientBrush activeGB = new LinearGradientBrush(rect, active1, active2, 90f))
|
||||
{
|
||||
e.Graphics.FillPath(activeGB, roundedRect.Path);
|
||||
}
|
||||
}
|
||||
else if (state == MouseState.Down)
|
||||
{
|
||||
using (LinearGradientBrush downGB = new LinearGradientBrush(rect, Color.FromArgb(R1, G1, B1), Color.FromArgb(R2, G2, B2), 90f))
|
||||
{
|
||||
e.Graphics.FillPath(downGB, roundedRect.Path);
|
||||
}
|
||||
}
|
||||
|
||||
if (stroke)
|
||||
{
|
||||
using (Pen pen = new Pen(strokeColor, 1))
|
||||
using (GraphicsPath path = new RoundedRectangleF(Width - (radius > 0 ? 0 : 1), Height - (radius > 0 ? 0 : 1), radius).Path)
|
||||
{
|
||||
e.Graphics.DrawPath(pen, path);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Color linear1 = Color.FromArgb(190, 190, 190);
|
||||
Color linear2 = Color.FromArgb(210, 210, 210);
|
||||
using (LinearGradientBrush inactiveGB = new LinearGradientBrush(rect, linear1, linear2, 90f))
|
||||
{
|
||||
e.Graphics.FillPath(inactiveGB, roundedRect.Path);
|
||||
e.Graphics.DrawPath(new Pen(inactiveGB), roundedRect.Path);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region Text Drawing
|
||||
using (StringFormat sf = new StringFormat()
|
||||
{
|
||||
LineAlignment = StringAlignment.Center,
|
||||
Alignment = StringAlignment.Center,
|
||||
})
|
||||
using (Brush brush = new SolidBrush(ForeColor))
|
||||
{
|
||||
e.Graphics.DrawString(Text, Font, brush, ClientRectangle, sf);
|
||||
}
|
||||
#endregion
|
||||
base.OnPaint(e);
|
||||
}
|
||||
|
||||
protected override void OnMouseDoubleClick(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseDoubleClick(e);
|
||||
base.OnClick(e);
|
||||
}
|
||||
protected override void OnClick(EventArgs e)
|
||||
{
|
||||
base.OnClick(e);
|
||||
}
|
||||
protected override void OnEnabledChanged(EventArgs e)
|
||||
{
|
||||
Invalidate();
|
||||
base.OnEnabledChanged(e);
|
||||
}
|
||||
protected override void OnResize(EventArgs e)
|
||||
{
|
||||
Invalidate();
|
||||
base.OnResize(e);
|
||||
}
|
||||
protected override void OnMouseEnter(EventArgs e)
|
||||
{
|
||||
state = MouseState.Enter;
|
||||
base.OnMouseEnter(e);
|
||||
Invalidate();
|
||||
}
|
||||
protected override void OnMouseLeave(EventArgs e)
|
||||
{
|
||||
state = MouseState.Leave;
|
||||
base.OnMouseLeave(e);
|
||||
Invalidate();
|
||||
}
|
||||
protected override void OnMouseDown(MouseEventArgs e)
|
||||
{
|
||||
Capture = false;
|
||||
state = MouseState.Down;
|
||||
base.OnMouseDown(e);
|
||||
Invalidate();
|
||||
}
|
||||
protected override void OnMouseUp(MouseEventArgs e)
|
||||
{
|
||||
if (state != MouseState.Leave)
|
||||
{
|
||||
state = MouseState.Enter;
|
||||
}
|
||||
|
||||
base.OnMouseUp(e);
|
||||
Invalidate();
|
||||
}
|
||||
#endregion
|
||||
#region Properties
|
||||
|
||||
|
||||
public int Radius
|
||||
{
|
||||
get => radius;
|
||||
set
|
||||
{
|
||||
radius = value;
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
public Color Inactive1
|
||||
{
|
||||
get => inactive1;
|
||||
set
|
||||
{
|
||||
inactive1 = value;
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
public Color Inactive2
|
||||
{
|
||||
get => inactive2;
|
||||
set
|
||||
{
|
||||
inactive2 = value;
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
public Color Active1
|
||||
{
|
||||
get => active1;
|
||||
set
|
||||
{
|
||||
active1 = value;
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
public Color Active2
|
||||
{
|
||||
get => active2;
|
||||
set
|
||||
{
|
||||
active2 = value;
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
public bool Transparency { get; set; }
|
||||
public override string Text
|
||||
{
|
||||
get => base.Text;
|
||||
set
|
||||
{
|
||||
base.Text = value;
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
public override Color ForeColor
|
||||
{
|
||||
get => base.ForeColor;
|
||||
set
|
||||
{
|
||||
base.ForeColor = value;
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
public DialogResult DialogResult
|
||||
{
|
||||
get => System.Windows.Forms.DialogResult.OK;
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public void NotifyDefault(bool value)
|
||||
{
|
||||
}
|
||||
|
||||
public void PerformClick()
|
||||
{
|
||||
OnClick(EventArgs.Empty);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
public enum MouseState
|
||||
{
|
||||
Enter,
|
||||
Leave,
|
||||
Down,
|
||||
Up,
|
||||
}
|
||||
|
||||
}
|
||||
48
RoundedRectangleF.cs
Normal file
48
RoundedRectangleF.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
public class RoundedRectangleF
|
||||
{
|
||||
private Point location;
|
||||
private readonly float x, y;
|
||||
private readonly float width, height;
|
||||
|
||||
|
||||
public RoundedRectangleF(float width, float height, float radius, float x = 0, float y = 0)
|
||||
{
|
||||
|
||||
location = new Point(0, 0);
|
||||
Radius = radius;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
Path = new GraphicsPath();
|
||||
if (radius <= 0)
|
||||
{
|
||||
Path.AddRectangle(new RectangleF(x, y, width, height));
|
||||
return;
|
||||
}
|
||||
RectangleF upperLeftRect = new RectangleF(x, y, 2 * radius, 2 * radius);
|
||||
RectangleF upperRightRect = new RectangleF(width - (2 * radius) - 1, x, 2 * radius, 2 * radius);
|
||||
RectangleF lowerLeftRect = new RectangleF(x, height - (2 * radius) - 1, 2 * radius, 2 * radius);
|
||||
RectangleF lowerRightRect = new RectangleF(width - (2 * radius) - 1, height - (2 * radius) - 1, 2 * radius, 2 * radius);
|
||||
|
||||
Path.AddArc(upperLeftRect, 180, 90);
|
||||
Path.AddArc(upperRightRect, 270, 90);
|
||||
Path.AddArc(lowerRightRect, 0, 90);
|
||||
Path.AddArc(lowerLeftRect, 90, 90);
|
||||
Path.CloseAllFigures();
|
||||
|
||||
}
|
||||
public RoundedRectangleF()
|
||||
{
|
||||
}
|
||||
public GraphicsPath Path { get; }
|
||||
public RectangleF Rect => new RectangleF(x, y, width, height);
|
||||
public float Radius { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -14,19 +14,18 @@ namespace AndroidSideloader
|
||||
{
|
||||
private string _initialDirectory;
|
||||
private string _title;
|
||||
private string _fileName = "";
|
||||
|
||||
public string InitialDirectory
|
||||
{
|
||||
get { return string.IsNullOrEmpty(_initialDirectory) ? Environment.CurrentDirectory : _initialDirectory; }
|
||||
set { _initialDirectory = value; }
|
||||
get => string.IsNullOrEmpty(_initialDirectory) ? Environment.CurrentDirectory : _initialDirectory;
|
||||
set => _initialDirectory = value;
|
||||
}
|
||||
public string Title
|
||||
{
|
||||
get { return _title ?? "Select a folder"; }
|
||||
set { _title = value; }
|
||||
get => _title ?? "Select a folder";
|
||||
set => _title = value;
|
||||
}
|
||||
public string FileName { get { return _fileName; } }
|
||||
public string FileName { get; private set; } = "";
|
||||
|
||||
public bool Show() { return Show(IntPtr.Zero); }
|
||||
|
||||
@@ -34,10 +33,10 @@ namespace AndroidSideloader
|
||||
/// <returns>true if the user clicks OK</returns>
|
||||
public bool Show(IntPtr hWndOwner)
|
||||
{
|
||||
var result = Environment.OSVersion.Version.Major >= 6
|
||||
ShowDialogResult result = Environment.OSVersion.Version.Major >= 6
|
||||
? VistaDialog.Show(hWndOwner, InitialDirectory, Title)
|
||||
: ShowXpDialog(hWndOwner, InitialDirectory, Title);
|
||||
_fileName = result.FileName;
|
||||
FileName = result.FileName;
|
||||
return result.Result;
|
||||
}
|
||||
|
||||
@@ -49,13 +48,13 @@ namespace AndroidSideloader
|
||||
|
||||
private static ShowDialogResult ShowXpDialog(IntPtr ownerHandle, string initialDirectory, string title)
|
||||
{
|
||||
var folderBrowserDialog = new FolderBrowserDialog
|
||||
FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog
|
||||
{
|
||||
Description = title,
|
||||
SelectedPath = initialDirectory,
|
||||
ShowNewFolderButton = false
|
||||
};
|
||||
var dialogResult = new ShowDialogResult();
|
||||
ShowDialogResult dialogResult = new ShowDialogResult();
|
||||
if (folderBrowserDialog.ShowDialog(new WindowWrapper(ownerHandle)) == DialogResult.OK)
|
||||
{
|
||||
dialogResult.Result = true;
|
||||
@@ -69,26 +68,26 @@ namespace AndroidSideloader
|
||||
private const string c_foldersFilter = "Folders|\n";
|
||||
|
||||
private const BindingFlags c_flags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
|
||||
private readonly static Assembly s_windowsFormsAssembly = typeof(FileDialog).Assembly;
|
||||
private readonly static Type s_iFileDialogType = s_windowsFormsAssembly.GetType("System.Windows.Forms.FileDialogNative+IFileDialog");
|
||||
private readonly static MethodInfo s_createVistaDialogMethodInfo = typeof(OpenFileDialog).GetMethod("CreateVistaDialog", c_flags);
|
||||
private readonly static MethodInfo s_onBeforeVistaDialogMethodInfo = typeof(OpenFileDialog).GetMethod("OnBeforeVistaDialog", c_flags);
|
||||
private readonly static MethodInfo s_getOptionsMethodInfo = typeof(FileDialog).GetMethod("GetOptions", c_flags);
|
||||
private readonly static MethodInfo s_setOptionsMethodInfo = s_iFileDialogType.GetMethod("SetOptions", c_flags);
|
||||
private readonly static uint s_fosPickFoldersBitFlag = (uint)s_windowsFormsAssembly
|
||||
private static readonly Assembly s_windowsFormsAssembly = typeof(FileDialog).Assembly;
|
||||
private static readonly Type s_iFileDialogType = s_windowsFormsAssembly.GetType("System.Windows.Forms.FileDialogNative+IFileDialog");
|
||||
private static readonly MethodInfo s_createVistaDialogMethodInfo = typeof(OpenFileDialog).GetMethod("CreateVistaDialog", c_flags);
|
||||
private static readonly MethodInfo s_onBeforeVistaDialogMethodInfo = typeof(OpenFileDialog).GetMethod("OnBeforeVistaDialog", c_flags);
|
||||
private static readonly MethodInfo s_getOptionsMethodInfo = typeof(FileDialog).GetMethod("GetOptions", c_flags);
|
||||
private static readonly MethodInfo s_setOptionsMethodInfo = s_iFileDialogType.GetMethod("SetOptions", c_flags);
|
||||
private static readonly uint s_fosPickFoldersBitFlag = (uint)s_windowsFormsAssembly
|
||||
.GetType("System.Windows.Forms.FileDialogNative+FOS")
|
||||
.GetField("FOS_PICKFOLDERS")
|
||||
.GetValue(null);
|
||||
private readonly static ConstructorInfo s_vistaDialogEventsConstructorInfo = s_windowsFormsAssembly
|
||||
private static readonly ConstructorInfo s_vistaDialogEventsConstructorInfo = s_windowsFormsAssembly
|
||||
.GetType("System.Windows.Forms.FileDialog+VistaDialogEvents")
|
||||
.GetConstructor(c_flags, null, new[] { typeof(FileDialog) }, null);
|
||||
private readonly static MethodInfo s_adviseMethodInfo = s_iFileDialogType.GetMethod("Advise");
|
||||
private readonly static MethodInfo s_unAdviseMethodInfo = s_iFileDialogType.GetMethod("Unadvise");
|
||||
private readonly static MethodInfo s_showMethodInfo = s_iFileDialogType.GetMethod("Show");
|
||||
private static readonly MethodInfo s_adviseMethodInfo = s_iFileDialogType.GetMethod("Advise");
|
||||
private static readonly MethodInfo s_unAdviseMethodInfo = s_iFileDialogType.GetMethod("Unadvise");
|
||||
private static readonly MethodInfo s_showMethodInfo = s_iFileDialogType.GetMethod("Show");
|
||||
|
||||
public static ShowDialogResult Show(IntPtr ownerHandle, string initialDirectory, string title)
|
||||
{
|
||||
var openFileDialog = new OpenFileDialog
|
||||
OpenFileDialog openFileDialog = new OpenFileDialog
|
||||
{
|
||||
AddExtension = false,
|
||||
CheckFileExists = false,
|
||||
@@ -99,11 +98,11 @@ namespace AndroidSideloader
|
||||
Title = title
|
||||
};
|
||||
|
||||
var iFileDialog = s_createVistaDialogMethodInfo.Invoke(openFileDialog, new object[] { });
|
||||
s_onBeforeVistaDialogMethodInfo.Invoke(openFileDialog, new[] { iFileDialog });
|
||||
s_setOptionsMethodInfo.Invoke(iFileDialog, new object[] { (uint)s_getOptionsMethodInfo.Invoke(openFileDialog, new object[] { }) | s_fosPickFoldersBitFlag });
|
||||
var adviseParametersWithOutputConnectionToken = new[] { s_vistaDialogEventsConstructorInfo.Invoke(new object[] { openFileDialog }), 0U };
|
||||
s_adviseMethodInfo.Invoke(iFileDialog, adviseParametersWithOutputConnectionToken);
|
||||
object iFileDialog = s_createVistaDialogMethodInfo.Invoke(openFileDialog, new object[] { });
|
||||
_ = s_onBeforeVistaDialogMethodInfo.Invoke(openFileDialog, new[] { iFileDialog });
|
||||
_ = s_setOptionsMethodInfo.Invoke(iFileDialog, new object[] { (uint)s_getOptionsMethodInfo.Invoke(openFileDialog, new object[] { }) | s_fosPickFoldersBitFlag });
|
||||
object[] adviseParametersWithOutputConnectionToken = new[] { s_vistaDialogEventsConstructorInfo.Invoke(new object[] { openFileDialog }), 0U };
|
||||
_ = s_adviseMethodInfo.Invoke(iFileDialog, adviseParametersWithOutputConnectionToken);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -116,7 +115,7 @@ namespace AndroidSideloader
|
||||
}
|
||||
finally
|
||||
{
|
||||
s_unAdviseMethodInfo.Invoke(iFileDialog, new[] { adviseParametersWithOutputConnectionToken[1] });
|
||||
_ = s_unAdviseMethodInfo.Invoke(iFileDialog, new[] { adviseParametersWithOutputConnectionToken[1] });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -124,9 +123,8 @@ namespace AndroidSideloader
|
||||
// Wrap an IWin32Window around an IntPtr
|
||||
private class WindowWrapper : IWin32Window
|
||||
{
|
||||
private readonly IntPtr _handle;
|
||||
public WindowWrapper(IntPtr handle) { _handle = handle; }
|
||||
public IntPtr Handle { get { return _handle; } }
|
||||
public WindowWrapper(IntPtr handle) { Handle = handle; }
|
||||
public IntPtr Handle { get; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
533
SettingsForm.Designer.cs
generated
533
SettingsForm.Designer.cs
generated
@@ -1,4 +1,5 @@
|
||||
namespace AndroidSideloader
|
||||
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
partial class SettingsForm
|
||||
{
|
||||
@@ -28,188 +29,102 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SettingsForm));
|
||||
this.checkForUpdatesCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.applyButton = new System.Windows.Forms.Button();
|
||||
this.enableMessageBoxesCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.resetSettingsButton = new System.Windows.Forms.Button();
|
||||
this.deleteAfterInstallCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.updateConfigCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.userJsonOnGameInstall = new System.Windows.Forms.CheckBox();
|
||||
this.BandwithTextbox = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.BandwithComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.DebugLogCopy = new System.Windows.Forms.Button();
|
||||
this.crashlogID = new System.Windows.Forms.Label();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.debuglogID = new System.Windows.Forms.Label();
|
||||
this.DebugID = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.nodevicemodeBox = new System.Windows.Forms.CheckBox();
|
||||
this.bmbfBox = new System.Windows.Forms.CheckBox();
|
||||
this.AutoReinstBox = new System.Windows.Forms.CheckBox();
|
||||
this.trailersOn = new System.Windows.Forms.CheckBox();
|
||||
this.downloadDirectorySetter = new System.Windows.Forms.FolderBrowserDialog();
|
||||
this.backupDirectorySetter = new System.Windows.Forms.FolderBrowserDialog();
|
||||
this.singleThread = new System.Windows.Forms.CheckBox();
|
||||
this.setBackupDirectory = new AndroidSideloader.RoundButton();
|
||||
this.setDownloadDirectory = new AndroidSideloader.RoundButton();
|
||||
this.btnOpenDebug = new AndroidSideloader.RoundButton();
|
||||
this.btnResetDebug = new AndroidSideloader.RoundButton();
|
||||
this.btnUploadDebug = new AndroidSideloader.RoundButton();
|
||||
this.resetSettingsButton = new AndroidSideloader.RoundButton();
|
||||
this.applyButton = new AndroidSideloader.RoundButton();
|
||||
this.virtualFilesystemCompatibilityCheckbox = new System.Windows.Forms.CheckBox();
|
||||
this.openBackupDirectory = new AndroidSideloader.RoundButton();
|
||||
this.openDownloadDirectory = new AndroidSideloader.RoundButton();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// checkForUpdatesCheckBox
|
||||
//
|
||||
this.checkForUpdatesCheckBox.AutoSize = true;
|
||||
this.checkForUpdatesCheckBox.BackColor = System.Drawing.Color.Transparent;
|
||||
this.checkForUpdatesCheckBox.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.checkForUpdatesCheckBox.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.checkForUpdatesCheckBox.Location = new System.Drawing.Point(12, 12);
|
||||
this.checkForUpdatesCheckBox.Location = new System.Drawing.Point(12, 67);
|
||||
this.checkForUpdatesCheckBox.Name = "checkForUpdatesCheckBox";
|
||||
this.checkForUpdatesCheckBox.Size = new System.Drawing.Size(148, 22);
|
||||
this.checkForUpdatesCheckBox.TabIndex = 0;
|
||||
this.checkForUpdatesCheckBox.Text = "Check for updates";
|
||||
this.checkForUpdatesCheckBox.UseVisualStyleBackColor = true;
|
||||
this.checkForUpdatesCheckBox.UseVisualStyleBackColor = false;
|
||||
this.checkForUpdatesCheckBox.CheckedChanged += new System.EventHandler(this.checkForUpdatesCheckBox_CheckedChanged);
|
||||
//
|
||||
// applyButton
|
||||
//
|
||||
this.applyButton.BackColor = global::AndroidSideloader.Properties.Settings.Default.SubButtonColor;
|
||||
this.applyButton.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.applyButton.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.applyButton.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "SubButtonColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.applyButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.applyButton.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.applyButton.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.applyButton.Location = new System.Drawing.Point(67, 278);
|
||||
this.applyButton.Name = "applyButton";
|
||||
this.applyButton.Size = new System.Drawing.Size(101, 31);
|
||||
this.applyButton.TabIndex = 5;
|
||||
this.applyButton.Text = "Apply";
|
||||
this.applyButton.UseVisualStyleBackColor = false;
|
||||
this.applyButton.Click += new System.EventHandler(this.applyButton_Click);
|
||||
//
|
||||
// enableMessageBoxesCheckBox
|
||||
//
|
||||
this.enableMessageBoxesCheckBox.AutoSize = true;
|
||||
this.enableMessageBoxesCheckBox.BackColor = System.Drawing.Color.Transparent;
|
||||
this.enableMessageBoxesCheckBox.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.enableMessageBoxesCheckBox.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.enableMessageBoxesCheckBox.Location = new System.Drawing.Point(12, 38);
|
||||
this.enableMessageBoxesCheckBox.Location = new System.Drawing.Point(11, 123);
|
||||
this.enableMessageBoxesCheckBox.Name = "enableMessageBoxesCheckBox";
|
||||
this.enableMessageBoxesCheckBox.Size = new System.Drawing.Size(309, 22);
|
||||
this.enableMessageBoxesCheckBox.TabIndex = 1;
|
||||
this.enableMessageBoxesCheckBox.Text = "Enable Message Boxes on task completed";
|
||||
this.enableMessageBoxesCheckBox.UseVisualStyleBackColor = true;
|
||||
this.enableMessageBoxesCheckBox.UseVisualStyleBackColor = false;
|
||||
this.enableMessageBoxesCheckBox.CheckedChanged += new System.EventHandler(this.enableMessageBoxesCheckBox_CheckedChanged);
|
||||
//
|
||||
// resetSettingsButton
|
||||
//
|
||||
this.resetSettingsButton.BackColor = global::AndroidSideloader.Properties.Settings.Default.SubButtonColor;
|
||||
this.resetSettingsButton.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.resetSettingsButton.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.resetSettingsButton.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "SubButtonColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.resetSettingsButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.resetSettingsButton.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.resetSettingsButton.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.resetSettingsButton.Location = new System.Drawing.Point(174, 278);
|
||||
this.resetSettingsButton.Name = "resetSettingsButton";
|
||||
this.resetSettingsButton.Size = new System.Drawing.Size(101, 31);
|
||||
this.resetSettingsButton.TabIndex = 4;
|
||||
this.resetSettingsButton.Text = "Reset Settings";
|
||||
this.resetSettingsButton.UseVisualStyleBackColor = false;
|
||||
this.resetSettingsButton.Click += new System.EventHandler(this.resetSettingsButton_Click);
|
||||
//
|
||||
// deleteAfterInstallCheckBox
|
||||
//
|
||||
this.deleteAfterInstallCheckBox.AutoSize = true;
|
||||
this.deleteAfterInstallCheckBox.BackColor = System.Drawing.Color.Transparent;
|
||||
this.deleteAfterInstallCheckBox.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.deleteAfterInstallCheckBox.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.deleteAfterInstallCheckBox.Location = new System.Drawing.Point(12, 64);
|
||||
this.deleteAfterInstallCheckBox.Location = new System.Drawing.Point(12, 40);
|
||||
this.deleteAfterInstallCheckBox.Name = "deleteAfterInstallCheckBox";
|
||||
this.deleteAfterInstallCheckBox.Size = new System.Drawing.Size(288, 22);
|
||||
this.deleteAfterInstallCheckBox.TabIndex = 3;
|
||||
this.deleteAfterInstallCheckBox.Text = "Delete games after download and install";
|
||||
this.deleteAfterInstallCheckBox.UseVisualStyleBackColor = true;
|
||||
this.deleteAfterInstallCheckBox.UseVisualStyleBackColor = false;
|
||||
this.deleteAfterInstallCheckBox.CheckedChanged += new System.EventHandler(this.deleteAfterInstallCheckBox_CheckedChanged);
|
||||
//
|
||||
// updateConfigCheckBox
|
||||
//
|
||||
this.updateConfigCheckBox.AutoSize = true;
|
||||
this.updateConfigCheckBox.BackColor = System.Drawing.Color.Transparent;
|
||||
this.updateConfigCheckBox.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.updateConfigCheckBox.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.updateConfigCheckBox.Location = new System.Drawing.Point(12, 90);
|
||||
this.updateConfigCheckBox.Location = new System.Drawing.Point(11, 95);
|
||||
this.updateConfigCheckBox.Name = "updateConfigCheckBox";
|
||||
this.updateConfigCheckBox.Size = new System.Drawing.Size(208, 22);
|
||||
this.updateConfigCheckBox.TabIndex = 6;
|
||||
this.updateConfigCheckBox.Text = "Update config automatically";
|
||||
this.updateConfigCheckBox.UseVisualStyleBackColor = true;
|
||||
this.updateConfigCheckBox.UseVisualStyleBackColor = false;
|
||||
this.updateConfigCheckBox.CheckedChanged += new System.EventHandler(this.updateConfigCheckBox_CheckedChanged);
|
||||
//
|
||||
// userJsonOnGameInstall
|
||||
//
|
||||
this.userJsonOnGameInstall.AutoSize = true;
|
||||
this.userJsonOnGameInstall.BackColor = System.Drawing.Color.Transparent;
|
||||
this.userJsonOnGameInstall.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.userJsonOnGameInstall.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.userJsonOnGameInstall.Location = new System.Drawing.Point(12, 116);
|
||||
this.userJsonOnGameInstall.Location = new System.Drawing.Point(11, 151);
|
||||
this.userJsonOnGameInstall.Name = "userJsonOnGameInstall";
|
||||
this.userJsonOnGameInstall.Size = new System.Drawing.Size(243, 22);
|
||||
this.userJsonOnGameInstall.TabIndex = 9;
|
||||
this.userJsonOnGameInstall.Text = "Push random user.json on install";
|
||||
this.userJsonOnGameInstall.UseVisualStyleBackColor = true;
|
||||
this.userJsonOnGameInstall.UseVisualStyleBackColor = false;
|
||||
this.userJsonOnGameInstall.CheckedChanged += new System.EventHandler(this.userJsonOnGameInstall_CheckedChanged);
|
||||
//
|
||||
// BandwithTextbox
|
||||
//
|
||||
this.BandwithTextbox.BackColor = global::AndroidSideloader.Properties.Settings.Default.TextBoxColor;
|
||||
this.BandwithTextbox.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.BandwithTextbox.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.BandwithTextbox.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "TextBoxColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.BandwithTextbox.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.BandwithTextbox.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.BandwithTextbox.Location = new System.Drawing.Point(52, 246);
|
||||
this.BandwithTextbox.Name = "BandwithTextbox";
|
||||
this.BandwithTextbox.Size = new System.Drawing.Size(177, 24);
|
||||
this.BandwithTextbox.TabIndex = 11;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.label1.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.label1.Location = new System.Drawing.Point(40, 223);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(245, 18);
|
||||
this.label1.TabIndex = 12;
|
||||
this.label1.Text = "Download speed limiter, 0 to disable";
|
||||
//
|
||||
// BandwithComboBox
|
||||
//
|
||||
this.BandwithComboBox.BackColor = global::AndroidSideloader.Properties.Settings.Default.ComboBoxColor;
|
||||
this.BandwithComboBox.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.BandwithComboBox.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.BandwithComboBox.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "ComboBoxColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.BandwithComboBox.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.BandwithComboBox.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.BandwithComboBox.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.BandwithComboBox.FormattingEnabled = true;
|
||||
this.BandwithComboBox.Items.AddRange(new object[] {
|
||||
"B",
|
||||
"K",
|
||||
"M",
|
||||
"G"});
|
||||
this.BandwithComboBox.Location = new System.Drawing.Point(235, 246);
|
||||
this.BandwithComboBox.Name = "BandwithComboBox";
|
||||
this.BandwithComboBox.Size = new System.Drawing.Size(55, 26);
|
||||
this.BandwithComboBox.TabIndex = 13;
|
||||
//
|
||||
// DebugLogCopy
|
||||
//
|
||||
this.DebugLogCopy.BackColor = global::AndroidSideloader.Properties.Settings.Default.SubButtonColor;
|
||||
this.DebugLogCopy.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.DebugLogCopy.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.DebugLogCopy.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "SubButtonColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.DebugLogCopy.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.DebugLogCopy.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.DebugLogCopy.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.DebugLogCopy.Location = new System.Drawing.Point(29, 323);
|
||||
this.DebugLogCopy.Name = "DebugLogCopy";
|
||||
this.DebugLogCopy.Size = new System.Drawing.Size(285, 31);
|
||||
this.DebugLogCopy.TabIndex = 5;
|
||||
this.DebugLogCopy.Text = "Send DebugLog to server.";
|
||||
this.DebugLogCopy.UseVisualStyleBackColor = false;
|
||||
this.DebugLogCopy.Click += new System.EventHandler(this.DebugLogCopy_click);
|
||||
//
|
||||
// crashlogID
|
||||
//
|
||||
this.crashlogID.AutoSize = true;
|
||||
@@ -219,135 +134,311 @@
|
||||
this.crashlogID.Size = new System.Drawing.Size(0, 13);
|
||||
this.crashlogID.TabIndex = 15;
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.BackColor = global::AndroidSideloader.Properties.Settings.Default.SubButtonColor;
|
||||
this.button1.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.button1.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.button1.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "SubButtonColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.button1.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.button1.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.button1.Location = new System.Drawing.Point(29, 358);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(285, 31);
|
||||
this.button1.TabIndex = 5;
|
||||
this.button1.Text = "Reset Debug Log";
|
||||
this.button1.UseVisualStyleBackColor = false;
|
||||
this.button1.Click += new System.EventHandler(this.button1_click);
|
||||
//
|
||||
// debuglogID
|
||||
//
|
||||
this.debuglogID.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F);
|
||||
this.debuglogID.Location = new System.Drawing.Point(29, 434);
|
||||
this.debuglogID.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.debuglogID.Name = "debuglogID";
|
||||
this.debuglogID.Size = new System.Drawing.Size(285, 48);
|
||||
this.debuglogID.TabIndex = 14;
|
||||
this.debuglogID.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// DebugID
|
||||
//
|
||||
this.DebugID.AccessibleRole = System.Windows.Forms.AccessibleRole.Row;
|
||||
this.DebugID.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
|
||||
this.DebugID.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.DebugID.Cursor = System.Windows.Forms.Cursors.Default;
|
||||
this.DebugID.Font = new System.Drawing.Font("Microsoft Sans Serif", 13.8F, System.Drawing.FontStyle.Bold);
|
||||
this.DebugID.ForeColor = System.Drawing.SystemColors.ControlLightLight;
|
||||
this.DebugID.Location = new System.Drawing.Point(29, 405);
|
||||
this.DebugID.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.DebugID.Name = "DebugID";
|
||||
this.DebugID.ReadOnly = true;
|
||||
this.DebugID.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal;
|
||||
this.DebugID.Size = new System.Drawing.Size(285, 21);
|
||||
this.DebugID.TabIndex = 16;
|
||||
this.DebugID.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
this.DebugID.Click += new System.EventHandler(this.DebugID_Click);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F);
|
||||
this.label2.Location = new System.Drawing.Point(29, 505);
|
||||
this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(284, 86);
|
||||
this.label2.TabIndex = 14;
|
||||
this.label2.Text = "This is your most recent CrashLogID. Click on the CrashLogID to copy it to your c" +
|
||||
"lipboard.";
|
||||
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.AccessibleRole = System.Windows.Forms.AccessibleRole.Row;
|
||||
this.textBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
|
||||
this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.textBox1.Cursor = System.Windows.Forms.Cursors.Default;
|
||||
this.textBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 13.8F, System.Drawing.FontStyle.Bold);
|
||||
this.textBox1.ForeColor = System.Drawing.SystemColors.ControlLightLight;
|
||||
this.textBox1.Location = new System.Drawing.Point(29, 488);
|
||||
this.textBox1.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.ReadOnly = true;
|
||||
this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal;
|
||||
this.textBox1.Size = new System.Drawing.Size(285, 21);
|
||||
this.textBox1.TabIndex = 16;
|
||||
this.textBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
this.textBox1.Click += new System.EventHandler(this.textBox1_Click);
|
||||
//
|
||||
// nodevicemodeBox
|
||||
//
|
||||
this.nodevicemodeBox.AutoSize = true;
|
||||
this.nodevicemodeBox.BackColor = System.Drawing.Color.Transparent;
|
||||
this.nodevicemodeBox.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.nodevicemodeBox.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.nodevicemodeBox.Location = new System.Drawing.Point(12, 168);
|
||||
this.nodevicemodeBox.Location = new System.Drawing.Point(12, 12);
|
||||
this.nodevicemodeBox.Name = "nodevicemodeBox";
|
||||
this.nodevicemodeBox.Size = new System.Drawing.Size(181, 22);
|
||||
this.nodevicemodeBox.TabIndex = 9;
|
||||
this.nodevicemodeBox.Text = "Enable no device mode";
|
||||
this.nodevicemodeBox.UseVisualStyleBackColor = true;
|
||||
this.nodevicemodeBox.UseVisualStyleBackColor = false;
|
||||
this.nodevicemodeBox.CheckedChanged += new System.EventHandler(this.nodevicemodeBox_CheckedChanged);
|
||||
//
|
||||
// bmbfBox
|
||||
//
|
||||
this.bmbfBox.AutoSize = true;
|
||||
this.bmbfBox.BackColor = System.Drawing.Color.Transparent;
|
||||
this.bmbfBox.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.bmbfBox.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.bmbfBox.Location = new System.Drawing.Point(12, 142);
|
||||
this.bmbfBox.Location = new System.Drawing.Point(11, 179);
|
||||
this.bmbfBox.Name = "bmbfBox";
|
||||
this.bmbfBox.Size = new System.Drawing.Size(281, 22);
|
||||
this.bmbfBox.TabIndex = 9;
|
||||
this.bmbfBox.Text = "Enable BMBF song zips drag and drop";
|
||||
this.bmbfBox.UseVisualStyleBackColor = true;
|
||||
this.bmbfBox.UseVisualStyleBackColor = false;
|
||||
this.bmbfBox.CheckedChanged += new System.EventHandler(this.bmbfBox_CheckedChanged);
|
||||
//
|
||||
// AutoReinstBox
|
||||
//
|
||||
this.AutoReinstBox.AutoSize = true;
|
||||
this.AutoReinstBox.BackColor = System.Drawing.Color.Transparent;
|
||||
this.AutoReinstBox.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.AutoReinstBox.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.AutoReinstBox.Location = new System.Drawing.Point(12, 194);
|
||||
this.AutoReinstBox.Location = new System.Drawing.Point(11, 207);
|
||||
this.AutoReinstBox.Name = "AutoReinstBox";
|
||||
this.AutoReinstBox.Size = new System.Drawing.Size(280, 22);
|
||||
this.AutoReinstBox.TabIndex = 9;
|
||||
this.AutoReinstBox.Text = "Enable auto reinstall upon install failure";
|
||||
this.AutoReinstBox.UseVisualStyleBackColor = true;
|
||||
this.AutoReinstBox.UseVisualStyleBackColor = false;
|
||||
this.AutoReinstBox.CheckedChanged += new System.EventHandler(this.AutoReinstBox_CheckedChanged);
|
||||
this.AutoReinstBox.Click += new System.EventHandler(this.AutoReinstBox_Click);
|
||||
//
|
||||
// trailersOn
|
||||
//
|
||||
this.trailersOn.AutoSize = true;
|
||||
this.trailersOn.BackColor = System.Drawing.Color.Transparent;
|
||||
this.trailersOn.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.trailersOn.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.trailersOn.Location = new System.Drawing.Point(11, 235);
|
||||
this.trailersOn.Name = "trailersOn";
|
||||
this.trailersOn.Size = new System.Drawing.Size(255, 22);
|
||||
this.trailersOn.TabIndex = 23;
|
||||
this.trailersOn.Text = "Use Trailers instead of Thumbnails";
|
||||
this.trailersOn.UseVisualStyleBackColor = false;
|
||||
this.trailersOn.CheckedChanged += new System.EventHandler(this.trailersOn_CheckedChanged);
|
||||
//
|
||||
// downloadDirectorySetter
|
||||
//
|
||||
this.downloadDirectorySetter.RootFolder = System.Environment.SpecialFolder.MyComputer;
|
||||
//
|
||||
// backupDirectorySetter
|
||||
//
|
||||
this.backupDirectorySetter.RootFolder = System.Environment.SpecialFolder.MyComputer;
|
||||
//
|
||||
// singleThread
|
||||
//
|
||||
this.singleThread.AutoSize = true;
|
||||
this.singleThread.BackColor = System.Drawing.Color.Transparent;
|
||||
this.singleThread.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.singleThread.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.singleThread.Location = new System.Drawing.Point(11, 263);
|
||||
this.singleThread.Name = "singleThread";
|
||||
this.singleThread.Size = new System.Drawing.Size(186, 22);
|
||||
this.singleThread.TabIndex = 25;
|
||||
this.singleThread.Text = "Enable Single-Threading";
|
||||
this.singleThread.UseVisualStyleBackColor = false;
|
||||
this.singleThread.CheckedChanged += new System.EventHandler(this.singleThread_CheckedChanged);
|
||||
//
|
||||
// setBackupDirectory
|
||||
//
|
||||
this.setBackupDirectory.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.setBackupDirectory.Active2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.setBackupDirectory.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.setBackupDirectory.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.setBackupDirectory.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F);
|
||||
this.setBackupDirectory.ForeColor = System.Drawing.Color.White;
|
||||
this.setBackupDirectory.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.setBackupDirectory.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.setBackupDirectory.Location = new System.Drawing.Point(27, 542);
|
||||
this.setBackupDirectory.Name = "setBackupDirectory";
|
||||
this.setBackupDirectory.Radius = 5;
|
||||
this.setBackupDirectory.Size = new System.Drawing.Size(285, 31);
|
||||
this.setBackupDirectory.Stroke = true;
|
||||
this.setBackupDirectory.StrokeColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(74)))), ((int)(((byte)(74)))));
|
||||
this.setBackupDirectory.TabIndex = 24;
|
||||
this.setBackupDirectory.Text = "Set Backup Directory";
|
||||
this.setBackupDirectory.Transparency = false;
|
||||
this.setBackupDirectory.Click += new System.EventHandler(this.setBackupDirectory_Click);
|
||||
//
|
||||
// setDownloadDirectory
|
||||
//
|
||||
this.setDownloadDirectory.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.setDownloadDirectory.Active2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.setDownloadDirectory.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.setDownloadDirectory.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.setDownloadDirectory.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F);
|
||||
this.setDownloadDirectory.ForeColor = System.Drawing.Color.White;
|
||||
this.setDownloadDirectory.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.setDownloadDirectory.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.setDownloadDirectory.Location = new System.Drawing.Point(27, 505);
|
||||
this.setDownloadDirectory.Name = "setDownloadDirectory";
|
||||
this.setDownloadDirectory.Radius = 5;
|
||||
this.setDownloadDirectory.Size = new System.Drawing.Size(285, 31);
|
||||
this.setDownloadDirectory.Stroke = true;
|
||||
this.setDownloadDirectory.StrokeColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(74)))), ((int)(((byte)(74)))));
|
||||
this.setDownloadDirectory.TabIndex = 23;
|
||||
this.setDownloadDirectory.Text = "Set Download Directory";
|
||||
this.setDownloadDirectory.Transparency = false;
|
||||
this.setDownloadDirectory.Click += new System.EventHandler(this.setDownloadDirectory_Click);
|
||||
//
|
||||
// btnOpenDebug
|
||||
//
|
||||
this.btnOpenDebug.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.btnOpenDebug.Active2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.btnOpenDebug.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.btnOpenDebug.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.btnOpenDebug.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F);
|
||||
this.btnOpenDebug.ForeColor = System.Drawing.Color.White;
|
||||
this.btnOpenDebug.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.btnOpenDebug.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.btnOpenDebug.Location = new System.Drawing.Point(26, 378);
|
||||
this.btnOpenDebug.Name = "btnOpenDebug";
|
||||
this.btnOpenDebug.Radius = 5;
|
||||
this.btnOpenDebug.Size = new System.Drawing.Size(285, 31);
|
||||
this.btnOpenDebug.Stroke = true;
|
||||
this.btnOpenDebug.StrokeColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(74)))), ((int)(((byte)(74)))));
|
||||
this.btnOpenDebug.TabIndex = 21;
|
||||
this.btnOpenDebug.Text = "Open Debug Log";
|
||||
this.btnOpenDebug.Transparency = false;
|
||||
this.btnOpenDebug.Click += new System.EventHandler(this.btnOpenDebug_Click);
|
||||
//
|
||||
// btnResetDebug
|
||||
//
|
||||
this.btnResetDebug.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.btnResetDebug.Active2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.btnResetDebug.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.btnResetDebug.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.btnResetDebug.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F);
|
||||
this.btnResetDebug.ForeColor = System.Drawing.Color.White;
|
||||
this.btnResetDebug.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.btnResetDebug.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.btnResetDebug.Location = new System.Drawing.Point(26, 415);
|
||||
this.btnResetDebug.Name = "btnResetDebug";
|
||||
this.btnResetDebug.Radius = 5;
|
||||
this.btnResetDebug.Size = new System.Drawing.Size(285, 31);
|
||||
this.btnResetDebug.Stroke = true;
|
||||
this.btnResetDebug.StrokeColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(74)))), ((int)(((byte)(74)))));
|
||||
this.btnResetDebug.TabIndex = 20;
|
||||
this.btnResetDebug.Text = "Reset Debug Log";
|
||||
this.btnResetDebug.Transparency = false;
|
||||
this.btnResetDebug.Click += new System.EventHandler(this.btnResetDebug_click);
|
||||
//
|
||||
// btnUploadDebug
|
||||
//
|
||||
this.btnUploadDebug.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.btnUploadDebug.Active2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.btnUploadDebug.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.btnUploadDebug.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.btnUploadDebug.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F);
|
||||
this.btnUploadDebug.ForeColor = System.Drawing.Color.White;
|
||||
this.btnUploadDebug.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.btnUploadDebug.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.btnUploadDebug.Location = new System.Drawing.Point(26, 452);
|
||||
this.btnUploadDebug.Name = "btnUploadDebug";
|
||||
this.btnUploadDebug.Radius = 5;
|
||||
this.btnUploadDebug.Size = new System.Drawing.Size(285, 31);
|
||||
this.btnUploadDebug.Stroke = true;
|
||||
this.btnUploadDebug.StrokeColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(74)))), ((int)(((byte)(74)))));
|
||||
this.btnUploadDebug.TabIndex = 19;
|
||||
this.btnUploadDebug.Text = "Upload Debug Log";
|
||||
this.btnUploadDebug.Transparency = false;
|
||||
this.btnUploadDebug.Click += new System.EventHandler(this.btnUploadDebug_click);
|
||||
//
|
||||
// resetSettingsButton
|
||||
//
|
||||
this.resetSettingsButton.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.resetSettingsButton.Active2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.resetSettingsButton.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.resetSettingsButton.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.resetSettingsButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F);
|
||||
this.resetSettingsButton.ForeColor = System.Drawing.Color.White;
|
||||
this.resetSettingsButton.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.resetSettingsButton.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.resetSettingsButton.Location = new System.Drawing.Point(179, 325);
|
||||
this.resetSettingsButton.Name = "resetSettingsButton";
|
||||
this.resetSettingsButton.Radius = 5;
|
||||
this.resetSettingsButton.Size = new System.Drawing.Size(133, 31);
|
||||
this.resetSettingsButton.Stroke = true;
|
||||
this.resetSettingsButton.StrokeColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(74)))), ((int)(((byte)(74)))));
|
||||
this.resetSettingsButton.TabIndex = 18;
|
||||
this.resetSettingsButton.Text = "Reset Settings";
|
||||
this.resetSettingsButton.Transparency = false;
|
||||
this.resetSettingsButton.Click += new System.EventHandler(this.resetSettingsButton_Click);
|
||||
//
|
||||
// applyButton
|
||||
//
|
||||
this.applyButton.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.applyButton.Active2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.applyButton.BackColor = global::AndroidSideloader.Properties.Settings.Default.SubButtonColor;
|
||||
this.applyButton.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.applyButton.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.applyButton.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "SubButtonColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.applyButton.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.applyButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F);
|
||||
this.applyButton.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.applyButton.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.applyButton.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.applyButton.Location = new System.Drawing.Point(27, 325);
|
||||
this.applyButton.Name = "applyButton";
|
||||
this.applyButton.Radius = 5;
|
||||
this.applyButton.Size = new System.Drawing.Size(133, 31);
|
||||
this.applyButton.Stroke = true;
|
||||
this.applyButton.StrokeColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(74)))), ((int)(((byte)(74)))));
|
||||
this.applyButton.TabIndex = 17;
|
||||
this.applyButton.Text = "Apply Settings";
|
||||
this.applyButton.Transparency = false;
|
||||
this.applyButton.Click += new System.EventHandler(this.applyButton_Click);
|
||||
//
|
||||
// virtualFilesystemCompatibilityCheckbox
|
||||
//
|
||||
this.virtualFilesystemCompatibilityCheckbox.AutoSize = true;
|
||||
this.virtualFilesystemCompatibilityCheckbox.BackColor = System.Drawing.Color.Transparent;
|
||||
this.virtualFilesystemCompatibilityCheckbox.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.virtualFilesystemCompatibilityCheckbox.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.virtualFilesystemCompatibilityCheckbox.Location = new System.Drawing.Point(11, 291);
|
||||
this.virtualFilesystemCompatibilityCheckbox.Name = "virtualFilesystemCompatibilityCheckbox";
|
||||
this.virtualFilesystemCompatibilityCheckbox.Size = new System.Drawing.Size(279, 22);
|
||||
this.virtualFilesystemCompatibilityCheckbox.TabIndex = 26;
|
||||
this.virtualFilesystemCompatibilityCheckbox.Text = "Enable Virtual Filesystem Compatibility";
|
||||
this.virtualFilesystemCompatibilityCheckbox.UseVisualStyleBackColor = true;
|
||||
this.virtualFilesystemCompatibilityCheckbox.CheckedChanged += new System.EventHandler(this.virtualFilesystemCompatibilityCheckbox_CheckedChanged);
|
||||
//
|
||||
// openBackupDirectory
|
||||
//
|
||||
this.openBackupDirectory.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.openBackupDirectory.Active2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.openBackupDirectory.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.openBackupDirectory.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.openBackupDirectory.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F);
|
||||
this.openBackupDirectory.ForeColor = System.Drawing.Color.White;
|
||||
this.openBackupDirectory.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.openBackupDirectory.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.openBackupDirectory.Location = new System.Drawing.Point(27, 616);
|
||||
this.openBackupDirectory.Name = "openBackupDirectory";
|
||||
this.openBackupDirectory.Radius = 5;
|
||||
this.openBackupDirectory.Size = new System.Drawing.Size(285, 31);
|
||||
this.openBackupDirectory.Stroke = true;
|
||||
this.openBackupDirectory.StrokeColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(74)))), ((int)(((byte)(74)))));
|
||||
this.openBackupDirectory.TabIndex = 28;
|
||||
this.openBackupDirectory.Text = "Open Backup Directory";
|
||||
this.openBackupDirectory.Transparency = false;
|
||||
this.openBackupDirectory.Click += new System.EventHandler(this.openBackupDirectory_Click);
|
||||
//
|
||||
// openDownloadDirectory
|
||||
//
|
||||
this.openDownloadDirectory.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.openDownloadDirectory.Active2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.openDownloadDirectory.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.openDownloadDirectory.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.openDownloadDirectory.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F);
|
||||
this.openDownloadDirectory.ForeColor = System.Drawing.Color.White;
|
||||
this.openDownloadDirectory.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.openDownloadDirectory.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.openDownloadDirectory.Location = new System.Drawing.Point(27, 579);
|
||||
this.openDownloadDirectory.Name = "openDownloadDirectory";
|
||||
this.openDownloadDirectory.Radius = 5;
|
||||
this.openDownloadDirectory.Size = new System.Drawing.Size(285, 31);
|
||||
this.openDownloadDirectory.Stroke = true;
|
||||
this.openDownloadDirectory.StrokeColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(74)))), ((int)(((byte)(74)))));
|
||||
this.openDownloadDirectory.TabIndex = 27;
|
||||
this.openDownloadDirectory.Text = "Open Download Directory";
|
||||
this.openDownloadDirectory.Transparency = false;
|
||||
this.openDownloadDirectory.Click += new System.EventHandler(this.openDownloadDirectory_Click);
|
||||
//
|
||||
// SettingsForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = global::AndroidSideloader.Properties.Settings.Default.BackColor;
|
||||
this.ClientSize = new System.Drawing.Size(342, 601);
|
||||
this.Controls.Add(this.textBox1);
|
||||
this.Controls.Add(this.DebugID);
|
||||
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
|
||||
this.ClientSize = new System.Drawing.Size(339, 665);
|
||||
this.Controls.Add(this.openBackupDirectory);
|
||||
this.Controls.Add(this.openDownloadDirectory);
|
||||
this.Controls.Add(this.virtualFilesystemCompatibilityCheckbox);
|
||||
this.Controls.Add(this.singleThread);
|
||||
this.Controls.Add(this.setBackupDirectory);
|
||||
this.Controls.Add(this.trailersOn);
|
||||
this.Controls.Add(this.setDownloadDirectory);
|
||||
this.Controls.Add(this.btnOpenDebug);
|
||||
this.Controls.Add(this.btnResetDebug);
|
||||
this.Controls.Add(this.btnUploadDebug);
|
||||
this.Controls.Add(this.resetSettingsButton);
|
||||
this.Controls.Add(this.applyButton);
|
||||
this.Controls.Add(this.crashlogID);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.debuglogID);
|
||||
this.Controls.Add(this.BandwithComboBox);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.BandwithTextbox);
|
||||
this.Controls.Add(this.bmbfBox);
|
||||
this.Controls.Add(this.AutoReinstBox);
|
||||
this.Controls.Add(this.nodevicemodeBox);
|
||||
@@ -355,14 +446,11 @@
|
||||
this.Controls.Add(this.updateConfigCheckBox);
|
||||
this.Controls.Add(this.deleteAfterInstallCheckBox);
|
||||
this.Controls.Add(this.enableMessageBoxesCheckBox);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.DebugLogCopy);
|
||||
this.Controls.Add(this.applyButton);
|
||||
this.Controls.Add(this.checkForUpdatesCheckBox);
|
||||
this.Controls.Add(this.resetSettingsButton);
|
||||
this.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "BackColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.ForeColor = System.Drawing.Color.White;
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "SettingsForm";
|
||||
this.ShowIcon = false;
|
||||
@@ -379,24 +467,27 @@
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.CheckBox checkForUpdatesCheckBox;
|
||||
private System.Windows.Forms.Button applyButton;
|
||||
private System.Windows.Forms.CheckBox enableMessageBoxesCheckBox;
|
||||
private System.Windows.Forms.Button resetSettingsButton;
|
||||
private System.Windows.Forms.CheckBox deleteAfterInstallCheckBox;
|
||||
private System.Windows.Forms.CheckBox updateConfigCheckBox;
|
||||
private System.Windows.Forms.CheckBox userJsonOnGameInstall;
|
||||
private System.Windows.Forms.TextBox BandwithTextbox;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.ComboBox BandwithComboBox;
|
||||
private System.Windows.Forms.Button DebugLogCopy;
|
||||
private System.Windows.Forms.Label crashlogID;
|
||||
private System.Windows.Forms.Button button1;
|
||||
public System.Windows.Forms.Label debuglogID;
|
||||
private System.Windows.Forms.TextBox DebugID;
|
||||
public System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
private System.Windows.Forms.CheckBox nodevicemodeBox;
|
||||
private System.Windows.Forms.CheckBox bmbfBox;
|
||||
private System.Windows.Forms.CheckBox AutoReinstBox;
|
||||
private RoundButton applyButton;
|
||||
private RoundButton resetSettingsButton;
|
||||
private RoundButton btnResetDebug;
|
||||
private RoundButton btnUploadDebug;
|
||||
private RoundButton btnOpenDebug;
|
||||
private System.Windows.Forms.CheckBox trailersOn;
|
||||
private RoundButton setDownloadDirectory;
|
||||
private System.Windows.Forms.FolderBrowserDialog downloadDirectorySetter;
|
||||
private RoundButton setBackupDirectory;
|
||||
private System.Windows.Forms.FolderBrowserDialog backupDirectorySetter;
|
||||
private System.Windows.Forms.CheckBox singleThread;
|
||||
private System.Windows.Forms.CheckBox virtualFilesystemCompatibilityCheckbox;
|
||||
private RoundButton openBackupDirectory;
|
||||
private RoundButton openDownloadDirectory;
|
||||
}
|
||||
}
|
||||
195
SettingsForm.cs
195
SettingsForm.cs
@@ -1,5 +1,6 @@
|
||||
using JR.Utils.GUI.Forms;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
@@ -14,12 +15,7 @@ namespace AndroidSideloader
|
||||
|
||||
private void SettingsForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.CenterToParent();
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.CurrentLogName))
|
||||
textBox1.Text = Properties.Settings.Default.CurrentCrashName;
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.CurrentLogPath))
|
||||
DebugID.Text = Properties.Settings.Default.CurrentLogName;
|
||||
debuglogID.Text = "This is your DebugLogID. Click on your DebugLogID to copy it to your clipboard.";
|
||||
CenterToParent();
|
||||
intSettings();
|
||||
intToolTips();
|
||||
}
|
||||
@@ -35,89 +31,60 @@ namespace AndroidSideloader
|
||||
nodevicemodeBox.Checked = Properties.Settings.Default.nodevicemode;
|
||||
bmbfBox.Checked = Properties.Settings.Default.BMBFchecked;
|
||||
AutoReinstBox.Checked = Properties.Settings.Default.AutoReinstall;
|
||||
|
||||
if (Properties.Settings.Default.BandwithLimit.Length > 1)
|
||||
trailersOn.Checked = Properties.Settings.Default.TrailersOn;
|
||||
singleThread.Checked = Properties.Settings.Default.singleThreadMode;
|
||||
virtualFilesystemCompatibilityCheckbox.Checked = Properties.Settings.Default.virtualFilesystemCompatibility;
|
||||
if (nodevicemodeBox.Checked)
|
||||
{
|
||||
BandwithTextbox.Text = Properties.Settings.Default.BandwithLimit.Remove(Properties.Settings.Default.BandwithLimit.Length - 1);
|
||||
BandwithComboBox.Text = Properties.Settings.Default.BandwithLimit[Properties.Settings.Default.BandwithLimit.Length - 1].ToString();
|
||||
deleteAfterInstallCheckBox.Checked = false;
|
||||
deleteAfterInstallCheckBox.Enabled = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void intToolTips()
|
||||
private void intToolTips()
|
||||
{
|
||||
ToolTip checkForUpdatesToolTip = new ToolTip();
|
||||
checkForUpdatesToolTip.SetToolTip(this.checkForUpdatesCheckBox, "If this is checked, the software will check for available updates");
|
||||
checkForUpdatesToolTip.SetToolTip(checkForUpdatesCheckBox, "If this is checked, the software will check for available updates");
|
||||
ToolTip enableMessageBoxesToolTip = new ToolTip();
|
||||
enableMessageBoxesToolTip.SetToolTip(this.enableMessageBoxesCheckBox, "If this is checked, the software will display message boxes after every completed task");
|
||||
enableMessageBoxesToolTip.SetToolTip(enableMessageBoxesCheckBox, "If this is checked, the software will display message boxes after every completed task");
|
||||
ToolTip deleteAfterInstallToolTip = new ToolTip();
|
||||
deleteAfterInstallToolTip.SetToolTip(this.deleteAfterInstallCheckBox, "If this is checked, the software will delete all game files after downloading and installing a game from a remote server");
|
||||
deleteAfterInstallToolTip.SetToolTip(deleteAfterInstallCheckBox, "If this is checked, the software will delete all game files after downloading and installing a game from a remote server");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void DebugLogCopy_click(object sender, EventArgs e)
|
||||
public void btnUploadDebug_click(object sender, EventArgs e)
|
||||
{
|
||||
if (File.Exists($"{Properties.Settings.Default.CurrentLogPath}"))
|
||||
{
|
||||
RCLONE.runRcloneCommand_DownloadConfig($"copy \"{Properties.Settings.Default.CurrentLogPath}\" VRP-debuglogs:DebugLogs");
|
||||
Clipboard.SetText(DebugID.Text);
|
||||
MessageBox.Show($"Your debug log has been copied to the server. Please mention your DebugLog ID ({Properties.Settings.Default.CurrentLogName}) to the Mods (it has been automatically copied to your clipboard).");
|
||||
string UUID = SideloaderUtilities.UUID();
|
||||
string debugLogPath = $"{Environment.CurrentDirectory}\\{UUID}.log";
|
||||
System.IO.File.Copy("debuglog.txt", debugLogPath);
|
||||
|
||||
Clipboard.SetText(UUID);
|
||||
|
||||
_ = RCLONE.runRcloneCommand_UploadConfig($"copy \"{debugLogPath}\" RSL-gameuploads:DebugLogs");
|
||||
_ = MessageBox.Show($"Your debug log has been copied to the server. ID: {UUID}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void button1_click(object sender, EventArgs e)
|
||||
public void btnResetDebug_click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (File.Exists($"{Properties.Settings.Default.CurrentLogPath}"))
|
||||
{
|
||||
File.Delete($"{Properties.Settings.Default.CurrentLogPath}");
|
||||
if (File.Exists($"{Environment.CurrentDirectory}\\debuglog.txt"))
|
||||
File.Delete($"{Environment.CurrentDirectory}\\debuglog.txt");
|
||||
|
||||
|
||||
if (File.Exists($"{Environment.CurrentDirectory}\\nouns\\nouns.txt"))
|
||||
{
|
||||
string[] lines = File.ReadAllLines($"{Environment.CurrentDirectory}\\nouns\\nouns.txt");
|
||||
Random r = new Random();
|
||||
int x = r.Next(6806);
|
||||
int y = r.Next(6806);
|
||||
string randomnoun = lines[new Random(x).Next(lines.Length)];
|
||||
string randomnoun2 = lines[new Random(y).Next(lines.Length)];
|
||||
string combined = randomnoun + "-" + randomnoun2;
|
||||
Properties.Settings.Default.CurrentLogPath = Environment.CurrentDirectory + "\\" + combined + ".txt";
|
||||
Properties.Settings.Default.CurrentLogName = combined;
|
||||
Properties.Settings.Default.Save();
|
||||
DebugID.Text = combined;
|
||||
this.Close();
|
||||
SettingsForm Form = new SettingsForm();
|
||||
Form.Show();
|
||||
}
|
||||
|
||||
if (File.Exists($"{Environment.CurrentDirectory}\\debuglog.txt"))
|
||||
{
|
||||
File.Delete($"{Environment.CurrentDirectory}\\debuglog.txt");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Apply settings
|
||||
private void applyButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (BandwithTextbox.Text.Length > 0 && BandwithTextbox.Text != "0")
|
||||
if (BandwithComboBox.SelectedIndex == -1)
|
||||
{
|
||||
FlexibleMessageBox.Show("You need to select something from the combobox");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
Properties.Settings.Default.BandwithLimit = $"{BandwithTextbox.Text.Replace(" ", "")}{BandwithComboBox.Text}";
|
||||
}
|
||||
else
|
||||
Properties.Settings.Default.BandwithLimit = "";
|
||||
|
||||
Properties.Settings.Default.Save();
|
||||
FlexibleMessageBox.Show("Settings applied!");
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void checkForUpdatesCheckBox_CheckedChanged(object sender, EventArgs e)
|
||||
@@ -133,6 +100,10 @@ namespace AndroidSideloader
|
||||
private void resetSettingsButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
Properties.Settings.Default.Reset();
|
||||
Properties.Settings.Default.customDownloadDir = false;
|
||||
Properties.Settings.Default.customBackupDir = false;
|
||||
MainForm.backupFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), $"Rookie Backups");
|
||||
Properties.Settings.Default.downloadDir = Environment.CurrentDirectory.ToString();
|
||||
intSettings();
|
||||
}
|
||||
|
||||
@@ -155,52 +126,47 @@ namespace AndroidSideloader
|
||||
{
|
||||
if (e.KeyChar == (char)Keys.Escape)
|
||||
{
|
||||
this.Close();
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
||||
private void SettingsForm_Leave(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
Close();
|
||||
}
|
||||
|
||||
|
||||
private void Form_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Escape)
|
||||
{
|
||||
this.Close();
|
||||
Close();
|
||||
}
|
||||
}
|
||||
protected override bool ProcessDialogKey(Keys keyData)
|
||||
{
|
||||
if (Form.ModifierKeys == Keys.None && keyData == Keys.Escape)
|
||||
{
|
||||
this.Close();
|
||||
Close();
|
||||
return true;
|
||||
}
|
||||
return base.ProcessDialogKey(keyData);
|
||||
}
|
||||
|
||||
private void DebugID_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (File.Exists(Environment.CurrentDirectory + "\\" + Properties.Settings.Default.CurrentLogName + ".txt"))
|
||||
Clipboard.SetText(DebugID.Text);
|
||||
MessageBox.Show("DebugLogID copied to clipboard! Paste it to a moderator/helper for assistance!");
|
||||
}
|
||||
|
||||
private void textBox1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!String.IsNullOrEmpty(Properties.Settings.Default.CurrentCrashName))
|
||||
{
|
||||
Clipboard.SetText(textBox1.Text);
|
||||
MessageBox.Show("CrashLogID copied to clipboard! Paste it to a moderator/helper for assistance!");
|
||||
}
|
||||
}
|
||||
|
||||
private void nodevicemodeBox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
Properties.Settings.Default.nodevicemode = nodevicemodeBox.Checked;
|
||||
if (!nodevicemodeBox.Checked)
|
||||
{
|
||||
deleteAfterInstallCheckBox.Checked = true;
|
||||
Properties.Settings.Default.deleteAllAfterInstall = true;
|
||||
deleteAfterInstallCheckBox.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
deleteAfterInstallCheckBox.Checked = false;
|
||||
Properties.Settings.Default.deleteAllAfterInstall = false;
|
||||
deleteAfterInstallCheckBox.Enabled = false;
|
||||
}
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
|
||||
@@ -216,20 +182,81 @@ namespace AndroidSideloader
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
|
||||
private void trailersOn_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
Properties.Settings.Default.TrailersOn = trailersOn.Checked;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
|
||||
private void AutoReinstBox_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (AutoReinstBox.Checked)
|
||||
{
|
||||
DialogResult dialogResult = FlexibleMessageBox.Show("WARNING: This box enables automatic reinstall when installs fail,\ndue to some games not allowing " +
|
||||
DialogResult dialogResult = FlexibleMessageBox.Show(this, "WARNING: This box enables automatic reinstall when installs fail,\ndue to some games not allowing " +
|
||||
"access to their save data (less than 5%) this\noption can lead to losing your progress." +
|
||||
" However with this option\nchecked when installs fail you won't have to agree to a prompt to preform\nthe reinstall. " +
|
||||
" However with this option\nchecked when installs fail you won't have to agree to a prompt to perform\nthe reinstall. " +
|
||||
"(ideal when installing from a queue).\n\nNOTE: If your usb/wireless adb connection is extremely slow this option can\ncause larger" +
|
||||
"apk file installations to fail. Enable anyway?", "WARNING", MessageBoxButtons.OKCancel);
|
||||
if (dialogResult == DialogResult.Cancel)
|
||||
{
|
||||
AutoReinstBox.Checked = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void btnOpenDebug_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (File.Exists($"{Environment.CurrentDirectory}\\debuglog.txt"))
|
||||
{
|
||||
_ = Process.Start($"{Environment.CurrentDirectory}\\debuglog.txt");
|
||||
}
|
||||
}
|
||||
|
||||
private void setDownloadDirectory_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (downloadDirectorySetter.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
Properties.Settings.Default.customDownloadDir = true;
|
||||
Properties.Settings.Default.downloadDir = downloadDirectorySetter.SelectedPath;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
}
|
||||
|
||||
private void setBackupDirectory_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (backupDirectorySetter.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
Properties.Settings.Default.customBackupDir = true;
|
||||
Properties.Settings.Default.backupDir = backupDirectorySetter.SelectedPath;
|
||||
MainForm.backupFolder = Properties.Settings.Default.backupDir;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
}
|
||||
|
||||
private void singleThread_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
Properties.Settings.Default.singleThreadMode = singleThread.Checked;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
|
||||
private void virtualFilesystemCompatibilityCheckbox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
Properties.Settings.Default.virtualFilesystemCompatibility = virtualFilesystemCompatibilityCheckbox.Checked;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
|
||||
private void openDownloadDirectory_Click(object sender, EventArgs e)
|
||||
{
|
||||
string pathToOpen = Properties.Settings.Default.customDownloadDir ? $"{Properties.Settings.Default.downloadDir}" : $"{Environment.CurrentDirectory}";
|
||||
MainForm.OpenDirectory(pathToOpen);
|
||||
}
|
||||
|
||||
private void openBackupDirectory_Click(object sender, EventArgs e)
|
||||
{
|
||||
string pathToOpen = Properties.Settings.Default.customBackupDir ? $"{Path.Combine((Properties.Settings.Default.backupDir), $"Rookie Backups")}" : $"{Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), $"Rookie Backups")}";
|
||||
MainForm.OpenDirectory(pathToOpen);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
8740
SettingsForm.resx
8740
SettingsForm.resx
File diff suppressed because it is too large
Load Diff
Binary file not shown.
703
Sideloader.cs
703
Sideloader.cs
@@ -1,302 +1,401 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json;
|
||||
using System.Net;
|
||||
using System.Windows.Forms;
|
||||
using JR.Utils.GUI.Forms;
|
||||
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
class Sideloader
|
||||
{
|
||||
public static string TempFolder = Path.Combine(Environment.CurrentDirectory, "temp");
|
||||
public static string CrashLogPath = "crashlog.txt";
|
||||
|
||||
public static string SpooferWarning = @"Please make sure you have installed:
|
||||
- APKTool
|
||||
- Java JDK
|
||||
- aapt
|
||||
And all of them added to PATH, without ANY of them, the spoofer won't work!";
|
||||
|
||||
//push user.json to device (required for some devices like oculus quest)
|
||||
public static void PushUserJsons()
|
||||
{
|
||||
ADB.WakeDevice();
|
||||
foreach (var userJson in UsernameForm.userJsons)
|
||||
{
|
||||
UsernameForm.createUserJsonByName(Utilities.GeneralUtilities.randomString(16), userJson);
|
||||
ADB.RunAdbCommandToString("push \"" + Environment.CurrentDirectory + $"\\{userJson}\" " + " /sdcard/");
|
||||
File.Delete(userJson);
|
||||
}
|
||||
}
|
||||
|
||||
//List of all installed package names from connected device
|
||||
//public static List<string> InstalledPackageNames = new List<string>(); //Remove folder from device
|
||||
public static ProcessOutput RemoveFolder(string path)
|
||||
{
|
||||
ADB.WakeDevice();
|
||||
return ADB.RunAdbCommandToString($"shell rm -r {path}");
|
||||
}
|
||||
public static ProcessOutput RemoveFile(string path)
|
||||
{
|
||||
ADB.WakeDevice();
|
||||
return ADB.RunAdbCommandToString($"shell rm -f {path}");
|
||||
}
|
||||
|
||||
//For games that require manual install, like having another folder that isnt an obb
|
||||
public static ProcessOutput RunADBCommandsFromFile(string path)
|
||||
{
|
||||
ADB.WakeDevice();
|
||||
ProcessOutput output = new ProcessOutput();
|
||||
var commands = File.ReadAllLines(path);
|
||||
string currfolder = Path.GetDirectoryName(path);
|
||||
string[] zipz = Directory.GetFiles(currfolder, "*.7z", SearchOption.AllDirectories);
|
||||
foreach (string zip in zipz)
|
||||
{
|
||||
Utilities.Zip.ExtractFile($"{zip}", currfolder);
|
||||
}
|
||||
foreach (string cmd in commands)
|
||||
{
|
||||
if (cmd.StartsWith("adb"))
|
||||
{
|
||||
string replacement = "";
|
||||
string pattern = "adb";
|
||||
if (ADB.DeviceID.Length > 1)
|
||||
replacement = $"{Properties.Settings.Default.ADBPath} -s {ADB.DeviceID}";
|
||||
else
|
||||
replacement = $"{Properties.Settings.Default.ADBPath}";
|
||||
Regex rgx = new Regex(pattern);
|
||||
string result = rgx.Replace(cmd, replacement);
|
||||
Program.form.ChangeTitle($"Running {result}");
|
||||
Logger.Log($"Logging command: {result} from file: {path}");
|
||||
output += ADB.RunAdbCommandToStringWOADB(result, path);
|
||||
if (output.Error.Contains("mkdir"))
|
||||
output.Error = "";
|
||||
if (output.Output.Contains("reserved"))
|
||||
output.Output = "";
|
||||
}
|
||||
}
|
||||
output.Output += "Custom install successful!";
|
||||
return output;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//Recursive sideload any apk fileD
|
||||
public static ProcessOutput RecursiveOutput = new ProcessOutput();
|
||||
public static void RecursiveSideload(string FolderPath)
|
||||
{
|
||||
try
|
||||
{
|
||||
foreach (string f in Directory.GetFiles(FolderPath))
|
||||
{
|
||||
if (Path.GetExtension(f) == ".apk")
|
||||
|
||||
RecursiveOutput += ADB.Sideload(f);
|
||||
}
|
||||
|
||||
foreach (string d in Directory.GetDirectories(FolderPath))
|
||||
{
|
||||
RecursiveSideload(d);
|
||||
}
|
||||
}
|
||||
catch (Exception ex) { Logger.Log(ex.Message); }
|
||||
}
|
||||
|
||||
//Recursive copy any obb folder
|
||||
public static void RecursiveCopyOBB(string FolderPath)
|
||||
{
|
||||
try
|
||||
{
|
||||
foreach (string f in Directory.GetFiles(FolderPath))
|
||||
{
|
||||
RecursiveOutput += ADB.CopyOBB(f);
|
||||
}
|
||||
|
||||
foreach (string d in Directory.GetDirectories(FolderPath))
|
||||
{
|
||||
RecursiveCopyOBB(d);
|
||||
}
|
||||
}
|
||||
catch (Exception ex) { Logger.Log(ex.Message); }
|
||||
}
|
||||
public static string BackupFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), $"Rookie Backups");
|
||||
//uninstalls an app
|
||||
public static ProcessOutput UninstallGame(string packagename)
|
||||
{
|
||||
ADB.WakeDevice();
|
||||
Program.form.ChangeTitle("Attempting to backup any savedata to Documents\\Rookie Backups...");
|
||||
ProcessOutput output = new ProcessOutput("", "");
|
||||
string date_str = DateTime.Today.ToString("yyyy.MM.dd");
|
||||
string CurrBackups = Path.Combine(BackupFolder, date_str);
|
||||
if (!Directory.Exists(CurrBackups))
|
||||
Directory.CreateDirectory(CurrBackups);
|
||||
ADB.RunAdbCommandToString($"pull \"/sdcard/Android/data/{packagename}\" \"{CurrBackups}\"");
|
||||
output = ADB.UninstallPackage(packagename);
|
||||
Program.form.ChangeTitle("");
|
||||
Sideloader.RemoveFolder("/sdcard/Android/obb/" + packagename);
|
||||
Sideloader.RemoveFolder("/sdcard/Android/data/" + packagename);
|
||||
return output;
|
||||
}
|
||||
|
||||
public static ProcessOutput DeleteFile(string GameName)
|
||||
{
|
||||
ADB.WakeDevice();
|
||||
ProcessOutput output = new ProcessOutput("", "");
|
||||
|
||||
string packageName = Sideloader.gameNameToPackageName(GameName);
|
||||
|
||||
DialogResult dialogResult = FlexibleMessageBox.Show($"Are you sure you want to uninstall custom QU settings for {packageName}? this CANNOT be undone!", "WARNING!", MessageBoxButtons.YesNo);
|
||||
if (dialogResult != DialogResult.Yes)
|
||||
return output;
|
||||
|
||||
output = Sideloader.RemoveFile($"/sdcard/Android/data/{packageName}/private/Config.Json");
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
//Extracts apk from device, saves it by package name to sideloader folder
|
||||
public static ProcessOutput getApk(string GameName)
|
||||
{
|
||||
|
||||
ADB.WakeDevice();
|
||||
ProcessOutput output = new ProcessOutput("", "");
|
||||
|
||||
string packageName = Sideloader.gameNameToPackageName(GameName);
|
||||
|
||||
output = ADB.RunAdbCommandToString("shell pm path " + packageName);
|
||||
|
||||
string apkPath = output.Output; //Get apk
|
||||
|
||||
apkPath = apkPath.Remove(apkPath.Length - 1);
|
||||
apkPath = apkPath.Remove(0, 8); //remove package:
|
||||
apkPath = apkPath.Remove(apkPath.Length - 1);
|
||||
if (File.Exists($"{Properties.Settings.Default.ADBFolder}\\base.apk"))
|
||||
File.Delete($"{Properties.Settings.Default.ADBFolder}\\base.apk");
|
||||
if (File.Exists($"{Properties.Settings.Default.MainDir}\\{packageName}\\{packageName}.apk"))
|
||||
File.Delete($"{Properties.Settings.Default.MainDir}\\{packageName}\\{packageName}.apk");
|
||||
output += ADB.RunAdbCommandToString("pull " + apkPath); //pull apk
|
||||
|
||||
if (Directory.Exists($"{Properties.Settings.Default.MainDir}\\{packageName}"))
|
||||
Directory.Delete($"{Properties.Settings.Default.MainDir}\\{packageName}", true);
|
||||
|
||||
Directory.CreateDirectory($"{Properties.Settings.Default.MainDir}\\{packageName}");
|
||||
|
||||
File.Move($"{Properties.Settings.Default.ADBFolder}\\base.apk", $"{Properties.Settings.Default.MainDir}\\{packageName}\\{packageName}.apk");
|
||||
return output;
|
||||
}
|
||||
|
||||
public static string gameNameToPackageName(string gameName)
|
||||
{
|
||||
foreach (string[] game in SideloaderRCLONE.games)
|
||||
{
|
||||
if (gameName.Equals(game[SideloaderRCLONE.GameNameIndex]))
|
||||
return game[SideloaderRCLONE.PackageNameIndex];
|
||||
if (gameName.Equals(game[SideloaderRCLONE.ReleaseNameIndex]))
|
||||
return game[SideloaderRCLONE.PackageNameIndex];
|
||||
}
|
||||
return gameName;
|
||||
}
|
||||
|
||||
public static string PackageNametoGameName(string gameName)
|
||||
{
|
||||
foreach (string[] game in SideloaderRCLONE.games)
|
||||
{
|
||||
if (gameName.Equals(game[SideloaderRCLONE.PackageNameIndex]))
|
||||
return game[SideloaderRCLONE.ReleaseNameIndex];
|
||||
}
|
||||
return gameName;
|
||||
}
|
||||
|
||||
public static string gameNameToSimpleName(string gameName)
|
||||
{
|
||||
foreach (string[] game in SideloaderRCLONE.games)
|
||||
{
|
||||
if (gameName.Equals(game[SideloaderRCLONE.GameNameIndex]))
|
||||
return game[SideloaderRCLONE.GameNameIndex];
|
||||
if (gameName.Equals(game[SideloaderRCLONE.ReleaseNameIndex]))
|
||||
return game[SideloaderRCLONE.GameNameIndex];
|
||||
}
|
||||
return gameName;
|
||||
}
|
||||
|
||||
public static string PackageNameToSimpleName(string gameName)
|
||||
{
|
||||
foreach (string[] game in SideloaderRCLONE.games)
|
||||
{
|
||||
if (gameName.Contains(game[SideloaderRCLONE.PackageNameIndex]))
|
||||
return game[SideloaderRCLONE.GameNameIndex];
|
||||
}
|
||||
return gameName;
|
||||
}
|
||||
|
||||
|
||||
//Downloads the required files
|
||||
public static void downloadFiles()
|
||||
{
|
||||
var client = new WebClient();
|
||||
ServicePointManager.Expect100Continue = true;
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
|
||||
try
|
||||
{
|
||||
if (!File.Exists("Sideloader Launcher.exe"))
|
||||
client.DownloadFile("https://github.com/nerdunit/androidsideloader/raw/master/Sideloader%20Launcher.exe", "Sideloader Launcher.exe");
|
||||
|
||||
if (!File.Exists("Rookie Offline.cmd"))
|
||||
client.DownloadFile("https://github.com/nerdunit/androidsideloader/raw/master/Rookie%20Offline.cmd", "Rookie Offline.cmd");
|
||||
|
||||
if (!File.Exists("C:\\RSL\\platform-tools\\aug2021.txt") || !File.Exists("C:\\RSL\\platform-tools\\adb.exe")) //if adb is not updated, download and auto extract
|
||||
{
|
||||
if (Directory.Exists($"C:\\RSL\\2.8.2"))
|
||||
Directory.Delete("C:\\RSL\\2.8.2", true);
|
||||
if (Directory.Exists($"{Properties.Settings.Default.MainDir}\\adb"))
|
||||
Directory.Delete($"{Properties.Settings.Default.MainDir}\\adb", true);
|
||||
if (!Directory.Exists("C:\\RSL\\platform-tools"))
|
||||
Directory.CreateDirectory("C:\\RSL\\platform-tools");
|
||||
client.DownloadFile("https://github.com/nerdunit/androidsideloader/raw/master/adb2.zip", "Ad.7z");
|
||||
Utilities.Zip.ExtractFile(Environment.CurrentDirectory + "\\Ad.7z", "C:\\RSL\\platform-tools");
|
||||
File.Delete("Ad.7z");
|
||||
}
|
||||
|
||||
if (!Directory.Exists(Environment.CurrentDirectory + "\\rclone"))
|
||||
{
|
||||
string url;
|
||||
if (Environment.Is64BitOperatingSystem)
|
||||
url = "https://downloads.rclone.org/v1.55.1/rclone-v1.55.1-windows-amd64.zip";
|
||||
else
|
||||
url = "https://downloads.rclone.org/v1.55.1/rclone-v1.55.1-windows-386.zip";
|
||||
//Since sideloader is build for x86, it should work on both x86 and x64 so we download the according rclone version
|
||||
|
||||
client.DownloadFile(url, "rclone.zip");
|
||||
|
||||
Utilities.Zip.ExtractFile(Environment.CurrentDirectory + "\\rclone.zip", Environment.CurrentDirectory);
|
||||
|
||||
File.Delete("rclone.zip");
|
||||
|
||||
string[] folders = Directory.GetDirectories(Environment.CurrentDirectory);
|
||||
foreach (string folder in folders)
|
||||
{
|
||||
if (folder.Contains("rclone"))
|
||||
{
|
||||
Directory.Move(folder, "rclone");
|
||||
break; //only 1 rclone folder
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch
|
||||
{
|
||||
FlexibleMessageBox.Show("Your internet is not working properly or rclone/github servers are down, some files may be missing (adb, rclone or launcher)");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
using JR.Utils.GUI.Forms;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Management;
|
||||
using System.Net;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
internal class Sideloader
|
||||
{
|
||||
public static string TempFolder = Path.Combine(Environment.CurrentDirectory, "temp");
|
||||
public static string CrashLogPath = "crashlog.txt";
|
||||
|
||||
public static void killWebView2()
|
||||
{
|
||||
var parentProcessId = Process.GetCurrentProcess().Id;
|
||||
var processes = Process.GetProcessesByName("msedgewebview2");
|
||||
|
||||
foreach (var process in processes)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (ManagementObject obj = new ManagementObject($"win32_process.handle='{process.Id}'"))
|
||||
{
|
||||
obj.Get();
|
||||
var ppid = Convert.ToInt32(obj["ParentProcessId"]);
|
||||
|
||||
if (ppid == parentProcessId)
|
||||
{
|
||||
process.Kill();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_ = Logger.Log($"Exception occured while attempting to shut down WebView2 with exception message: {ex.Message}", LogLevel.ERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//push user.json to device (required for some devices like oculus quest)
|
||||
public static void PushUserJsons()
|
||||
{
|
||||
foreach (string userJson in UsernameForm.userJsons)
|
||||
{
|
||||
UsernameForm.createUserJsonByName(Utilities.GeneralUtilities.randomString(16), userJson);
|
||||
_ = ADB.RunAdbCommandToString("push \"" + Environment.CurrentDirectory + $"\\{userJson}\" " + " /sdcard/");
|
||||
File.Delete(userJson);
|
||||
}
|
||||
}
|
||||
|
||||
//List of all installed package names from connected device
|
||||
//public static List<string> InstalledPackageNames = new List<string>(); //Remove folder from device
|
||||
public static ProcessOutput RemoveFolder(string path)
|
||||
{
|
||||
if (path == "/sdcard/Android/obb/" || path == "sdcard/Android/data/")
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return ADB.RunAdbCommandToString($"shell rm -r {path}");
|
||||
}
|
||||
|
||||
public static ProcessOutput RemoveFile(string path)
|
||||
{
|
||||
return ADB.RunAdbCommandToString($"shell rm -f {path}");
|
||||
}
|
||||
|
||||
//For games that require manual install, like having another folder that isnt an obb
|
||||
public static ProcessOutput RunADBCommandsFromFile(string path)
|
||||
{
|
||||
ProcessOutput output = new ProcessOutput();
|
||||
string[] commands = File.ReadAllLines(path);
|
||||
string currfolder = Path.GetDirectoryName(path);
|
||||
string[] zipz = Directory.GetFiles(currfolder, "*.7z", SearchOption.AllDirectories);
|
||||
foreach (string zip in zipz)
|
||||
{
|
||||
Utilities.Zip.ExtractFile($"{zip}", currfolder);
|
||||
}
|
||||
foreach (string cmd in commands)
|
||||
{
|
||||
if (cmd.StartsWith("adb"))
|
||||
{
|
||||
string replacement = "";
|
||||
string pattern = "adb";
|
||||
replacement = ADB.DeviceID.Length > 1
|
||||
? $"{Properties.Settings.Default.ADBPath} -s {ADB.DeviceID}"
|
||||
: $"{Properties.Settings.Default.ADBPath}";
|
||||
Regex rgx = new Regex(pattern);
|
||||
string result = rgx.Replace(cmd, replacement);
|
||||
Program.form.changeTitle($"Running {result}");
|
||||
_ = Logger.Log($"Logging command: {result} from file: {path}");
|
||||
output += ADB.RunAdbCommandToStringWOADB(result, path);
|
||||
if (output.Error.Contains("mkdir"))
|
||||
{
|
||||
output.Error = "";
|
||||
}
|
||||
|
||||
if (output.Output.Contains("reserved"))
|
||||
{
|
||||
output.Output = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
output.Output += "Custom install successful!";
|
||||
return output;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//Recursive sideload any apk fileD
|
||||
public static ProcessOutput RecursiveOutput = new ProcessOutput();
|
||||
public static void RecursiveSideload(string FolderPath)
|
||||
{
|
||||
try
|
||||
{
|
||||
foreach (string f in Directory.GetFiles(FolderPath))
|
||||
{
|
||||
if (Path.GetExtension(f) == ".apk")
|
||||
{
|
||||
RecursiveOutput += ADB.Sideload(f);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (string d in Directory.GetDirectories(FolderPath))
|
||||
{
|
||||
RecursiveSideload(d);
|
||||
}
|
||||
}
|
||||
catch (Exception ex) { _ = Logger.Log(ex.Message, LogLevel.ERROR); }
|
||||
}
|
||||
|
||||
//Recursive copy any obb folder
|
||||
public static void RecursiveCopyOBB(string FolderPath)
|
||||
{
|
||||
try
|
||||
{
|
||||
foreach (string f in Directory.GetFiles(FolderPath))
|
||||
{
|
||||
RecursiveOutput += ADB.CopyOBB(f);
|
||||
}
|
||||
|
||||
foreach (string d in Directory.GetDirectories(FolderPath))
|
||||
{
|
||||
RecursiveCopyOBB(d);
|
||||
}
|
||||
}
|
||||
catch (Exception ex) { _ = Logger.Log(ex.Message, LogLevel.ERROR); }
|
||||
}
|
||||
|
||||
// Removes the game package and its OBB + Data Folders.
|
||||
public static ProcessOutput UninstallGame(string packagename)
|
||||
{
|
||||
ProcessOutput output = ADB.UninstallPackage(packagename);
|
||||
Program.form.changeTitle("");
|
||||
_ = Sideloader.RemoveFolder("/sdcard/Android/obb/" + packagename);
|
||||
_ = Sideloader.RemoveFolder("/sdcard/Android/data/" + packagename);
|
||||
return output;
|
||||
}
|
||||
|
||||
public static void BackupGame(string packagename)
|
||||
{
|
||||
if (!Properties.Settings.Default.customBackupDir)
|
||||
{
|
||||
MainForm.backupFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), $"Rookie Backups");
|
||||
}
|
||||
else
|
||||
{
|
||||
MainForm.backupFolder = Path.Combine((Properties.Settings.Default.backupDir), $"Rookie Backups");
|
||||
}
|
||||
if (!Directory.Exists(MainForm.backupFolder))
|
||||
{
|
||||
_ = Directory.CreateDirectory(MainForm.backupFolder);
|
||||
}
|
||||
Program.form.changeTitle($"Attempting to backup any savedata to {MainForm.backupFolder}\\Rookie Backups...");
|
||||
_ = new ProcessOutput("", "");
|
||||
string date_str = DateTime.Today.ToString("yyyy.MM.dd");
|
||||
string CurrBackups = Path.Combine(MainForm.backupFolder, date_str);
|
||||
if (!Directory.Exists(CurrBackups))
|
||||
{
|
||||
_ = Directory.CreateDirectory(CurrBackups);
|
||||
}
|
||||
_ = ADB.RunAdbCommandToString($"pull \"/sdcard/Android/data/{packagename}\" \"{CurrBackups}\"");
|
||||
}
|
||||
|
||||
public static ProcessOutput DeleteFile(string GameName)
|
||||
{
|
||||
ProcessOutput output = new ProcessOutput("", "");
|
||||
|
||||
string packageName = Sideloader.gameNameToPackageName(GameName);
|
||||
|
||||
DialogResult dialogResult = FlexibleMessageBox.Show(Program.form, $"Are you sure you want to uninstall custom QU settings for {packageName}? this CANNOT be undone!", "WARNING!", MessageBoxButtons.YesNo);
|
||||
if (dialogResult != DialogResult.Yes)
|
||||
{
|
||||
return output;
|
||||
}
|
||||
|
||||
output = Sideloader.RemoveFile($"/sdcard/Android/data/{packageName}/private/Config.Json");
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
//Extracts apk from device, saves it by package name to sideloader folder
|
||||
public static ProcessOutput getApk(string GameName)
|
||||
{
|
||||
_ = new ProcessOutput("", "");
|
||||
|
||||
string packageName = Sideloader.gameNameToPackageName(GameName);
|
||||
|
||||
ProcessOutput output = ADB.RunAdbCommandToString("shell pm path " + packageName);
|
||||
|
||||
string apkPath = output.Output; //Get apk
|
||||
|
||||
apkPath = apkPath.Remove(apkPath.Length - 1);
|
||||
apkPath = apkPath.Remove(0, 8); //remove package:
|
||||
apkPath = apkPath.Remove(apkPath.Length - 1);
|
||||
if (File.Exists($"{Properties.Settings.Default.ADBFolder}\\base.apk"))
|
||||
{
|
||||
File.Delete($"{Properties.Settings.Default.ADBFolder}\\base.apk");
|
||||
}
|
||||
|
||||
if (File.Exists($"{Properties.Settings.Default.MainDir}\\{packageName}\\{packageName}.apk"))
|
||||
{
|
||||
File.Delete($"{Properties.Settings.Default.MainDir}\\{packageName}\\{packageName}.apk");
|
||||
}
|
||||
|
||||
output += ADB.RunAdbCommandToString("pull " + apkPath); //pull apk
|
||||
|
||||
if (Directory.Exists($"{Properties.Settings.Default.MainDir}\\{packageName}"))
|
||||
{
|
||||
Directory.Delete($"{Properties.Settings.Default.MainDir}\\{packageName}", true);
|
||||
}
|
||||
|
||||
_ = Directory.CreateDirectory($"{Properties.Settings.Default.MainDir}\\{packageName}");
|
||||
|
||||
File.Move($"{Properties.Settings.Default.ADBFolder}\\base.apk", $"{Properties.Settings.Default.MainDir}\\{packageName}\\{packageName}.apk");
|
||||
return output;
|
||||
}
|
||||
|
||||
public static string gameNameToPackageName(string gameName)
|
||||
{
|
||||
foreach (string[] game in SideloaderRCLONE.games)
|
||||
{
|
||||
if (gameName.Equals(game[SideloaderRCLONE.GameNameIndex]) || gameName.Equals(game[SideloaderRCLONE.ReleaseNameIndex]))
|
||||
return game[SideloaderRCLONE.PackageNameIndex];
|
||||
}
|
||||
return gameName;
|
||||
}
|
||||
|
||||
public static string PackageNametoGameName(string packageName)
|
||||
{
|
||||
foreach (string[] game in SideloaderRCLONE.games)
|
||||
{
|
||||
if (packageName.Equals(game[SideloaderRCLONE.PackageNameIndex]))
|
||||
return game[SideloaderRCLONE.ReleaseNameIndex];
|
||||
}
|
||||
return packageName;
|
||||
}
|
||||
|
||||
public static string gameNameToSimpleName(string gameName)
|
||||
{
|
||||
foreach (string[] game in SideloaderRCLONE.games)
|
||||
{
|
||||
if (gameName.Equals(game[SideloaderRCLONE.GameNameIndex]) || gameName.Equals(game[SideloaderRCLONE.ReleaseNameIndex]))
|
||||
return game[SideloaderRCLONE.GameNameIndex];
|
||||
}
|
||||
return gameName;
|
||||
}
|
||||
|
||||
public static string PackageNameToSimpleName(string packageName)
|
||||
{
|
||||
foreach (string[] game in SideloaderRCLONE.games)
|
||||
{
|
||||
if (packageName.Contains(game[SideloaderRCLONE.PackageNameIndex]))
|
||||
return game[SideloaderRCLONE.GameNameIndex];
|
||||
}
|
||||
return packageName;
|
||||
}
|
||||
|
||||
// Download required dependencies.
|
||||
public static void downloadFiles()
|
||||
{
|
||||
WebClient client = new WebClient();
|
||||
ServicePointManager.Expect100Continue = true;
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
|
||||
var currentAccessedWebsite = "";
|
||||
try
|
||||
{
|
||||
if (!File.Exists("Sideloader Launcher.exe"))
|
||||
{
|
||||
currentAccessedWebsite = "github";
|
||||
_ = Logger.Log($"Missing 'Sideloader Launcher.exe'. Attempting to download from {currentAccessedWebsite}");
|
||||
client.DownloadFile("https://github.com/VRPirates/rookie/raw/master/Sideloader%20Launcher.exe", "Sideloader Launcher.exe");
|
||||
_ = Logger.Log($"'Sideloader Launcher.exe' download successful");
|
||||
}
|
||||
|
||||
if (!File.Exists("Rookie Offline.cmd"))
|
||||
{
|
||||
currentAccessedWebsite = "github";
|
||||
_ = Logger.Log($"Missing 'Rookie Offline.cmd'. Attempting to download from {currentAccessedWebsite}");
|
||||
client.DownloadFile("https://github.com/VRPirates/rookie/raw/master/Rookie%20Offline.cmd", "Rookie Offline.cmd");
|
||||
_ = Logger.Log($"'Rookie Offline.cmd' download successful");
|
||||
}
|
||||
|
||||
if (!File.Exists($"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools\\adb.exe")) //if adb is not updated, download and auto extract
|
||||
{
|
||||
if (!Directory.Exists($"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools"))
|
||||
{
|
||||
_ = Directory.CreateDirectory($"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools");
|
||||
}
|
||||
|
||||
currentAccessedWebsite = "github";
|
||||
_ = Logger.Log($"Missing adb within {Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools. Attempting to download from {currentAccessedWebsite}");
|
||||
client.DownloadFile("https://github.com/VRPirates/rookie/raw/master/adb2.zip", "_adb.7z");
|
||||
Utilities.Zip.ExtractFile(Path.Combine(Environment.CurrentDirectory, "_adb.7z"), $"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools");
|
||||
File.Delete("_adb.7z");
|
||||
_ = Logger.Log($"adb download successful");
|
||||
}
|
||||
|
||||
if (!Directory.Exists(Path.Combine(Environment.CurrentDirectory, "rclone")))
|
||||
{
|
||||
currentAccessedWebsite = "rclone";
|
||||
_ = Logger.Log($"Missing rclone. Attempting to download from {currentAccessedWebsite}.org");
|
||||
string url = Environment.Is64BitOperatingSystem
|
||||
? "https://downloads.rclone.org/v1.62.2/rclone-v1.62.2-windows-amd64.zip"
|
||||
: "https://downloads.rclone.org/v1.62.2/rclone-v1.62.2-windows-386.zip";
|
||||
//Since sideloader is build for x86, it should work on both x86 and x64 so we download the according rclone version
|
||||
|
||||
_ = Logger.Log("Begin download rclone");
|
||||
client.DownloadFile(url, "rclone.zip");
|
||||
_ = Logger.Log("Complete download rclone");
|
||||
|
||||
_ = Logger.Log($"Extract {Environment.CurrentDirectory}\\rclone.zip");
|
||||
Utilities.Zip.ExtractFile(Path.Combine(Environment.CurrentDirectory, "rclone.zip"), Environment.CurrentDirectory);
|
||||
|
||||
File.Delete("rclone.zip");
|
||||
|
||||
string[] folders = Directory.GetDirectories(Environment.CurrentDirectory);
|
||||
foreach (string folder in folders)
|
||||
{
|
||||
if (folder.Contains("rclone"))
|
||||
{
|
||||
Directory.Move(folder, "rclone");
|
||||
break; //only 1 rclone folder
|
||||
}
|
||||
}
|
||||
_ = Logger.Log($"rclone download successful");
|
||||
}
|
||||
else
|
||||
{
|
||||
_ = Logger.Log($"Checking for Local rclone...");
|
||||
string pathToRclone = Path.Combine(Environment.CurrentDirectory, "rclone", "rclone.exe");
|
||||
if (File.Exists(pathToRclone))
|
||||
{
|
||||
var versionInfo = FileVersionInfo.GetVersionInfo(pathToRclone);
|
||||
string version = versionInfo.ProductVersion;
|
||||
Logger.Log($"Current RCLONE Version {version}");
|
||||
if (!MainForm.noRcloneUpdating)
|
||||
{
|
||||
if (version != "1.62.2")
|
||||
{
|
||||
Logger.Log($"RCLONE Version does not match ({version})! Downloading required version (1.62.2)", LogLevel.WARNING);
|
||||
File.Delete(pathToRclone);
|
||||
currentAccessedWebsite = "rclone";
|
||||
string architecture = Environment.Is64BitOperatingSystem ? "amd64" : "386";
|
||||
string url = $"https://downloads.rclone.org/v1.62.2/rclone-v1.62.2-windows-{architecture}.zip";
|
||||
client.DownloadFile(url, "rclone.zip");
|
||||
Utilities.Zip.ExtractFile(Path.Combine(Environment.CurrentDirectory, "rclone.zip"), Environment.CurrentDirectory);
|
||||
File.Delete("rclone.zip");
|
||||
string rcloneDirectory = Path.Combine(Environment.CurrentDirectory, $"rclone-v1.62.2-windows-{architecture}");
|
||||
File.Move(Path.Combine(rcloneDirectory, "rclone.exe"), pathToRclone);
|
||||
Directory.Delete(rcloneDirectory, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (currentAccessedWebsite == "github")
|
||||
{
|
||||
_ = FlexibleMessageBox.Show($"You are unable to access the raw.githubusercontent.com page with the Exception: {ex.Message}\nSome files may be missing (ADB, Offline Script, Launcher)");
|
||||
_ = FlexibleMessageBox.Show("These required files were unable to be downloaded\nRookie will now close, please use Offline Mode for manual sideloading if needed");
|
||||
Application.Exit();
|
||||
}
|
||||
if (currentAccessedWebsite == "rclone")
|
||||
{
|
||||
_ = FlexibleMessageBox.Show($"You are unable to access the rclone page with the Exception: {ex.Message}\nSome files may be missing (RCLONE)");
|
||||
_ = FlexibleMessageBox.Show("Rclone was unable to be downloaded\nRookie will now close, please use Offline Mode for manual sideloading if needed");
|
||||
Application.Exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AndroidSideloader
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
public class ProcessOutput
|
||||
{
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
using System;
|
||||
using AndroidSideloader.Utilities;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Security.Cryptography;
|
||||
using AndroidSideloader.Utilities;
|
||||
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
class rcloneFolder
|
||||
internal class rcloneFolder
|
||||
{
|
||||
public string Path { get; set; }
|
||||
public string Name { get; set; }
|
||||
@@ -16,7 +17,7 @@ namespace AndroidSideloader
|
||||
public string ModTime { get; set; }
|
||||
}
|
||||
|
||||
class SideloaderRCLONE
|
||||
internal class SideloaderRCLONE
|
||||
{
|
||||
public static List<string> RemotesList = new List<string>();
|
||||
|
||||
@@ -41,56 +42,67 @@ namespace AndroidSideloader
|
||||
*/
|
||||
public static List<string[]> games = new List<string[]>();
|
||||
|
||||
public static string Nouns = Environment.CurrentDirectory + "\\nouns";
|
||||
public static string ThumbnailsFolder = Environment.CurrentDirectory + "\\thumbnails";
|
||||
public static string NotesFolder = Environment.CurrentDirectory + "\\notes";
|
||||
public static string Nouns = Path.Combine(Environment.CurrentDirectory, "nouns");
|
||||
public static string ThumbnailsFolder = Path.Combine(Environment.CurrentDirectory, "thumbnails");
|
||||
public static string NotesFolder = Path.Combine(Environment.CurrentDirectory, "notes");
|
||||
|
||||
public static void UpdateNouns(string remote)
|
||||
{
|
||||
Logger.Log($"Updating Nouns");
|
||||
RCLONE.runRcloneCommand_DownloadConfig($"sync \"{remote}:{RcloneGamesFolder}/.meta/nouns\" \"{Nouns}\"");
|
||||
_ = Logger.Log($"Updating Nouns");
|
||||
_ = RCLONE.runRcloneCommand_DownloadConfig($"sync \"{remote}:{RcloneGamesFolder}/.meta/nouns\" \"{Nouns}\"");
|
||||
}
|
||||
|
||||
public static void UpdateGamePhotos(string remote)
|
||||
{
|
||||
Logger.Log($"Updating Thumbnails");
|
||||
RCLONE.runRcloneCommand_DownloadConfig($"sync \"{remote}:{RcloneGamesFolder}/.meta/thumbnails\" \"{ThumbnailsFolder}\"");
|
||||
_ = Logger.Log($"Updating Thumbnails");
|
||||
_ = RCLONE.runRcloneCommand_DownloadConfig($"sync \"{remote}:{RcloneGamesFolder}/.meta/thumbnails\" \"{ThumbnailsFolder}\"");
|
||||
}
|
||||
|
||||
public static void UpdateGameNotes(string remote)
|
||||
{
|
||||
Logger.Log($"Updating Game Notes");
|
||||
RCLONE.runRcloneCommand_DownloadConfig($"sync \"{remote}:{RcloneGamesFolder}/.meta/notes\" \"{NotesFolder}\"");
|
||||
_ = Logger.Log($"Updating Game Notes");
|
||||
_ = RCLONE.runRcloneCommand_DownloadConfig($"sync \"{remote}:{RcloneGamesFolder}/.meta/notes\" \"{NotesFolder}\"");
|
||||
}
|
||||
|
||||
public static void UpdateMetadataFromPublic()
|
||||
{
|
||||
Logger.Log($"Downloading Metadata");
|
||||
var rclonecommand =
|
||||
_ = Logger.Log($"Downloading Metadata");
|
||||
string rclonecommand =
|
||||
$"sync \":http:/meta.7z\" \"{Environment.CurrentDirectory}\"";
|
||||
RCLONE.runRcloneCommand_PublicConfig(rclonecommand);
|
||||
_ = RCLONE.runRcloneCommand_PublicConfig(rclonecommand);
|
||||
}
|
||||
|
||||
public static void ProcessMetadataFromPublic()
|
||||
{
|
||||
try
|
||||
{
|
||||
Logger.Log($"Extracting Metadata");
|
||||
Zip.ExtractFile($"{Environment.CurrentDirectory}\\meta.7z", $"{Environment.CurrentDirectory}\\meta",
|
||||
_ = Logger.Log($"Extracting Metadata");
|
||||
Zip.ExtractFile(Path.Combine(Environment.CurrentDirectory, "meta.7z"), Path.Combine(Environment.CurrentDirectory, "meta"),
|
||||
MainForm.PublicConfigFile.Password);
|
||||
|
||||
Logger.Log($"Updating Metadata");
|
||||
_ = Logger.Log($"Updating Metadata");
|
||||
|
||||
if (Directory.Exists(Nouns)) Directory.Delete(Nouns, true);
|
||||
if (Directory.Exists(ThumbnailsFolder)) Directory.Delete(ThumbnailsFolder, true);
|
||||
if (Directory.Exists(NotesFolder)) Directory.Delete(NotesFolder, true);
|
||||
if (Directory.Exists(Nouns))
|
||||
{
|
||||
Directory.Delete(Nouns, true);
|
||||
}
|
||||
|
||||
Directory.Move($"{Environment.CurrentDirectory}\\meta\\.meta\\nouns", Nouns);
|
||||
Directory.Move($"{Environment.CurrentDirectory}\\meta\\.meta\\thumbnails", ThumbnailsFolder);
|
||||
Directory.Move($"{Environment.CurrentDirectory}\\meta\\.meta\\notes", NotesFolder);
|
||||
if (Directory.Exists(ThumbnailsFolder))
|
||||
{
|
||||
Directory.Delete(ThumbnailsFolder, true);
|
||||
}
|
||||
|
||||
Logger.Log($"Initializing Games List");
|
||||
var gameList = File.ReadAllText($"{Environment.CurrentDirectory}\\meta\\VRP-GameList.txt");
|
||||
if (Directory.Exists(NotesFolder))
|
||||
{
|
||||
Directory.Delete(NotesFolder, true);
|
||||
}
|
||||
|
||||
Directory.Move(Path.Combine(Environment.CurrentDirectory, "meta", ".meta", "nouns"), Nouns);
|
||||
Directory.Move(Path.Combine(Environment.CurrentDirectory, "meta", ".meta", "thumbnails"), ThumbnailsFolder);
|
||||
Directory.Move(Path.Combine(Environment.CurrentDirectory, "meta", ".meta", "notes"), NotesFolder);
|
||||
|
||||
_ = Logger.Log($"Initializing Games List");
|
||||
string gameList = File.ReadAllText(Path.Combine(Environment.CurrentDirectory, "meta", "VRP-GameList.txt"));
|
||||
|
||||
string[] splitList = gameList.Split('\n');
|
||||
splitList = splitList.Skip(1).ToArray();
|
||||
@@ -103,30 +115,30 @@ namespace AndroidSideloader
|
||||
}
|
||||
}
|
||||
|
||||
Directory.Delete($"{Environment.CurrentDirectory}\\meta", true);
|
||||
Directory.Delete(Path.Combine(Environment.CurrentDirectory, "meta"), true);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.Log(e.Message);
|
||||
Logger.Log(e.StackTrace);
|
||||
_ = Logger.Log(e.Message);
|
||||
_ = Logger.Log(e.StackTrace);
|
||||
}
|
||||
}
|
||||
|
||||
public static void RefreshRemotes()
|
||||
{
|
||||
Logger.Log($"Refresh / List Remotes");
|
||||
_ = Logger.Log($"Refresh / List Remotes");
|
||||
RemotesList.Clear();
|
||||
var remotes = RCLONE.runRcloneCommand_DownloadConfig("listremotes").Output.Split('\n');
|
||||
string[] remotes = RCLONE.runRcloneCommand_DownloadConfig("listremotes").Output.Split('\n');
|
||||
|
||||
Logger.Log("Loaded following remotes: ");
|
||||
_ = Logger.Log("Loaded following remotes: ");
|
||||
foreach (string r in remotes)
|
||||
{
|
||||
if (r.Length > 1)
|
||||
{
|
||||
var remote = r.Remove(r.Length - 1);
|
||||
string remote = r.Remove(r.Length - 1);
|
||||
if (remote.Contains("mirror"))
|
||||
{
|
||||
Logger.Log(remote);
|
||||
_ = Logger.Log(remote);
|
||||
RemotesList.Add(remote);
|
||||
}
|
||||
}
|
||||
@@ -135,8 +147,8 @@ namespace AndroidSideloader
|
||||
|
||||
public static void initGames(string remote)
|
||||
{
|
||||
Logger.Log($"Initializing Games List");
|
||||
|
||||
_ = Logger.Log($"Initializing Games List");
|
||||
|
||||
gameProperties.Clear();
|
||||
games.Clear();
|
||||
string tempGameList = RCLONE.runRcloneCommand_DownloadConfig($"cat \"{remote}:{RcloneGamesFolder}/VRP-GameList.txt\"").Output;
|
||||
@@ -165,50 +177,63 @@ namespace AndroidSideloader
|
||||
| SecurityProtocolType.Tls11
|
||||
| SecurityProtocolType.Tls12
|
||||
| SecurityProtocolType.Ssl3;
|
||||
Logger.Log($"Attempting to Update Download Config");
|
||||
_ = Logger.Log($"Attempting to Update Download Config");
|
||||
try
|
||||
{
|
||||
string configUrl = "https://wiki.vrpirates.club/downloads/vrp.download.config";
|
||||
string configUrl = "https://vrpirates.wiki/downloads/vrp.download.config";
|
||||
|
||||
HttpWebRequest getUrl = (HttpWebRequest)WebRequest.Create(configUrl);
|
||||
using (StreamReader responseReader = new StreamReader(getUrl.GetResponse().GetResponseStream()))
|
||||
{
|
||||
string resultString = responseReader.ReadToEnd();
|
||||
|
||||
Logger.Log($"Retrived updated config from: {configUrl}");
|
||||
_ = Logger.Log($"Retrieved updated config from: {configUrl}");
|
||||
|
||||
if (File.Exists(Environment.CurrentDirectory + "\\rclone\\vrp.download.config_new"))
|
||||
File.Delete(Environment.CurrentDirectory + "\\rclone\\vrp.download.config_new");
|
||||
File.Create(Environment.CurrentDirectory + "\\rclone\\vrp.download.config_new").Close();
|
||||
File.WriteAllText(Environment.CurrentDirectory + "\\rclone\\vrp.download.config_new", resultString);
|
||||
if (File.Exists(Path.Combine(Environment.CurrentDirectory, "rclone", "vrp.download.config_new")))
|
||||
{
|
||||
File.Delete(Path.Combine(Environment.CurrentDirectory, "rclone", "vrp.download.config_new"));
|
||||
}
|
||||
|
||||
if (!File.Exists(Environment.CurrentDirectory + "\\rclone\\hash.txt"))
|
||||
File.Create(Environment.CurrentDirectory + "\\rclone\\hash.txt").Close();
|
||||
File.Create(Path.Combine(Environment.CurrentDirectory, "rclone", "vrp.download.config_new")).Close();
|
||||
File.WriteAllText(Path.Combine(Environment.CurrentDirectory, "rclone", "vrp.download.config_new"), resultString);
|
||||
|
||||
string newConfig = CalculateMD5(Environment.CurrentDirectory + "\\rclone\\vrp.download.config_new");
|
||||
string oldConfig = File.ReadAllText(Environment.CurrentDirectory + "\\rclone\\hash.txt");
|
||||
if (!File.Exists(Path.Combine(Environment.CurrentDirectory, "rclone", "hash.txt")))
|
||||
{
|
||||
File.Create(Path.Combine(Environment.CurrentDirectory, "rclone", "hash.txt")).Close();
|
||||
}
|
||||
|
||||
if (!File.Exists(Environment.CurrentDirectory + "\\rclone\\vrp.download.config"))
|
||||
string newConfig = CalculateMD5(Path.Combine(Environment.CurrentDirectory, "rclone", "vrp.download.config_new"));
|
||||
string oldConfig = File.ReadAllText(Path.Combine(Environment.CurrentDirectory, "rclone", "hash.txt"));
|
||||
|
||||
if (!File.Exists(Path.Combine(Environment.CurrentDirectory, "rclone", "vrp.download.config")))
|
||||
{
|
||||
oldConfig = "Config Doesnt Exist!";
|
||||
}
|
||||
|
||||
Logger.Log($"Online Config Hash: {newConfig}; Local Config Hash: {oldConfig}");
|
||||
_ = Logger.Log($"Online Config Hash: {newConfig}; Local Config Hash: {oldConfig}");
|
||||
|
||||
if (newConfig != oldConfig)
|
||||
{
|
||||
Logger.Log($"Updated Config Hash is different than the current Config. Updating Configuration File.");
|
||||
_ = Logger.Log($"Updated Config Hash is different than the current Config. Updating Configuration File.");
|
||||
|
||||
if (File.Exists(Environment.CurrentDirectory + "\\rclone\\vrp.download.config"))
|
||||
File.Delete(Environment.CurrentDirectory + "\\rclone\\vrp.download.config");
|
||||
File.Move(Environment.CurrentDirectory + "\\rclone\\vrp.download.config_new", Environment.CurrentDirectory + "\\rclone\\vrp.download.config");
|
||||
if (File.Exists(Path.Combine(Environment.CurrentDirectory, "rclone", "vrp.download.config")))
|
||||
{
|
||||
File.Delete(Path.Combine(Environment.CurrentDirectory, "rclone", "vrp.download.config"));
|
||||
}
|
||||
|
||||
File.WriteAllText(Environment.CurrentDirectory + "\\rclone\\hash.txt", string.Empty);
|
||||
File.WriteAllText(Environment.CurrentDirectory + "\\rclone\\hash.txt", newConfig);
|
||||
} else
|
||||
File.Move(Path.Combine(Environment.CurrentDirectory, "rclone", "vrp.download.config_new"), Path.Combine(Environment.CurrentDirectory, "rclone", "vrp.download.config"));
|
||||
|
||||
File.WriteAllText(Path.Combine(Environment.CurrentDirectory, "rclone", "hash.txt"), string.Empty);
|
||||
File.WriteAllText(Path.Combine(Environment.CurrentDirectory, "rclone", "hash.txt"), newConfig);
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.Log($"Updated Config Hash matches last download. Not updating.");
|
||||
_ = Logger.Log($"Updated Config Hash matches last download. Not updating.");
|
||||
|
||||
if (File.Exists(Environment.CurrentDirectory + "\\rclone\\vrp.download.config_new"))
|
||||
File.Delete(Environment.CurrentDirectory + "\\rclone\\vrp.download.config_new");
|
||||
if (File.Exists(Path.Combine(Environment.CurrentDirectory, "rclone", "vrp.download.config_new")))
|
||||
{
|
||||
File.Delete(Path.Combine(Environment.CurrentDirectory, "rclone", "vrp.download.config_new"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -221,26 +246,26 @@ namespace AndroidSideloader
|
||||
| SecurityProtocolType.Tls11
|
||||
| SecurityProtocolType.Tls12
|
||||
| SecurityProtocolType.Ssl3;
|
||||
Logger.Log($"Attempting to Update Upload Config");
|
||||
_ = Logger.Log($"Attempting to Update Upload Config");
|
||||
try
|
||||
{
|
||||
string configUrl = "https://wiki.vrpirates.club/downloads/vrp.upload.config";
|
||||
string configUrl = "https://vrpirates.wiki/downloads/vrp.upload.config";
|
||||
|
||||
HttpWebRequest getUrl = (HttpWebRequest)WebRequest.Create(configUrl);
|
||||
using (StreamReader responseReader = new StreamReader(getUrl.GetResponse().GetResponseStream()))
|
||||
{
|
||||
string resultString = responseReader.ReadToEnd();
|
||||
|
||||
Logger.Log($"Retrived updated config from: {configUrl}");
|
||||
_ = Logger.Log($"Retrieved updated config from: {configUrl}");
|
||||
|
||||
File.WriteAllText(Environment.CurrentDirectory + "\\rclone\\vrp.upload.config", resultString);
|
||||
File.WriteAllText(Path.Combine(Environment.CurrentDirectory, "rclone", "vrp.upload.config"), resultString);
|
||||
|
||||
Logger.Log("Upload config updated successfully.");
|
||||
_ = Logger.Log("Upload config updated successfully.");
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.Log($"Failed to update Upload config: {e.Message}");
|
||||
_ = Logger.Log($"Failed to update Upload config: {e.Message}", LogLevel.ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -250,37 +275,54 @@ namespace AndroidSideloader
|
||||
| SecurityProtocolType.Tls11
|
||||
| SecurityProtocolType.Tls12
|
||||
| SecurityProtocolType.Ssl3;
|
||||
Logger.Log($"Attempting to Update Public Config");
|
||||
|
||||
_ = Logger.Log("Attempting to update public config from main.");
|
||||
|
||||
string configUrl = "https://raw.githubusercontent.com/vrpyou/quest/main/vrp-public.json";
|
||||
string fallbackUrl = "https://vrpirates.wiki/downloads/vrp-public.json";
|
||||
|
||||
try
|
||||
{
|
||||
string configUrl = "https://wiki.vrpirates.club/downloads/vrp-public.json";
|
||||
string resultString;
|
||||
|
||||
// Try fetching raw JSON data from the provided link
|
||||
HttpWebRequest getUrl = (HttpWebRequest)WebRequest.Create(configUrl);
|
||||
using (StreamReader responseReader = new StreamReader(getUrl.GetResponse().GetResponseStream()))
|
||||
{
|
||||
string resultString = responseReader.ReadToEnd();
|
||||
|
||||
Logger.Log($"Retrived updated config from: {configUrl}");
|
||||
|
||||
File.WriteAllText(Environment.CurrentDirectory + "\\vrp-public.json", resultString);
|
||||
|
||||
Logger.Log("Public config updated successfully.");
|
||||
resultString = responseReader.ReadToEnd();
|
||||
_ = Logger.Log($"Retrieved updated config from main: {configUrl}.");
|
||||
File.WriteAllText(Path.Combine(Environment.CurrentDirectory, "vrp-public.json"), resultString);
|
||||
_ = Logger.Log("Public config updated successfully from main.");
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception mainException)
|
||||
{
|
||||
Logger.Log($"Failed to update Public config: {e.Message}");
|
||||
_ = Logger.Log($"Failed to update public config from main: {mainException.Message}, trying fallback.", LogLevel.ERROR);
|
||||
try
|
||||
{
|
||||
HttpWebRequest getUrl = (HttpWebRequest)WebRequest.Create(fallbackUrl);
|
||||
using (StreamReader responseReader = new StreamReader(getUrl.GetResponse().GetResponseStream()))
|
||||
{
|
||||
string resultString = responseReader.ReadToEnd();
|
||||
_ = Logger.Log($"Retrieved updated config from fallback: {fallbackUrl}.");
|
||||
File.WriteAllText(Path.Combine(Environment.CurrentDirectory, "vrp-public.json"), resultString);
|
||||
_ = Logger.Log("Public config updated successfully from fallback.");
|
||||
}
|
||||
}
|
||||
catch (Exception fallbackException)
|
||||
{
|
||||
_ = Logger.Log($"Failed to update public config from fallback: {fallbackException.Message}.", LogLevel.ERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static string CalculateMD5(string filename)
|
||||
private static string CalculateMD5(string filename)
|
||||
{
|
||||
using (var md5 = MD5.Create())
|
||||
using (MD5 md5 = MD5.Create())
|
||||
{
|
||||
using (var stream = File.OpenRead(filename))
|
||||
using (FileStream stream = File.OpenRead(filename))
|
||||
{
|
||||
var hash = md5.ComputeHash(stream);
|
||||
byte[] hash = md5.ComputeHash(stream);
|
||||
return BitConverter.ToString(hash).Replace("-", "").ToLowerInvariant();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,22 +6,30 @@ using System.Text;
|
||||
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
class SideloaderUtilities
|
||||
internal class SideloaderUtilities
|
||||
{
|
||||
public static bool CheckFolderIsObb(string path)
|
||||
{
|
||||
string[] files = Directory.GetFiles(path);
|
||||
|
||||
foreach (string file in files)
|
||||
if (file.EndsWith(".obb") || Path.GetDirectoryName(file).Contains(".") && !Path.GetDirectoryName(file).Contains("_data"))
|
||||
{
|
||||
if (file.EndsWith(".obb") || (Path.GetDirectoryName(file).Contains(".") && !Path.GetDirectoryName(file).Contains("_data")))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private static string uuid = null;
|
||||
public static string UUID()
|
||||
{
|
||||
if (uuid != null) return uuid;
|
||||
if (uuid != null)
|
||||
{
|
||||
return uuid;
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
@@ -30,10 +38,10 @@ namespace AndroidSideloader
|
||||
|
||||
foreach (ManagementObject queryObj in searcher.Get())
|
||||
{
|
||||
sb.Append(queryObj["NumberOfCores"]);
|
||||
sb.Append(queryObj["ProcessorId"]);
|
||||
sb.Append(queryObj["Name"]);
|
||||
sb.Append(queryObj["SocketDesignation"]);
|
||||
_ = sb.Append(queryObj["NumberOfCores"]);
|
||||
_ = sb.Append(queryObj["ProcessorId"]);
|
||||
_ = sb.Append(queryObj["Name"]);
|
||||
_ = sb.Append(queryObj["SocketDesignation"]);
|
||||
}
|
||||
|
||||
searcher = new ManagementObjectSearcher("root\\CIMV2",
|
||||
@@ -41,9 +49,9 @@ namespace AndroidSideloader
|
||||
|
||||
foreach (ManagementObject queryObj in searcher.Get())
|
||||
{
|
||||
sb.Append(queryObj["Manufacturer"]);
|
||||
sb.Append(queryObj["Name"]);
|
||||
sb.Append(queryObj["Version"]);
|
||||
_ = sb.Append(queryObj["Manufacturer"]);
|
||||
_ = sb.Append(queryObj["Name"]);
|
||||
_ = sb.Append(queryObj["Version"]);
|
||||
|
||||
}
|
||||
|
||||
@@ -52,10 +60,10 @@ namespace AndroidSideloader
|
||||
|
||||
foreach (ManagementObject queryObj in searcher.Get())
|
||||
{
|
||||
sb.Append(queryObj["Product"]);
|
||||
_ = sb.Append(queryObj["Product"]);
|
||||
}
|
||||
|
||||
var bytes = Encoding.ASCII.GetBytes(sb.ToString());
|
||||
byte[] bytes = Encoding.ASCII.GetBytes(sb.ToString());
|
||||
SHA256Managed sha = new SHA256Managed();
|
||||
|
||||
byte[] hash = sha.ComputeHash(bytes);
|
||||
|
||||
10
Splash.Designer.cs
generated
10
Splash.Designer.cs
generated
@@ -28,18 +28,22 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Splash));
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// Splash
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackgroundImage = global::AndroidSideloader.Properties.Resources.splash;
|
||||
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
|
||||
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.CausesValidation = false;
|
||||
this.ClientSize = new System.Drawing.Size(640, 384);
|
||||
this.ClientSize = new System.Drawing.Size(427, 250);
|
||||
this.ControlBox = false;
|
||||
this.DoubleBuffered = true;
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.Name = "Splash";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
|
||||
10
Splash.cs
10
Splash.cs
@@ -1,12 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
|
||||
7141
Splash.resx
7141
Splash.resx
File diff suppressed because it is too large
Load Diff
118
SpoofForm.Designer.cs
generated
118
SpoofForm.Designer.cs
generated
@@ -1,118 +0,0 @@
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
partial class SpoofForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.PackageNameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.RandomizeButton = new System.Windows.Forms.Button();
|
||||
this.progressBar1 = new System.Windows.Forms.ProgressBar();
|
||||
this.SpoofButton = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// PackageNameTextBox
|
||||
//
|
||||
this.PackageNameTextBox.BackColor = global::AndroidSideloader.Properties.Settings.Default.TextBoxColor;
|
||||
this.PackageNameTextBox.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.PackageNameTextBox.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "TextBoxColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.PackageNameTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.PackageNameTextBox.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.PackageNameTextBox.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.PackageNameTextBox.Location = new System.Drawing.Point(13, 13);
|
||||
this.PackageNameTextBox.Name = "PackageNameTextBox";
|
||||
this.PackageNameTextBox.Size = new System.Drawing.Size(273, 24);
|
||||
this.PackageNameTextBox.TabIndex = 1;
|
||||
//
|
||||
// RandomizeButton
|
||||
//
|
||||
this.RandomizeButton.BackColor = global::AndroidSideloader.Properties.Settings.Default.SubButtonColor;
|
||||
this.RandomizeButton.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.RandomizeButton.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.RandomizeButton.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "SubButtonColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.RandomizeButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.RandomizeButton.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.RandomizeButton.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.RandomizeButton.Location = new System.Drawing.Point(12, 72);
|
||||
this.RandomizeButton.Name = "RandomizeButton";
|
||||
this.RandomizeButton.Size = new System.Drawing.Size(110, 42);
|
||||
this.RandomizeButton.TabIndex = 2;
|
||||
this.RandomizeButton.Text = "Randomize";
|
||||
this.RandomizeButton.UseVisualStyleBackColor = false;
|
||||
this.RandomizeButton.Click += new System.EventHandler(this.RandomizeButton_Click);
|
||||
//
|
||||
// progressBar1
|
||||
//
|
||||
this.progressBar1.Location = new System.Drawing.Point(13, 43);
|
||||
this.progressBar1.Name = "progressBar1";
|
||||
this.progressBar1.Size = new System.Drawing.Size(273, 23);
|
||||
this.progressBar1.TabIndex = 3;
|
||||
//
|
||||
// SpoofButton
|
||||
//
|
||||
this.SpoofButton.BackColor = global::AndroidSideloader.Properties.Settings.Default.SubButtonColor;
|
||||
this.SpoofButton.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.SpoofButton.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.SpoofButton.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "SubButtonColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.SpoofButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.SpoofButton.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.SpoofButton.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.SpoofButton.Location = new System.Drawing.Point(176, 72);
|
||||
this.SpoofButton.Name = "SpoofButton";
|
||||
this.SpoofButton.Size = new System.Drawing.Size(110, 42);
|
||||
this.SpoofButton.TabIndex = 4;
|
||||
this.SpoofButton.Text = "Spoof!";
|
||||
this.SpoofButton.UseVisualStyleBackColor = false;
|
||||
this.SpoofButton.Click += new System.EventHandler(this.SpoofButton_Click);
|
||||
//
|
||||
// SpoofForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = global::AndroidSideloader.Properties.Settings.Default.BackColor;
|
||||
this.ClientSize = new System.Drawing.Size(300, 131);
|
||||
this.Controls.Add(this.SpoofButton);
|
||||
this.Controls.Add(this.progressBar1);
|
||||
this.Controls.Add(this.RandomizeButton);
|
||||
this.Controls.Add(this.PackageNameTextBox);
|
||||
this.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "BackColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.MaximumSize = new System.Drawing.Size(316, 170);
|
||||
this.MinimumSize = new System.Drawing.Size(316, 170);
|
||||
this.Name = "SpoofForm";
|
||||
this.Text = "SpoofForm";
|
||||
this.Load += new System.EventHandler(this.SpoofForm_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private System.Windows.Forms.TextBox PackageNameTextBox;
|
||||
private System.Windows.Forms.Button RandomizeButton;
|
||||
private System.Windows.Forms.ProgressBar progressBar1;
|
||||
private System.Windows.Forms.Button SpoofButton;
|
||||
}
|
||||
}
|
||||
74
SpoofForm.cs
74
SpoofForm.cs
@@ -1,74 +0,0 @@
|
||||
using JR.Utils.GUI.Forms;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using Spoofer;
|
||||
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
public partial class SpoofForm : Form
|
||||
{
|
||||
public SpoofForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private async void SpoofButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!spoofer.HasDependencies())
|
||||
{
|
||||
MessageBox.Show("You are missing the dependencies... Cannot spoof games");
|
||||
return;
|
||||
}
|
||||
string NewPackageName = PackageNameTextBox.Text;
|
||||
string path;
|
||||
|
||||
using (OpenFileDialog openFileDialog = new OpenFileDialog())
|
||||
{
|
||||
openFileDialog.Filter = "Android apps (*.apk)|*.apk";
|
||||
openFileDialog.FilterIndex = 2;
|
||||
openFileDialog.RestoreDirectory = true;
|
||||
|
||||
if (openFileDialog.ShowDialog() == DialogResult.OK)
|
||||
path = openFileDialog.FileName;
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
||||
progressBar1.Style = ProgressBarStyle.Marquee;
|
||||
|
||||
string output = "";
|
||||
//Spawn spoofer in a new thread so the ui isn't blocked
|
||||
Thread t1 = new Thread(() =>
|
||||
{
|
||||
spoofer.Init();
|
||||
output += spoofer.SpoofApk(path, NewPackageName);
|
||||
});
|
||||
t1.IsBackground = true;
|
||||
t1.Start();
|
||||
|
||||
while (t1.IsAlive)
|
||||
await Task.Delay(100);
|
||||
|
||||
|
||||
|
||||
progressBar1.Style = ProgressBarStyle.Continuous;
|
||||
|
||||
if (output.Contains("is not recognized as an internal or external command"))
|
||||
FlexibleMessageBox.Show(Sideloader.SpooferWarning);
|
||||
else
|
||||
FlexibleMessageBox.Show($"App spoofed from {spoofer.originalPackageName} to {NewPackageName}");
|
||||
}
|
||||
|
||||
private void SpoofForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
PackageNameTextBox.Text = Utilities.GeneralUtilities.RandomPackageName();
|
||||
}
|
||||
|
||||
private void RandomizeButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
PackageNameTextBox.Text = Utilities.GeneralUtilities.RandomPackageName();
|
||||
}
|
||||
}
|
||||
}
|
||||
120
SpoofForm.resx
120
SpoofForm.resx
@@ -1,120 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
44
Transparenter.cs
Normal file
44
Transparenter.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
public class Transparenter
|
||||
{
|
||||
public static void MakeTransparent(Control control, Graphics g)
|
||||
{
|
||||
Control parent = control.Parent;
|
||||
if (parent == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Rectangle bounds = control.Bounds;
|
||||
Control.ControlCollection siblings = parent.Controls;
|
||||
int index = siblings.IndexOf(control);
|
||||
Bitmap behind = null;
|
||||
for (int i = siblings.Count - 1; i > index; i--)
|
||||
{
|
||||
Control c = siblings[i];
|
||||
if (!c.Bounds.IntersectsWith(bounds))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (behind == null)
|
||||
{
|
||||
behind = new Bitmap(control.Parent.ClientSize.Width, control.Parent.ClientSize.Height);
|
||||
}
|
||||
|
||||
c.DrawToBitmap(behind, c.Bounds);
|
||||
}
|
||||
if (behind == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
g.DrawImage(behind, control.ClientRectangle, bounds, GraphicsUnit.Pixel);
|
||||
behind.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
146
UpdateForm.Designer.cs
generated
146
UpdateForm.Designer.cs
generated
@@ -29,76 +29,62 @@ namespace AndroidSideloader
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.SkipUpdate = new System.Windows.Forms.Label();
|
||||
this.CurVerLabel = new System.Windows.Forms.Label();
|
||||
this.YesUpdate = new System.Windows.Forms.Button();
|
||||
this.UpdateVerLabel = new System.Windows.Forms.Label();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UpdateForm));
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.YesUpdate = new AndroidSideloader.RoundButton();
|
||||
this.panel3 = new System.Windows.Forms.Panel();
|
||||
this.UpdateTextBox = new System.Windows.Forms.RichTextBox();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.panel3.SuspendLayout();
|
||||
this.UpdateVerLabel = new System.Windows.Forms.Label();
|
||||
this.CurVerLabel = new System.Windows.Forms.Label();
|
||||
this.SkipUpdate = new System.Windows.Forms.Label();
|
||||
this.panel1.SuspendLayout();
|
||||
this.panel3.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// SkipUpdate
|
||||
// panel1
|
||||
//
|
||||
this.SkipUpdate.AutoSize = true;
|
||||
this.SkipUpdate.BackColor = System.Drawing.Color.Transparent;
|
||||
this.SkipUpdate.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F);
|
||||
this.SkipUpdate.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100)))));
|
||||
this.SkipUpdate.Location = new System.Drawing.Point(386, 279);
|
||||
this.SkipUpdate.Name = "SkipUpdate";
|
||||
this.SkipUpdate.Size = new System.Drawing.Size(64, 13);
|
||||
this.SkipUpdate.TabIndex = 4;
|
||||
this.SkipUpdate.Text = "skip for now";
|
||||
this.SkipUpdate.Click += new System.EventHandler(this.SkipUpdate_Click);
|
||||
//
|
||||
// CurVerLabel
|
||||
//
|
||||
this.CurVerLabel.AutoSize = true;
|
||||
this.CurVerLabel.BackColor = System.Drawing.Color.Transparent;
|
||||
this.CurVerLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
|
||||
this.CurVerLabel.ForeColor = System.Drawing.SystemColors.Control;
|
||||
this.CurVerLabel.Location = new System.Drawing.Point(21, 245);
|
||||
this.CurVerLabel.Name = "CurVerLabel";
|
||||
this.CurVerLabel.Size = new System.Drawing.Size(94, 15);
|
||||
this.CurVerLabel.TabIndex = 2;
|
||||
this.CurVerLabel.Text = "Current Version:";
|
||||
this.panel1.BackColor = global::AndroidSideloader.Properties.Settings.Default.BackColor;
|
||||
this.panel1.BackgroundImage = global::AndroidSideloader.Properties.Resources.pattern_cubes_1_1_1_0_0_0_1__000000_212121;
|
||||
this.panel1.Controls.Add(this.YesUpdate);
|
||||
this.panel1.Controls.Add(this.panel3);
|
||||
this.panel1.Controls.Add(this.UpdateVerLabel);
|
||||
this.panel1.Controls.Add(this.CurVerLabel);
|
||||
this.panel1.Controls.Add(this.SkipUpdate);
|
||||
this.panel1.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "BackColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.panel1.Location = new System.Drawing.Point(-6, -6);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(474, 305);
|
||||
this.panel1.TabIndex = 5;
|
||||
this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.UpdateForm_MouseDown);
|
||||
this.panel1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.UpdateForm_MouseMove);
|
||||
this.panel1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.UpdateForm_MouseUp);
|
||||
//
|
||||
// YesUpdate
|
||||
//
|
||||
this.YesUpdate.BackColor = global::AndroidSideloader.Properties.Settings.Default.SubButtonColor;
|
||||
this.YesUpdate.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "SubButtonColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.YesUpdate.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.YesUpdate.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.YesUpdate.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.YesUpdate.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.YesUpdate.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.YesUpdate.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.YesUpdate.Active2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.YesUpdate.BackColor = System.Drawing.Color.Transparent;
|
||||
this.YesUpdate.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.YesUpdate.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F);
|
||||
this.YesUpdate.ForeColor = System.Drawing.Color.White;
|
||||
this.YesUpdate.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.YesUpdate.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.YesUpdate.Location = new System.Drawing.Point(339, 245);
|
||||
this.YesUpdate.Name = "YesUpdate";
|
||||
this.YesUpdate.Radius = 5;
|
||||
this.YesUpdate.Size = new System.Drawing.Size(111, 31);
|
||||
this.YesUpdate.TabIndex = 0;
|
||||
this.YesUpdate.Stroke = true;
|
||||
this.YesUpdate.StrokeColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(74)))), ((int)(((byte)(74)))));
|
||||
this.YesUpdate.TabIndex = 2;
|
||||
this.YesUpdate.Text = "Update Now";
|
||||
this.YesUpdate.UseVisualStyleBackColor = false;
|
||||
this.YesUpdate.Transparency = false;
|
||||
this.YesUpdate.Click += new System.EventHandler(this.YesUpdate_Click);
|
||||
//
|
||||
// UpdateVerLabel
|
||||
//
|
||||
this.UpdateVerLabel.AutoSize = true;
|
||||
this.UpdateVerLabel.BackColor = System.Drawing.Color.Transparent;
|
||||
this.UpdateVerLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
|
||||
this.UpdateVerLabel.ForeColor = System.Drawing.SystemColors.Control;
|
||||
this.UpdateVerLabel.Location = new System.Drawing.Point(21, 261);
|
||||
this.UpdateVerLabel.Name = "UpdateVerLabel";
|
||||
this.UpdateVerLabel.Size = new System.Drawing.Size(94, 15);
|
||||
this.UpdateVerLabel.TabIndex = 3;
|
||||
this.UpdateVerLabel.Text = "Update Version:";
|
||||
//
|
||||
// panel3
|
||||
//
|
||||
this.panel3.BackColor = global::AndroidSideloader.Properties.Settings.Default.SubButtonColor;
|
||||
this.panel3.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "SubButtonColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.panel3.Controls.Add(this.UpdateTextBox);
|
||||
this.panel3.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "SubButtonColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.panel3.Location = new System.Drawing.Point(21, 19);
|
||||
this.panel3.Name = "panel3";
|
||||
this.panel3.Size = new System.Drawing.Size(432, 218);
|
||||
@@ -124,22 +110,43 @@ namespace AndroidSideloader
|
||||
this.UpdateTextBox.MouseMove += new System.Windows.Forms.MouseEventHandler(this.UpdateForm_MouseMove);
|
||||
this.UpdateTextBox.MouseUp += new System.Windows.Forms.MouseEventHandler(this.UpdateForm_MouseUp);
|
||||
//
|
||||
// panel1
|
||||
// UpdateVerLabel
|
||||
//
|
||||
this.panel1.BackColor = global::AndroidSideloader.Properties.Settings.Default.BackColor;
|
||||
this.panel1.Controls.Add(this.panel3);
|
||||
this.panel1.Controls.Add(this.UpdateVerLabel);
|
||||
this.panel1.Controls.Add(this.YesUpdate);
|
||||
this.panel1.Controls.Add(this.CurVerLabel);
|
||||
this.panel1.Controls.Add(this.SkipUpdate);
|
||||
this.panel1.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "BackColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.panel1.Location = new System.Drawing.Point(-6, -6);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(474, 305);
|
||||
this.panel1.TabIndex = 5;
|
||||
this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.UpdateForm_MouseDown);
|
||||
this.panel1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.UpdateForm_MouseMove);
|
||||
this.panel1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.UpdateForm_MouseUp);
|
||||
this.UpdateVerLabel.AutoSize = true;
|
||||
this.UpdateVerLabel.BackColor = System.Drawing.Color.Transparent;
|
||||
this.UpdateVerLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
|
||||
this.UpdateVerLabel.ForeColor = System.Drawing.SystemColors.Control;
|
||||
this.UpdateVerLabel.Location = new System.Drawing.Point(21, 261);
|
||||
this.UpdateVerLabel.Name = "UpdateVerLabel";
|
||||
this.UpdateVerLabel.Size = new System.Drawing.Size(94, 15);
|
||||
this.UpdateVerLabel.TabIndex = 3;
|
||||
this.UpdateVerLabel.Text = "Update Version:";
|
||||
//
|
||||
// CurVerLabel
|
||||
//
|
||||
this.CurVerLabel.AutoSize = true;
|
||||
this.CurVerLabel.BackColor = System.Drawing.Color.Transparent;
|
||||
this.CurVerLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
|
||||
this.CurVerLabel.ForeColor = System.Drawing.SystemColors.Control;
|
||||
this.CurVerLabel.Location = new System.Drawing.Point(21, 245);
|
||||
this.CurVerLabel.Name = "CurVerLabel";
|
||||
this.CurVerLabel.Size = new System.Drawing.Size(94, 15);
|
||||
this.CurVerLabel.TabIndex = 2;
|
||||
this.CurVerLabel.Text = "Current Version:";
|
||||
//
|
||||
// SkipUpdate
|
||||
//
|
||||
this.SkipUpdate.AutoSize = true;
|
||||
this.SkipUpdate.BackColor = System.Drawing.Color.Transparent;
|
||||
this.SkipUpdate.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.SkipUpdate.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F);
|
||||
this.SkipUpdate.ForeColor = System.Drawing.Color.Silver;
|
||||
this.SkipUpdate.Location = new System.Drawing.Point(374, 279);
|
||||
this.SkipUpdate.Name = "SkipUpdate";
|
||||
this.SkipUpdate.Size = new System.Drawing.Size(76, 13);
|
||||
this.SkipUpdate.TabIndex = 4;
|
||||
this.SkipUpdate.Text = "𝖲𝖪𝖨𝖯 𝖥𝖮𝖱 𝖭𝖮𝖶";
|
||||
this.SkipUpdate.Click += new System.EventHandler(this.SkipUpdate_Click);
|
||||
//
|
||||
// UpdateForm
|
||||
//
|
||||
@@ -151,26 +158,27 @@ namespace AndroidSideloader
|
||||
this.ControlBox = false;
|
||||
this.Controls.Add(this.panel1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "UpdateForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.UpdateForm_MouseDown);
|
||||
this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.UpdateForm_MouseMove);
|
||||
this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.UpdateForm_MouseUp);
|
||||
this.panel3.ResumeLayout(false);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
this.panel3.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.Activate();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label SkipUpdate;
|
||||
private System.Windows.Forms.Label CurVerLabel;
|
||||
private System.Windows.Forms.Button YesUpdate;
|
||||
private System.Windows.Forms.Label UpdateVerLabel;
|
||||
private System.Windows.Forms.Panel panel3;
|
||||
private System.Windows.Forms.RichTextBox UpdateTextBox;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private RoundButton YesUpdate;
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AndroidSideloader
|
||||
@@ -18,7 +12,7 @@ namespace AndroidSideloader
|
||||
public UpdateForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.CenterToScreen();
|
||||
CenterToScreen();
|
||||
CurVerLabel.Text += " " + Updater.LocalVersion;
|
||||
UpdateVerLabel.Text += " " + Updater.currentVersion;
|
||||
UpdateTextBox.Text = Updater.changelog;
|
||||
@@ -27,12 +21,12 @@ namespace AndroidSideloader
|
||||
private void YesUpdate_Click(object sender, EventArgs e)
|
||||
{
|
||||
Updater.doUpdate();
|
||||
this.Close();
|
||||
Close();
|
||||
}
|
||||
|
||||
private void SkipUpdate_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
Close();
|
||||
}
|
||||
|
||||
private void UpdateTextBox_TextChanged(object sender, EventArgs e)
|
||||
@@ -50,10 +44,10 @@ namespace AndroidSideloader
|
||||
{
|
||||
if (mouseDown)
|
||||
{
|
||||
this.Location = new Point(
|
||||
(this.Location.X - lastLocation.X) + e.X, (this.Location.Y - lastLocation.Y) + e.Y);
|
||||
Location = new Point(
|
||||
Location.X - lastLocation.X + e.X, Location.Y - lastLocation.Y + e.Y);
|
||||
|
||||
this.Update();
|
||||
Update();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
6849
UpdateForm.resx
6849
UpdateForm.resx
File diff suppressed because it is too large
Load Diff
84
Updater.cs
84
Updater.cs
@@ -1,73 +1,79 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Diagnostics;
|
||||
using JR.Utils.GUI.Forms;
|
||||
using System.Net;
|
||||
using System.Windows.Forms;
|
||||
using System.Net.Http;
|
||||
using System.IO;
|
||||
using AndroidSideloader;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
class Updater
|
||||
internal class Updater
|
||||
{
|
||||
public static string AppName { get; set; }
|
||||
public static string Repostory { get; set; }
|
||||
private static string RawGitHubUrl;
|
||||
private static string GitHubUrl;
|
||||
public static string Repository { get; set; }
|
||||
private static readonly string RawGitHubUrl = "https://raw.githubusercontent.com/VRPirates/rookie";
|
||||
private static readonly string GitHubUrl = "https://github.com/VRPirates/rookie";
|
||||
|
||||
static readonly public string LocalVersion = "2.14";
|
||||
public static readonly string LocalVersion = "2.27.1";
|
||||
public static string currentVersion = string.Empty;
|
||||
public static string changelog = string.Empty;
|
||||
|
||||
//Check if there is a new version of the sideloader
|
||||
private static bool IsUpdateAvailable()
|
||||
// Check if there is a new version of the sideloader
|
||||
private static async Task<bool> IsUpdateAvailableAsync()
|
||||
{
|
||||
HttpClient client = new HttpClient();
|
||||
try
|
||||
using (HttpClient client = new HttpClient())
|
||||
{
|
||||
currentVersion = client.GetStringAsync($"{RawGitHubUrl}/master/version").Result;
|
||||
changelog = client.GetStringAsync($"{RawGitHubUrl}/master/changelog.txt").Result;
|
||||
client.Dispose();
|
||||
currentVersion = currentVersion.Trim();
|
||||
try
|
||||
{
|
||||
currentVersion = await client.GetStringAsync($"{RawGitHubUrl}/master/version");
|
||||
changelog = await client.GetStringAsync($"{RawGitHubUrl}/master/changelog.txt");
|
||||
currentVersion = currentVersion.Trim();
|
||||
}
|
||||
catch (HttpRequestException)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch { return false; }
|
||||
|
||||
return LocalVersion.Trim() != currentVersion;
|
||||
}
|
||||
|
||||
//Call this to ask the user if they want to update
|
||||
public static void Update()
|
||||
// Call this to ask the user if they want to update
|
||||
public static async Task Update()
|
||||
{
|
||||
RawGitHubUrl = $"https://raw.githubusercontent.com/nerdunit/androidsideloader";
|
||||
GitHubUrl = $"https://github.com/nerdunit/androidsideloader";
|
||||
if (IsUpdateAvailable())
|
||||
if (await IsUpdateAvailableAsync())
|
||||
{
|
||||
UpdateForm upForm = new UpdateForm();
|
||||
upForm.ShowDialog(); ;
|
||||
_ = upForm.ShowDialog();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//If the user wants to update
|
||||
// If the user wants to update
|
||||
public static void doUpdate()
|
||||
{
|
||||
try
|
||||
{
|
||||
ADB.RunAdbCommandToString("kill-server");
|
||||
var fileClient = new WebClient();
|
||||
ServicePointManager.Expect100Continue = true;
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
|
||||
Logger.Log($"Downloading update from {GitHubUrl}/releases/download/v{currentVersion}/{AppName}.exe to {AppName} v{currentVersion}.exe");
|
||||
fileClient.DownloadFile($"{GitHubUrl}/releases/download/v{currentVersion}/{AppName}.exe", $"{AppName} v{currentVersion}.exe");
|
||||
fileClient.Dispose();
|
||||
Logger.Log($"Starting {AppName} v{currentVersion}.exe");
|
||||
Process.Start($"{AppName} v{currentVersion}.exe");
|
||||
//Delete current version
|
||||
|
||||
using (WebClient fileClient = new WebClient())
|
||||
{
|
||||
ServicePointManager.Expect100Continue = true;
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
|
||||
|
||||
Logger.Log($"Downloading update from {GitHubUrl}/releases/download/v{currentVersion}/{AppName}.exe to {AppName} v{currentVersion}.exe");
|
||||
fileClient.DownloadFile($"{GitHubUrl}/releases/download/v{currentVersion}/{AppName}.exe", $"{AppName} v{currentVersion}.exe");
|
||||
|
||||
Logger.Log($"Starting {AppName} v{currentVersion}.exe");
|
||||
Process.Start($"{AppName} v{currentVersion}.exe");
|
||||
}
|
||||
|
||||
// Delete current version
|
||||
AndroidSideloader.Utilities.GeneralUtilities.Melt();
|
||||
}
|
||||
catch { }
|
||||
catch (Exception ex)
|
||||
{
|
||||
// Handle specific exceptions that might occur during the update process
|
||||
Logger.Log($"Update failed: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
30
UsernameForm.Designer.cs
generated
30
UsernameForm.Designer.cs
generated
@@ -28,8 +28,9 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UsernameForm));
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.button1 = new AndroidSideloader.RoundButton();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// textBox1
|
||||
@@ -47,20 +48,23 @@
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.BackColor = global::AndroidSideloader.Properties.Settings.Default.SubButtonColor;
|
||||
this.button1.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.button1.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.button1.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "SubButtonColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.button1.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.button1.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.button1.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
|
||||
this.button1.Active2 = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
|
||||
this.button1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.button1.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F);
|
||||
this.button1.ForeColor = System.Drawing.Color.White;
|
||||
this.button1.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.button1.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.button1.Location = new System.Drawing.Point(13, 51);
|
||||
this.button1.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Radius = 5;
|
||||
this.button1.Size = new System.Drawing.Size(418, 34);
|
||||
this.button1.TabIndex = 1;
|
||||
this.button1.Stroke = true;
|
||||
this.button1.StrokeColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(74)))), ((int)(((byte)(74)))));
|
||||
this.button1.TabIndex = 2;
|
||||
this.button1.Text = "Create User.Json";
|
||||
this.button1.UseVisualStyleBackColor = false;
|
||||
this.button1.Transparency = false;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// UsernameForm
|
||||
@@ -68,11 +72,13 @@
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = global::AndroidSideloader.Properties.Settings.Default.BackColor;
|
||||
this.BackgroundImage = global::AndroidSideloader.Properties.Resources.pattern_cubes_1_1_1_0_0_0_1__000000_212121;
|
||||
this.ClientSize = new System.Drawing.Size(443, 100);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.textBox1);
|
||||
this.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "BackColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.ForeColor = System.Drawing.Color.White;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximumSize = new System.Drawing.Size(459, 139);
|
||||
this.MinimumSize = new System.Drawing.Size(459, 139);
|
||||
this.Name = "UsernameForm";
|
||||
@@ -87,6 +93,6 @@
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private RoundButton button1;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
@@ -14,7 +14,7 @@ namespace AndroidSideloader
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
string defaultText;
|
||||
private string defaultText;
|
||||
|
||||
private void usernameForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
@@ -26,7 +26,7 @@ namespace AndroidSideloader
|
||||
{
|
||||
if (textBox1.Text == defaultText || textBox1.Text.Length == 0)
|
||||
{
|
||||
MessageBox.Show("Please enter your username first");
|
||||
_ = MessageBox.Show("Please enter your username first");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -34,12 +34,16 @@ namespace AndroidSideloader
|
||||
{
|
||||
createUserJson(textBox1.Text);
|
||||
|
||||
});
|
||||
t1.IsBackground = true;
|
||||
})
|
||||
{
|
||||
IsBackground = true
|
||||
};
|
||||
t1.Start();
|
||||
|
||||
while (t1.IsAlive)
|
||||
{
|
||||
await Task.Delay(100);
|
||||
}
|
||||
|
||||
MainForm.notify("Done");
|
||||
|
||||
@@ -49,11 +53,11 @@ namespace AndroidSideloader
|
||||
|
||||
public static void createUserJson(string username)
|
||||
{
|
||||
ADB.RunAdbCommandToString($"shell settings put global username {username}");
|
||||
foreach (var jsonFileName in userJsons)
|
||||
_ = ADB.RunAdbCommandToString($"shell settings put global username {username}");
|
||||
foreach (string jsonFileName in userJsons)
|
||||
{
|
||||
createUserJsonByName(username, jsonFileName);
|
||||
ADB.RunAdbCommandToString("push \"" + Environment.CurrentDirectory + $"\\{jsonFileName}\" " + " /sdcard/");
|
||||
_ = ADB.RunAdbCommandToString("push \"" + Environment.CurrentDirectory + $"\\{jsonFileName}\" " + " /sdcard/");
|
||||
File.Delete(jsonFileName);
|
||||
}
|
||||
|
||||
|
||||
6849
UsernameForm.resx
6849
UsernameForm.resx
File diff suppressed because it is too large
Load Diff
@@ -1,17 +1,13 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Diagnostics;
|
||||
using JR.Utils.GUI.Forms;
|
||||
using System.Windows.Forms;
|
||||
using System.Net.Http;
|
||||
using System.IO;
|
||||
using AndroidSideloader;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AndroidSideloader.Utilities
|
||||
{
|
||||
|
||||
class GeneralUtilities
|
||||
internal class GeneralUtilities
|
||||
{
|
||||
public static long GetDirectorySize(string folderPath)
|
||||
{
|
||||
@@ -28,13 +24,15 @@ namespace AndroidSideloader.Utilities
|
||||
|
||||
public static void ExecuteCommand(string command)
|
||||
{
|
||||
var processInfo = new ProcessStartInfo("cmd.exe", "/c " + command);
|
||||
processInfo.CreateNoWindow = true;
|
||||
processInfo.UseShellExecute = false;
|
||||
processInfo.RedirectStandardError = true;
|
||||
processInfo.RedirectStandardOutput = true;
|
||||
ProcessStartInfo processInfo = new ProcessStartInfo("cmd.exe", "/c " + command)
|
||||
{
|
||||
CreateNoWindow = true,
|
||||
UseShellExecute = false,
|
||||
RedirectStandardError = true,
|
||||
RedirectStandardOutput = true
|
||||
};
|
||||
|
||||
var process = Process.Start(processInfo);
|
||||
Process process = Process.Start(processInfo);
|
||||
|
||||
process.OutputDataReceived += (object sender, DataReceivedEventArgs e) =>
|
||||
CommandOutput += e.Data;
|
||||
@@ -51,7 +49,7 @@ namespace AndroidSideloader.Utilities
|
||||
|
||||
public static void Melt()
|
||||
{
|
||||
Process.Start(new ProcessStartInfo()
|
||||
_ = Process.Start(new ProcessStartInfo()
|
||||
{
|
||||
Arguments = "/C choice /C Y /N /D Y /T 5 & Del \"" + Application.ExecutablePath + "\"",
|
||||
WindowStyle = ProcessWindowStyle.Hidden,
|
||||
@@ -60,7 +58,8 @@ namespace AndroidSideloader.Utilities
|
||||
});
|
||||
Environment.Exit(0);
|
||||
}
|
||||
static Random rand = new Random();
|
||||
|
||||
private static readonly Random rand = new Random();
|
||||
public static string randomString(int length)
|
||||
{
|
||||
string valid = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
@@ -69,7 +68,7 @@ namespace AndroidSideloader.Utilities
|
||||
int randomInteger = rand.Next(0, valid.Length);
|
||||
while (0 < length--)
|
||||
{
|
||||
res.Append(valid[randomInteger]);
|
||||
_ = res.Append(valid[randomInteger]);
|
||||
randomInteger = rand.Next(0, valid.Length);
|
||||
}
|
||||
return res.ToString();
|
||||
@@ -77,7 +76,7 @@ namespace AndroidSideloader.Utilities
|
||||
|
||||
public static ProcessOutput startProcess(string process, string path, string command)
|
||||
{
|
||||
Logger.Log($"Ran process {process} with command {command} in path {path}");
|
||||
_ = Logger.Log($"Ran process {process} with command {command} in path {path}");
|
||||
Process cmd = new Process();
|
||||
cmd.StartInfo.FileName = "cmd.exe";
|
||||
cmd.StartInfo.RedirectStandardInput = true;
|
||||
@@ -86,16 +85,16 @@ namespace AndroidSideloader.Utilities
|
||||
cmd.StartInfo.WorkingDirectory = path;
|
||||
cmd.StartInfo.CreateNoWindow = true;
|
||||
cmd.StartInfo.UseShellExecute = false;
|
||||
cmd.Start();
|
||||
_ = cmd.Start();
|
||||
cmd.StandardInput.WriteLine(command);
|
||||
cmd.StandardInput.Flush();
|
||||
cmd.StandardInput.Close();
|
||||
cmd.WaitForExit();
|
||||
string error = cmd.StandardError.ReadToEnd();
|
||||
string output = cmd.StandardOutput.ReadToEnd();
|
||||
Logger.Log($"Output: {output}");
|
||||
Logger.Log($"Error: {error}");
|
||||
return new ProcessOutput(output,error);
|
||||
_ = Logger.Log($"Output: {output}");
|
||||
_ = Logger.Log($"Error: {error}", LogLevel.ERROR);
|
||||
return new ProcessOutput(output, error);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,26 +1,62 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using System.Text;
|
||||
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
class Logger
|
||||
public enum LogLevel
|
||||
{
|
||||
public string logfile = Properties.Settings.Default.CurrentLogPath;
|
||||
public static bool Log(string text, bool ret = true)
|
||||
{
|
||||
|
||||
string time = DateTime.Now.ToString("hh:mmtt(UTC): ");
|
||||
if (text.Length > 5)
|
||||
{
|
||||
DEBUG,
|
||||
INFO,
|
||||
WARNING,
|
||||
ERROR,
|
||||
TRACE,
|
||||
FATAL
|
||||
}
|
||||
|
||||
string newline = "\n";
|
||||
if (text.Length > 40 && text.Contains("\n"))
|
||||
newline += "\n\n";
|
||||
try {File.AppendAllText(Properties.Settings.Default.CurrentLogPath, time + text + newline); } catch { }
|
||||
public static class Logger
|
||||
{
|
||||
private static readonly object lockObject = new object();
|
||||
private static string logFilePath = Properties.Settings.Default.CurrentLogPath;
|
||||
|
||||
public static bool Log(string text, LogLevel logLevel = LogLevel.INFO, bool ret = true)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(text) || text.Length <= 5)
|
||||
return ret;
|
||||
|
||||
string time = DateTime.UtcNow.ToString("hh:mm:ss.fff tt (UTC): ");
|
||||
string newline = text.Length > 40 && text.Contains("\n") ? "\n\n" : "\n";
|
||||
string logEntry = time + "[" + logLevel.ToString().ToUpper() + "] [" + GetCallerInfo() + "] " + text + newline;
|
||||
|
||||
try
|
||||
{
|
||||
lock (lockObject)
|
||||
{
|
||||
File.AppendAllText(logFilePath, logEntry);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
// Handle the exception if necessary
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
private static string GetCallerInfo()
|
||||
{
|
||||
System.Diagnostics.StackTrace stackTrace = new System.Diagnostics.StackTrace(true);
|
||||
if (stackTrace.FrameCount >= 3)
|
||||
{
|
||||
var frame = stackTrace.GetFrame(2);
|
||||
var method = frame.GetMethod();
|
||||
string className = method.DeclaringType?.Name;
|
||||
string methodName = method.Name;
|
||||
string callerInfo = $"{className}.{methodName}";
|
||||
return callerInfo;
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Linq;
|
||||
|
||||
namespace AndroidSideloader.Utilities
|
||||
{
|
||||
class StringUtilities
|
||||
internal class StringUtilities
|
||||
{
|
||||
public static string RemoveEverythingAfterFirst(string s, string removeMe)
|
||||
{
|
||||
int index = s.IndexOf(removeMe);
|
||||
if (index > 0)
|
||||
{
|
||||
s = s.Substring(0, index);
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -20,7 +19,10 @@ namespace AndroidSideloader.Utilities
|
||||
{
|
||||
int index = s.LastIndexOf(removeMe);
|
||||
if (index > 0)
|
||||
{
|
||||
s = s.Substring(0, index);
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -28,7 +30,10 @@ namespace AndroidSideloader.Utilities
|
||||
{
|
||||
int index = s.IndexOf(removeMe);
|
||||
if (index > 0)
|
||||
{
|
||||
s = s.Substring(index);
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -50,7 +55,10 @@ namespace AndroidSideloader.Utilities
|
||||
{
|
||||
int index = s.LastIndexOf(removeMe);
|
||||
if (index > 0)
|
||||
{
|
||||
s = s.Substring(index);
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,18 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AndroidSideloader.Utilities
|
||||
namespace AndroidSideloader.Utilities
|
||||
{
|
||||
class UpdateGameData
|
||||
internal class UpdateGameData
|
||||
{
|
||||
public UpdateGameData(String gameName, String packageName, ulong installedVersionInt)
|
||||
public UpdateGameData(string gameName, string packageName, ulong installedVersionInt)
|
||||
{
|
||||
this.GameName = gameName;
|
||||
this.Packagename = packageName;
|
||||
this.InstalledVersionInt = installedVersionInt;
|
||||
GameName = gameName;
|
||||
Packagename = packageName;
|
||||
InstalledVersionInt = installedVersionInt;
|
||||
}
|
||||
public string GameName { get; set; }
|
||||
public string Packagename { get; set; }
|
||||
|
||||
@@ -1,16 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AndroidSideloader.Utilities
|
||||
namespace AndroidSideloader.Utilities
|
||||
{
|
||||
class UploadGame
|
||||
internal class UploadGame
|
||||
{
|
||||
public UploadGame(string Uploadcommand, string Pckgcommand, string Uploadgamename, ulong Uploadversion, bool isUpdate)
|
||||
{
|
||||
this.Uploadcommand = Uploadcommand;
|
||||
this.Pckgcommand = Pckgcommand;
|
||||
this.Uploadgamename = Uploadgamename;
|
||||
this.Uploadversion = Uploadversion;
|
||||
@@ -18,14 +11,12 @@ namespace AndroidSideloader.Utilities
|
||||
}
|
||||
public UploadGame()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
public bool isUpdate { get; set; }
|
||||
|
||||
public string Uploadcommand { get; set; }
|
||||
|
||||
public string Pckgcommand { get; set; }
|
||||
|
||||
|
||||
public string Uploadgamename { get; set; }
|
||||
|
||||
public ulong Uploadversion { get; set; }
|
||||
|
||||
134
Utilities/Zip.cs
134
Utilities/Zip.cs
@@ -1,53 +1,133 @@
|
||||
using System;
|
||||
using JR.Utils.GUI.Forms;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Net;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AndroidSideloader.Utilities
|
||||
{
|
||||
class Zip
|
||||
public class ExtractionException : Exception
|
||||
{
|
||||
public ExtractionException(string message) : base(message) { }
|
||||
}
|
||||
|
||||
internal class Zip
|
||||
{
|
||||
public static void ExtractFile(string sourceArchive, string destination)
|
||||
{
|
||||
var args = $"x \"{sourceArchive}\" -y -o\"{destination}\"";
|
||||
string args = $"x \"{sourceArchive}\" -y -o\"{destination}\" -bsp1";
|
||||
DoExtract(args);
|
||||
}
|
||||
|
||||
public static void ExtractFile(string sourceArchive, string destination, string password)
|
||||
{
|
||||
var args = $"x \"{sourceArchive}\" -y -o\"{destination}\" -p\"{password}\"";
|
||||
string args = $"x \"{sourceArchive}\" -y -o\"{destination}\" -p\"{password}\" -bsp1";
|
||||
DoExtract(args);
|
||||
}
|
||||
|
||||
private static string extractionError = null;
|
||||
private static bool errorMessageShown = false;
|
||||
private static void DoExtract(string args)
|
||||
{
|
||||
if (!File.Exists(Environment.CurrentDirectory + "\\7z.exe") || !File.Exists(Environment.CurrentDirectory + "\\7z.dll"))
|
||||
if (!File.Exists(Path.Combine(Environment.CurrentDirectory, "7z.exe")) || !File.Exists(Path.Combine(Environment.CurrentDirectory, "7z.dll")))
|
||||
{
|
||||
Logger.Log("Begin download 7-zip");
|
||||
_ = Logger.Log("Begin download 7-zip");
|
||||
WebClient client = new WebClient();
|
||||
client.DownloadFile("https://github.com/nerdunit/androidsideloader/raw/master/7z.exe", "7z.exe");
|
||||
client.DownloadFile("https://github.com/nerdunit/androidsideloader/raw/master/7z.dll", "7z.dll");
|
||||
Logger.Log("Complete download 7-zip");
|
||||
string architecture = Environment.Is64BitOperatingSystem ? "64" : "";
|
||||
try
|
||||
{
|
||||
client.DownloadFile($"https://github.com/VRPirates/rookie/raw/master/7z{architecture}.exe", $"7z.exe");
|
||||
client.DownloadFile($"https://github.com/VRPirates/rookie/raw/master/7z{architecture}.dll", $"7z.dll");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_ = FlexibleMessageBox.Show($"You are unable to access the GitHub page with the Exception: {ex.Message}\nSome files may be missing (7z)");
|
||||
_ = FlexibleMessageBox.Show("7z was unable to be downloaded\nRookie will now close");
|
||||
Application.Exit();
|
||||
}
|
||||
_ = Logger.Log("Complete download 7-zip");
|
||||
}
|
||||
ProcessStartInfo pro = new ProcessStartInfo();
|
||||
pro.WindowStyle = ProcessWindowStyle.Hidden;
|
||||
pro.FileName = "7z.exe";
|
||||
pro.Arguments = args;
|
||||
pro.CreateNoWindow = true;
|
||||
pro.UseShellExecute = false;
|
||||
|
||||
Logger.Log($"Extract: 7z {args}");
|
||||
|
||||
Process x = Process.Start(pro);
|
||||
x.WaitForExit();
|
||||
if (x.ExitCode != 0)
|
||||
ProcessStartInfo pro = new ProcessStartInfo
|
||||
{
|
||||
Logger.Log($"Extract failed");
|
||||
Logger.Log(x.StandardOutput.ReadToEnd());
|
||||
throw new ApplicationException($"Extracting failed, status code {x.ExitCode}");
|
||||
WindowStyle = ProcessWindowStyle.Hidden,
|
||||
FileName = "7z.exe",
|
||||
Arguments = args,
|
||||
CreateNoWindow = true,
|
||||
UseShellExecute = false,
|
||||
RedirectStandardInput = true,
|
||||
RedirectStandardError = true,
|
||||
RedirectStandardOutput = true
|
||||
};
|
||||
|
||||
_ = Logger.Log($"Extract: 7z {string.Join(" ", args.Split(' ').Where(a => !a.StartsWith("-p")))}");
|
||||
|
||||
using (Process x = new Process())
|
||||
{
|
||||
x.StartInfo = pro;
|
||||
|
||||
if (MainForm.isInDownloadExtract && x != null)
|
||||
{
|
||||
x.OutputDataReceived += (sender, e) =>
|
||||
{
|
||||
if (e.Data != null)
|
||||
{
|
||||
var match = Regex.Match(e.Data, @"(\d+)%");
|
||||
if (match.Success)
|
||||
{
|
||||
int progress = int.Parse(match.Groups[1].Value);
|
||||
MainForm mainForm = (MainForm)Application.OpenForms[0];
|
||||
if (mainForm != null)
|
||||
{
|
||||
mainForm.Invoke((Action)(() => mainForm.SetProgress(progress)));
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
x.ErrorDataReceived += (sender, e) =>
|
||||
{
|
||||
if (e.Data != null)
|
||||
{
|
||||
var error = e.Data;
|
||||
if (error.Contains("There is not enough space on the disk") && !errorMessageShown)
|
||||
{
|
||||
errorMessageShown = true;
|
||||
Program.form.Invoke(new Action(() =>
|
||||
{
|
||||
_ = FlexibleMessageBox.Show(Program.form, $"Not enough space to extract archive.\r\nMake sure your {Path.GetPathRoot(Properties.Settings.Default.downloadDir)} drive has at least double the space of the game, then try again.",
|
||||
"NOT ENOUGH SPACE",
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Error);
|
||||
return;
|
||||
}));
|
||||
}
|
||||
_ = Logger.Log(error, LogLevel.ERROR);
|
||||
extractionError = $"Extracting failed, status code {x.ExitCode}";
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
x.Start();
|
||||
x.BeginOutputReadLine();
|
||||
x.BeginErrorReadLine();
|
||||
x.WaitForExit();
|
||||
errorMessageShown = false;
|
||||
|
||||
if (!string.IsNullOrEmpty(extractionError))
|
||||
{
|
||||
string errorMessage = extractionError;
|
||||
extractionError = null; // Reset the error message
|
||||
throw new ExtractionException(errorMessage);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,7 @@
|
||||
RSL 2.14
|
||||
RSL 2.27
|
||||
|
||||
- Added upload config for easier config management
|
||||
- Improved upload logic to handle failures better
|
||||
|
||||
~SytheZN
|
||||
|
||||
- Much better theme
|
||||
|
||||
~fenopy
|
||||
- Feature: Searchbar can now also search release names
|
||||
- Feature: Rookie will now download 64 bit 7zip binaries for faster extractions (when possible)
|
||||
- Fix: 7zip error handler
|
||||
- Fix: Crash when downloading without enough space
|
||||
- Chore: Cleanup code
|
||||
34708
debuglog.txt
34708
debuglog.txt
File diff suppressed because it is too large
Load Diff
@@ -2,5 +2,6 @@
|
||||
<packages>
|
||||
<package id="Costura.Fody" version="4.1.0" targetFramework="net452" />
|
||||
<package id="Fody" version="6.0.0" targetFramework="net452" developmentDependency="true" />
|
||||
<package id="Microsoft.Web.WebView2" version="1.0.1072.54" targetFramework="net452" />
|
||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net452" />
|
||||
</packages>
|
||||
BIN
packages/Costura.Fody.4.1.0/.signature.p7s
vendored
BIN
packages/Costura.Fody.4.1.0/.signature.p7s
vendored
Binary file not shown.
BIN
packages/Costura.Fody.4.1.0/Costura.Fody.4.1.0.nupkg
vendored
BIN
packages/Costura.Fody.4.1.0/Costura.Fody.4.1.0.nupkg
vendored
Binary file not shown.
@@ -1,5 +0,0 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<WeaverFiles Include="$(MsBuildThisFileDirectory)..\weaver\$(MSBuildThisFileName).dll" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
BIN
packages/Costura.Fody.4.1.0/lib/net40/Costura.dll
vendored
BIN
packages/Costura.Fody.4.1.0/lib/net40/Costura.dll
vendored
Binary file not shown.
BIN
packages/Costura.Fody.4.1.0/weaver/Costura.Fody.dll
vendored
BIN
packages/Costura.Fody.4.1.0/weaver/Costura.Fody.dll
vendored
Binary file not shown.
@@ -1,85 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:all>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="ExcludeAssemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="IncludeAssemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged32Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with line breaks.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged64Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with line breaks.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="PreloadOrder" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>The order of preloaded assemblies, delimited with line breaks.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
</xs:all>
|
||||
<xs:attribute name="CreateTemporaryAssemblies" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="IncludeDebugSymbols" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Controls if .pdbs for reference assemblies are also embedded.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="DisableCompression" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="DisableCleanup" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="LoadAtModuleInit" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="IgnoreSatelliteAssemblies" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="ExcludeAssemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with |</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="IncludeAssemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="Unmanaged32Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with |.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="Unmanaged64Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with |.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="PreloadOrder" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>The order of preloaded assemblies, delimited with |.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
BIN
packages/Fody.6.0.0/.signature.p7s
vendored
BIN
packages/Fody.6.0.0/.signature.p7s
vendored
Binary file not shown.
BIN
packages/Fody.6.0.0/Fody.6.0.0.nupkg
vendored
BIN
packages/Fody.6.0.0/Fody.6.0.0.nupkg
vendored
Binary file not shown.
110
packages/Fody.6.0.0/build/Fody.targets
vendored
110
packages/Fody.6.0.0/build/Fody.targets
vendored
@@ -1,110 +0,0 @@
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<PropertyGroup>
|
||||
<ProjectWeaverXml Condition="$(ProjectWeaverXml) == ''">$(ProjectDir)FodyWeavers.xml</ProjectWeaverXml>
|
||||
<FodyPath Condition="$(FodyPath) == ''">$(MSBuildThisFileDirectory)..\</FodyPath>
|
||||
<FodyAssemblyDirectory Condition="$(MSBuildRuntimeType) == 'Core'">$(FodyPath)netstandardtask</FodyAssemblyDirectory>
|
||||
<FodyAssemblyDirectory Condition="$(MSBuildRuntimeType) != 'Core'">$(FodyPath)netclassictask</FodyAssemblyDirectory>
|
||||
<FodyAssembly Condition="$(FodyAssembly) == ''">$(FodyAssemblyDirectory)\Fody.dll</FodyAssembly>
|
||||
<DefaultItemExcludes>$(DefaultItemExcludes);FodyWeavers.xsd</DefaultItemExcludes>
|
||||
<FodyGenerateXsd Condition="$(FodyGenerateXsd) == ''">true</FodyGenerateXsd>
|
||||
<MsBuildMajorVersion>15</MsBuildMajorVersion>
|
||||
<MsBuildMajorVersion Condition="'$(MSBuildVersion)' != ''">$([System.Version]::Parse($(MSBuildVersion)).Major)</MsBuildMajorVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="Exists($(ProjectWeaverXml))">
|
||||
<UpToDateCheckInput Include="$(ProjectWeaverXml)" />
|
||||
<CustomAdditionalCompileInputs Include="$(ProjectWeaverXml)" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Support for NCrunch -->
|
||||
<ItemGroup Condition="'$(NCrunch)' == '1' and '$(TargetFramework)' == '' and '$(TargetFrameworks)' == ''">
|
||||
<None Include="$(FodyAssemblyDirectory)\*.*" />
|
||||
<None Include="@(WeaverFiles)" />
|
||||
</ItemGroup>
|
||||
|
||||
<UsingTask TaskName="Fody.WeavingTask" AssemblyFile="$(FodyAssembly)" />
|
||||
<UsingTask TaskName="Fody.UpdateReferenceCopyLocalTask" AssemblyFile="$(FodyAssembly)" />
|
||||
<UsingTask TaskName="Fody.VerifyTask" AssemblyFile="$(FodyAssembly)" />
|
||||
|
||||
<Target
|
||||
Name="FodyTarget"
|
||||
AfterTargets="AfterCompile"
|
||||
Condition="Exists(@(IntermediateAssembly)) And $(DesignTimeBuild) != true And $(DisableFody) != true"
|
||||
DependsOnTargets="$(FodyDependsOnTargets)"
|
||||
Inputs="@(IntermediateAssembly);$(ProjectWeaverXml)"
|
||||
Outputs="$(IntermediateOutputPath)$(MSBuildProjectFile).Fody.CopyLocal.cache">
|
||||
|
||||
<Error Condition="($(MsBuildMajorVersion) < 16)"
|
||||
Text="Fody is only supported on MSBuild 16 and above. Current version: $(MsBuildMajorVersion)." />
|
||||
<Fody.WeavingTask
|
||||
AssemblyFile="@(IntermediateAssembly)"
|
||||
IntermediateDirectory="$(ProjectDir)$(IntermediateOutputPath)"
|
||||
KeyOriginatorFile="$(KeyOriginatorFile)"
|
||||
AssemblyOriginatorKeyFile="$(AssemblyOriginatorKeyFile)"
|
||||
ProjectDirectory="$(MSBuildProjectDirectory)"
|
||||
ProjectFile="$(MSBuildProjectFullPath)"
|
||||
SolutionDirectory="$(SolutionDir)"
|
||||
References="@(ReferencePath)"
|
||||
SignAssembly="$(SignAssembly)"
|
||||
ReferenceCopyLocalFiles="@(ReferenceCopyLocalPaths)"
|
||||
DefineConstants="$(DefineConstants)"
|
||||
DebugType="$(DebugType)"
|
||||
DocumentationFile="@(DocFileItem->'%(FullPath)')"
|
||||
WeaverFiles="@(WeaverFiles)"
|
||||
NCrunchOriginalSolutionDirectory="$(NCrunchOriginalSolutionDir)"
|
||||
IntermediateCopyLocalFilesCache="$(IntermediateOutputPath)$(MSBuildProjectFile).Fody.CopyLocal.cache"
|
||||
GenerateXsd="$(FodyGenerateXsd)"
|
||||
>
|
||||
|
||||
<Output
|
||||
TaskParameter="ExecutedWeavers"
|
||||
PropertyName="FodyExecutedWeavers" />
|
||||
|
||||
</Fody.WeavingTask>
|
||||
|
||||
<ItemGroup>
|
||||
<FileWrites Include="$(IntermediateOutputPath)$(MSBuildProjectFile).Fody.CopyLocal.cache" />
|
||||
</ItemGroup>
|
||||
|
||||
</Target>
|
||||
|
||||
<Target
|
||||
Name="FodyUpdateCopyLocalFilesTarget"
|
||||
AfterTargets="FodyTarget"
|
||||
>
|
||||
|
||||
<Fody.UpdateReferenceCopyLocalTask
|
||||
ReferenceCopyLocalFiles="@(ReferenceCopyLocalPaths)"
|
||||
IntermediateCopyLocalFilesCache="$(IntermediateOutputPath)$(MSBuildProjectFile).Fody.CopyLocal.cache"
|
||||
>
|
||||
|
||||
<Output
|
||||
TaskParameter="UpdatedReferenceCopyLocalFiles"
|
||||
ItemName="FodyUpdatedReferenceCopyLocalPaths" />
|
||||
|
||||
</Fody.UpdateReferenceCopyLocalTask>
|
||||
|
||||
<ItemGroup>
|
||||
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" />
|
||||
<ReferenceCopyLocalPaths Include="@(FodyUpdatedReferenceCopyLocalPaths)" />
|
||||
</ItemGroup>
|
||||
|
||||
</Target>
|
||||
|
||||
<Target
|
||||
Name="FodyVerifyTarget"
|
||||
AfterTargets="AfterBuild"
|
||||
Condition="'$(NCrunch)' != '1' And $(FodyExecutedWeavers) != '' And $(DisableFody) != true"
|
||||
DependsOnTargets="$(FodyVerifyDependsOnTargets)">
|
||||
|
||||
<Fody.VerifyTask
|
||||
ProjectDirectory="$(MSBuildProjectDirectory)"
|
||||
TargetPath="$(TargetPath)"
|
||||
SolutionDirectory="$(SolutionDir)"
|
||||
DefineConstants="$(DefineConstants)"
|
||||
NCrunchOriginalSolutionDirectory="$(NCrunchOriginalSolutionDir)"
|
||||
/>
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
BIN
packages/Fody.6.0.0/netclassictask/Fody.dll
vendored
BIN
packages/Fody.6.0.0/netclassictask/Fody.dll
vendored
Binary file not shown.
BIN
packages/Fody.6.0.0/netclassictask/FodyCommon.dll
vendored
BIN
packages/Fody.6.0.0/netclassictask/FodyCommon.dll
vendored
Binary file not shown.
BIN
packages/Fody.6.0.0/netclassictask/FodyHelpers.dll
vendored
BIN
packages/Fody.6.0.0/netclassictask/FodyHelpers.dll
vendored
Binary file not shown.
BIN
packages/Fody.6.0.0/netclassictask/FodyIsolated.dll
vendored
BIN
packages/Fody.6.0.0/netclassictask/FodyIsolated.dll
vendored
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
packages/Fody.6.0.0/netclassictask/Mono.Cecil.dll
vendored
BIN
packages/Fody.6.0.0/netclassictask/Mono.Cecil.dll
vendored
Binary file not shown.
BIN
packages/Fody.6.0.0/netstandardtask/Fody.dll
vendored
BIN
packages/Fody.6.0.0/netstandardtask/Fody.dll
vendored
Binary file not shown.
BIN
packages/Fody.6.0.0/netstandardtask/FodyCommon.dll
vendored
BIN
packages/Fody.6.0.0/netstandardtask/FodyCommon.dll
vendored
Binary file not shown.
BIN
packages/Fody.6.0.0/netstandardtask/FodyHelpers.dll
vendored
BIN
packages/Fody.6.0.0/netstandardtask/FodyHelpers.dll
vendored
Binary file not shown.
BIN
packages/Fody.6.0.0/netstandardtask/FodyIsolated.dll
vendored
BIN
packages/Fody.6.0.0/netstandardtask/FodyIsolated.dll
vendored
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
packages/Fody.6.0.0/netstandardtask/Mono.Cecil.dll
vendored
BIN
packages/Fody.6.0.0/netstandardtask/Mono.Cecil.dll
vendored
Binary file not shown.
BIN
packages/Newtonsoft.Json.12.0.3/.signature.p7s
vendored
BIN
packages/Newtonsoft.Json.12.0.3/.signature.p7s
vendored
Binary file not shown.
20
packages/Newtonsoft.Json.12.0.3/LICENSE.md
vendored
20
packages/Newtonsoft.Json.12.0.3/LICENSE.md
vendored
@@ -1,20 +0,0 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2007 James Newton-King
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user