private void btApply_Click(object sender, EventArgs e)
{
if (!Util.CheckParameterFormat(cbFormat.Text, Options.ParameterFormat.FileNameToTag))
MessageBox.Show(localisation.ToString("TagAndRename", "InvalidParm"),
localisation.ToString("message", "Error_Title"), MessageBoxButtons.OK);
else
{
TagFormat tagFormat = new TagFormat(cbFormat.Text);
List<ParameterPart> parts = tagFormat.ParameterParts;
FileName2Tag(parts);
// Did we get a new Format in the list, then store it temporarily
bool newFormat = true;
foreach (string format in Options.FileNameToTagSettingsTemp)
{
if (format == cbFormat.Text)
{
newFormat = false;
break;
}
}
if (newFormat)
Options.FileNameToTagSettingsTemp.Add(cbFormat.Text);
Options.FileNameToTagSettings.LastUsedFormat = cbFormat.SelectedIndex;
_main.ShowTagEditPanel(true);
Dispose();
}
}