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:
parent
4f106243e4
commit
bd7ffd3371
@ -56,6 +56,7 @@ namespace TaikoSoundEditor
|
||||
if (!File.Exists(path))
|
||||
{
|
||||
NotFoundFiles.Add(files[i]);
|
||||
sels[i].Path = "";
|
||||
continue;
|
||||
}
|
||||
sels[i].Path = path;
|
||||
|
15
MainForm.cs
15
MainForm.cs
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user