Hash: SHA256 RSL 2.1.3.2 + Added checkbox to enable Enter to Download+Install. = Fixed crash that occurred when user held down up arrow or down arrow on gamelist. = Fixed all issues with Install.txt path. = Clicking out of search box now closes it. -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKjgtlwMyrpVu4TGfx/Rql1VoczcFAmDsFZ8ACgkQx/Rql1Vo czcwJg/+PFiXfh6PPZNIRf2Zeht7WN8oxuUFV907KnD5+gKD0rzNd1NzgrcPOgAh /oJakvY6ryLyaopJFZ8bm7++tQ3w6mbnzPaGweNoOF7/oLDb9NKVlK5/VjA3JPPN QtOebRgBsigoRGGTq0s7ZRZV99vtSm2R1+1z9qlEu5Fm2hEiIggLvSBdGWDhbGnZ jnvAZixeYgR+R6x4MZTsDao+qIYMio7heiVdN03gQ4hAaPbZ/I6s3cS+K33k02Nz IEATqkwoLOevmN/D773A0cMzh/ZQWs557E3aKtwB+EHo/0ucCk0WaMSt4WdH8Qqe WWF6+UT8FEEN2M76SQrg80xBj3QxzfIi92c231rVvtHMiVn5qUhTrDYb2wqx7J99 cJeMgANBmWSBZRBNW7jwhAxUVXE9vE8eqBza9MarXbJaLtq3Mf0ECLWvFPllA8dU lnBcdSuTESvZkBAokkCwEJOb7sootBpEz5BZtE268mZEfsHUGWo3/VZDrJ7lLXJW mEE2aCcHpNWysa9CsSee/QWNgLH2v+9PM3r/1SJyQ23C2hwyQI+F2lkch8Ar5Qfn YxMWnhAcYXTRtcxY0s7xuhpUr/TGc6m9QY6NeVYMvb3g1gbmGOyyN/MELNOkEF/l FXnrY4AfaNTs6EL6/id/viGcHc1MnnjgzlTNg5rgoxtFrHdVwP4= =o0TQ -----END PGP SIGNATURE-----
138 lines
5.6 KiB
C#
138 lines
5.6 KiB
C#
using JR.Utils.GUI.Forms;
|
|
using System;
|
|
using System.IO;
|
|
using System.Windows.Forms;
|
|
|
|
namespace AndroidSideloader
|
|
{
|
|
public partial class SettingsForm : Form
|
|
{
|
|
public SettingsForm()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void SettingsForm_Load(object sender, EventArgs e)
|
|
{
|
|
this.CenterToParent();
|
|
|
|
intSettings();
|
|
|
|
intToolTips();
|
|
}
|
|
|
|
//Init form objects with values from settings
|
|
private void intSettings()
|
|
{
|
|
checkForUpdatesCheckBox.Checked = Properties.Settings.Default.checkForUpdates;
|
|
enableMessageBoxesCheckBox.Checked = Properties.Settings.Default.enableMessageBoxes;
|
|
deleteAfterInstallCheckBox.Checked = Properties.Settings.Default.deleteAllAfterInstall;
|
|
updateConfigCheckBox.Checked = Properties.Settings.Default.autoUpdateConfig;
|
|
userJsonOnGameInstall.Checked = Properties.Settings.Default.userJsonOnGameInstall;
|
|
if (Properties.Settings.Default.BandwithLimit.Length>1)
|
|
{
|
|
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();
|
|
}
|
|
|
|
}
|
|
|
|
void intToolTips()
|
|
{
|
|
ToolTip checkForUpdatesToolTip = new ToolTip();
|
|
checkForUpdatesToolTip.SetToolTip(this.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");
|
|
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");
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void DebugLogCopy_click(object sender, EventArgs e)
|
|
{
|
|
if (File.Exists($"{Properties.Settings.Default.MainDir}\\debuglog.txt"))
|
|
{
|
|
if (File.Exists($"{Environment.GetFolderPath(Environment.SpecialFolder.Desktop)}\\debuglog.txt"))
|
|
File.Delete($"{Environment.GetFolderPath(Environment.SpecialFolder.Desktop)}\\debuglog.txt");
|
|
System.IO.File.Copy($"{Properties.Settings.Default.MainDir}\\debuglog.txt", $"{Environment.GetFolderPath(Environment.SpecialFolder.Desktop)}\\debuglog.txt", true);
|
|
MessageBox.Show("debuglog.txt copied to your desktop!");
|
|
|
|
}
|
|
}
|
|
|
|
private void CrashLogCopy_click(object sender, EventArgs e)
|
|
{
|
|
if (File.Exists($"{Properties.Settings.Default.MainDir}\\crashlog.txt"))
|
|
{
|
|
if (File.Exists($"{Environment.GetFolderPath(Environment.SpecialFolder.Desktop)}\\crashlog.txt"))
|
|
File.Delete($"{Environment.GetFolderPath(Environment.SpecialFolder.Desktop)}\\crashlog.txt");
|
|
System.IO.File.Copy($"{Properties.Settings.Default.MainDir}\\crashlog.txt", $"{Environment.GetFolderPath(Environment.SpecialFolder.Desktop)}\\crashlog.txt", true);
|
|
MessageBox.Show("crashlog.txt copied to your desktop!");
|
|
|
|
|
|
}
|
|
else
|
|
MessageBox.Show("No crashlog found!");
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//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!");
|
|
}
|
|
|
|
private void checkForUpdatesCheckBox_CheckedChanged(object sender, EventArgs e)
|
|
{
|
|
Properties.Settings.Default.checkForUpdates = checkForUpdatesCheckBox.Checked;
|
|
}
|
|
|
|
private void enableMessageBoxesCheckBox_CheckedChanged(object sender, EventArgs e)
|
|
{
|
|
Properties.Settings.Default.enableMessageBoxes = enableMessageBoxesCheckBox.Checked;
|
|
}
|
|
|
|
private void resetSettingsButton_Click(object sender, EventArgs e)
|
|
{
|
|
Properties.Settings.Default.Reset();
|
|
intSettings();
|
|
}
|
|
|
|
private void deleteAfterInstallCheckBox_CheckedChanged(object sender, EventArgs e)
|
|
{
|
|
Properties.Settings.Default.deleteAllAfterInstall = deleteAfterInstallCheckBox.Checked;
|
|
}
|
|
|
|
private void updateConfigCheckBox_CheckedChanged(object sender, EventArgs e)
|
|
{
|
|
Properties.Settings.Default.autoUpdateConfig = updateConfigCheckBox.Checked;
|
|
}
|
|
|
|
private void userJsonOnGameInstall_CheckedChanged(object sender, EventArgs e)
|
|
{
|
|
Properties.Settings.Default.userJsonOnGameInstall = userJsonOnGameInstall.Checked;
|
|
}
|
|
|
|
}
|
|
}
|