コード例 #1
0
        } //  buttonDel_Click

        //=================================================================================
        // ke9ns ADD button
        public void button1_Click(object sender, EventArgs e)
        {
            bool dupfound = false;

            updateindex();
            if (console.band_stacks[nnn] < 12)                        // allow 12 bandstack entries each band
            {
                for (int ii = 0; ii < console.band_stacks[nnn]; ii++) // check for freq dups, so dont add if a dup in freq
                {
                    if (freq1[ii] == Math.Round(console.VFOAFreq, 6))
                    {
                        dupfound = true;
                        break;
                    }
                }
                if (dupfound == false)
                {
                    DB.AddBandStack(band_list[nnn], console.RX1DSPMode.ToString(), console.RX1Filter.ToString(), Math.Round(console.VFOAFreq, 6)); // take current band, DSP mode, filter, and freq

                    console.BandStackUpdate();
                    bandstackupdate();


                    xxx = console.band_stacks[nnn] - 1; // go to end of list and highlight it

                    textBox1.SelectionStart  = (xxx * BSLength);
                    textBox1.SelectionLength = BSLength;
                    updateindex();
                    //  console.iii = xxx;                            // update new position in bandstack for checking if its locked
                }


                dupfound = false;
            } //  if (xxx < 12)
        }     // button1_Click(