public ChromaForm() { BassNet.Registration("*****@*****.**", "2X3133714161117"); InitializeComponent(); pbsGradient = new PictureBox[6] { cGradient1, cGradient2, cGradient3, cGradient4, cGradient5, cGradient6 }; pbsPreset = new PictureBox[6] { pGradient1, pGradient2, pGradient3, pGradient4, pGradient5, pGradient6 }; pl = new PresetList(); _as = new AudioSpectrum(); _as.OnSpectrumData += OnSpectrumData; _as.OnVolume += OnVolume; }
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { List<int[]> gradient = new List<int[]>(); foreach (PictureBox c in pbsGradient) { gradient.Add(new int[3] { c.BackColor.R, c.BackColor.G, c.BackColor.B }); } Config.writeConfig(spectrumSensitivity.SelectedIndex, colorMode.SelectedIndex, gradient, new int[3] { cGradient7.BackColor.R, cGradient7.BackColor.G, cGradient7.BackColor.B }); _as.Stop(); _as.Dispose(); gradient = null; _as = null; }