private void paletteCombo_SelectedIndexChanged(object sender, EventArgs e) { try { Mandel.SetPalette(((Func <int[]>)(paletteCombo.SelectedValue))()); } catch { return; } optionsPanel.Visible = false; RunRedraw(); }
private void Form1_Load(object sender, EventArgs e) { m_scale = 0.01; m_xcenter = -1; m_ycenter = 0; m_xbase = -1 - ClientSize.Width * m_scale / 2; m_ybase = 0 - ClientSize.Height * m_scale / 2; paletteCombo.DataSource = new BindingSource(PaletteGenerator.Palettes, null); paletteCombo.DisplayMember = "Key"; paletteCombo.ValueMember = "Value"; Mandel.SetPalette(PaletteGenerator.Palettes["Default"]()); RunRedraw(); }