1
0
mirror of synced 2024-11-23 20:10:57 +01:00

Remember state of UseEncryption box

DirSelector_PathChanged was called two times on app startup.
We now also clear individual paths when a given file isn't found in the datatable folder.
This commit is contained in:
Farewell_ 2024-03-21 12:34:20 +01:00
parent 4f106243e4
commit bd7ffd3371
2 changed files with 10 additions and 6 deletions

View File

@ -56,6 +56,7 @@ namespace TaikoSoundEditor
if (!File.Exists(path))
{
NotFoundFiles.Add(files[i]);
sels[i].Path = "";
continue;
}
sels[i].Path = path;

View File

@ -22,13 +22,11 @@ namespace TaikoSoundEditor
DirSelector.PathChanged += DirSelector_PathChanged;
UseEncryptionBox.Checked = Config.UseEncryption;
UseEncryptionBox_CheckedChanged(null, null); // update state of the key two text boxes
//If path is set for the datatable folder, update paths for all the files.
if (Config.DatatablesPath != "")
{
DirSelector.Path = Config.DatatablesPath;
DirSelector_PathChanged(null, null);
}
if (Config.DatatablesPath != "") DirSelector.Path = Config.DatatablesPath;
DatatableKeyBox.Text = Config.DatatableKey;
FumenKeyBox.Text = Config.FumenKey;
@ -444,6 +442,11 @@ namespace TaikoSoundEditor
}
}
private void UseEncryptionBox_CheckedChanged(object sender, EventArgs e) => Config.UseEncryption = UseEncryptionBox.Checked;
private void UseEncryptionBox_CheckedChanged(object sender, EventArgs e)
{
Config.UseEncryption = UseEncryptionBox.Checked;
FumenKeyBox.Enabled = UseEncryptionBox.Checked;
DatatableKeyBox.Enabled = UseEncryptionBox.Checked;
}
}
}