private void AddPaletteButton_Click(object sender, EventArgs e)
        {
            NewPaletteDialog dialog = new NewPaletteDialog();
            if(dialog.ShowDialog() == DialogResult.OK)
            {
                List<PaletteForm> currentPaletteForms = CurrentPaletteForms;
                if(PaletteNameAlreadyExists(dialog, currentPaletteForms))
                {
                    MessageBox.Show("That name already exists!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                else
                {
                    PaletteForm paletteForm = new PaletteForm(this, dialog.PaletteName, dialog.PaletteDomain, _fsf);
                    currentPaletteForms.Add(paletteForm);
                    CurrentPaletteForms = currentPaletteForms;
                    PalettesListBox.SelectedIndex = PalettesListBox.Items.Count - 1;
                    paletteForm.Show();
                    paletteForm.BringToFront();

                    SetGroupBoxIsUnconfirmed(PalettesGroupBox, null, RevertPalettesListButton);
                }
            }
        }
 private bool PaletteNameAlreadyExists(NewPaletteDialog dialog, List<PaletteForm> currentPaletteForms)
 {
     bool rval = false;
     foreach(PaletteForm paletteForm in currentPaletteForms)
     {
         if(paletteForm.SavedName == dialog.PaletteName)
         {
             rval = true;
             break;
         }
     }
     return rval;
 }