private void ButtonPaletteSelector_Click(object sender, EventArgs e) { PaletteEditorForm editorForm = new PaletteEditorForm(this.palette ?? new Palette(this.currentBitDepth)); if (editorForm.ShowDialog() == DialogResult.OK) { this.palette = editorForm.ActivePalette; } }