fix window enable/disable cross thread

closes #300
This commit is contained in:
Kurt
2018-03-16 21:13:51 -07:00
parent 0f9eaee8ef
commit af4e6ca805

View File

@@ -599,21 +599,16 @@ private void B_Wild_Click(object sender, EventArgs e)
case 6:
files = new[] { "encdata" };
if (Config.ORAS)
{
Enabled = false;
action = () => new RSWE().ShowDialog();
}
else if (Config.XY)
{
Enabled = false;
action = () => new XYWE().ShowDialog();
}
else return;
Invoke((MethodInvoker)delegate { Enabled = false; });
fileGet(files, false);
Invoke(action);
fileSet(files);
Enabled = true;
Invoke((MethodInvoker)delegate { Enabled = true; });
break;
case 7:
Invoke((MethodInvoker)delegate { Enabled = false; });