/// <summary> /// Apply the changes to the selected files. /// </summary> /// <param name = "sender"></param> /// <param name = "e"></param> 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(); } }
/// <summary> /// Text in the Combo is been changed, Update the Preview Values /// </summary> /// <param name = "sender"></param> /// <param name = "e"></param> private void cbFormat_TextChanged(object sender, EventArgs e) { if (!_isPreviewFilled) { return; } if (Util.CheckParameterFormat(cbFormat.Text, Options.ParameterFormat.FileNameToTag)) { TagFormat tagFormat = new TagFormat(cbFormat.Text); List <ParameterPart> parts = tagFormat.ParameterParts; FileName2TagPreview(parts); } }
/// <summary> /// Text in the Combo is been changed, Update the Preview Values /// </summary> /// <param name = "sender"></param> /// <param name = "e"></param> private void cbFormat_TextChanged(object sender, EventArgs e) { if (!_isPreviewFilled) return; if (Util.CheckParameterFormat(cbFormat.Text, Options.ParameterFormat.FileNameToTag)) { TagFormat tagFormat = new TagFormat(cbFormat.Text); List<ParameterPart> parts = tagFormat.ParameterParts; FileName2TagPreview(parts); } }
/// <summary> /// Apply the changes to the selected files. /// </summary> /// <param name = "sender"></param> /// <param name = "e"></param> 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(); } }