MPTagThat.FileNameToTag.FileNameToTag.btAddFormat_Click C# (CSharp) Method

btAddFormat_Click() private method

Adds the current Format to the list
private btAddFormat_Click ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        private void btAddFormat_Click(object sender, EventArgs e)
        {
            bool found = false;
              foreach (string format in Options.FileNameToTagSettings.FormatValues)
              {
            if (format == cbFormat.Text)
            {
              found = true;
              break;
            }
              }

              if (!found)
              {
            Options.FileNameToTagSettings.FormatValues.Add(cbFormat.Text);
            Options.FileNameToTagSettings.Save();

            Options.FileNameToTagSettingsTemp.Add(cbFormat.Text);
            cbFormat.Items.Add(new Item(cbFormat.Text, cbFormat.Text, ""));
              }
        }