コード例 #1
0
        private void btnDisconnect_Click(object sender, EventArgs e)
        {
            if (eval != null)
            {
                propertyGrid1.SelectedObject = null;

                eval.Dispose();
                eval = null;
            }
        }
コード例 #2
0
        private void btnConnect_Click(object sender, EventArgs e)
        {
            if (cbBoardList.SelectedIndex > -1)
            {
                var item = cbBoardList.SelectedItem.ToString();

                byte part = Convert.ToByte(item);
                eval = new AD5933_Eval(part)
                {
                    StartFrequency      = 10000,
                    IncFrequency        = 2000,
                    Steps               = 45,
                    SettlingCycles      = 15,
                    PGAControl          = AD5933_Eval.PgaGain.x1,
                    CalibrationResistor = 330000.0,
                    ExcitationVoltage   = AD5933_Eval.OutputRange.Range1,
                };

                propertyGrid1.SelectedObject = eval;
            }
        }