private void chkEnable_CheckedChanged(object sender, System.EventArgs e)
        {
            //if(chkEnable.Checked) chkEnable.BackColor = console.ButtonSelectedColor;
            //else chkEnable.BackColor = SystemColors.Control;

            string buttonOffPath = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) +
                                   "\\FlexRadio Systems\\PowerSDR\\Skins\\" + console.CurrentSkin + "\\Console\\chkMON-0.png";

            string buttonOnPath = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) +
                                  "\\FlexRadio Systems\\PowerSDR\\Skins\\" + console.CurrentSkin + "\\Console\\chkMON-1.png";

            Bitmap buttonOffImage = new Bitmap(buttonOffPath);
            Bitmap buttonOnImage  = new Bitmap(buttonOnPath);

            if (chkEnable.Checked)
            {
                chkEnable.BackgroundImage = buttonOnImage;
            }
            else
            {
                chkEnable.BackgroundImage = buttonOffImage;
            }

            if (chkEnable.Checked)
            {
                if (!console.RX2Enabled)
                {
                    console.RX2Enabled = true;
                }
            }
            DttSP.SetDiversity(Convert.ToInt16(chkEnable.Checked));
        }
Exemplo n.º 2
0
 private void chkEnable_CheckedChanged(object sender, System.EventArgs e)
 {
     if (chkEnable.Checked)
     {
         chkEnable.BackColor = console.ButtonSelectedColor;
     }
     else
     {
         chkEnable.BackColor = SystemColors.Control;
     }
     if (chkEnable.Checked)
     {
         if (!console.RX2Enabled)
         {
             console.RX2Enabled = true;
         }
     }
     DttSP.SetDiversity(Convert.ToInt16(chkEnable.Checked));
 }