private void HandlesLoadToolStripMenuItemClick(string settingsFile)
{
if (!string.IsNullOrEmpty(settingsFile))
{
IJsonSerializationService<BatchGuyEAC3ToSettings> jsonSerializationService = new JsonSerializationService<BatchGuyEAC3ToSettings>();
IBatchGuyEAC3ToSettingsService batchGuyEAC3ToSettingsService = new BatchGuyEAC3ToSettingsService(jsonSerializationService);
_batchGuyEAC3ToSettings = batchGuyEAC3ToSettingsService.GetBatchGuyEAC3ToSettings(settingsFile);
if (batchGuyEAC3ToSettingsService.Errors.Count() > 0)
{
MessageBox.Show(batchGuyEAC3ToSettingsService.Errors.GetErrorMessage(), "Error Occurred.", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else if (_batchGuyEAC3ToSettings.EAC3ToSettings.IsExtractForRemux)
{
MessageBox.Show("You cannot load a (.batchGuyEac3toSettings) file that is for Remuxing!", "Error Occurred.", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else
{
this.LoadScreen();
gbScreen.SetEnabled(true);
saveToolStripMenuItem.Enabled = true;
createAviSynthavsFilesToolStripMenuItem.Enabled = true;
}
}
}