コード例 #1
0
        private void comboBoxDeviceAddress_SelectedIndexChanged(object sender, EventArgs e)
        {
            comboBoxCommand.DataSource = null;
            ArrayList deviceCommandList = dbMgr.GetAvailableCommands(comboBoxDeviceAddress.SelectedValue.ToString());

            comboBoxCommand.DataSource = deviceCommandList;
        }
コード例 #2
0
        private void InitializeForm()
        {
            dbMgr = new DBManager();

            comboBoxDeviceAddress.DataSource = Enum.GetValues(typeof(DeviceAddresses));
            if (dbMgr.OpenConfig(configFileName))
            {
                ArrayList deviceCommandList = dbMgr.GetAvailableCommands(comboBoxDeviceAddress.SelectedValue.ToString());
                comboBoxCommand.DataSource = deviceCommandList;
            }

            for (int i = 0; i < 12; i++)
            {
                CustomByteData customBytedata = new CustomByteData();
                //
                // customByteData
                //

                customBytedata.Location           = new System.Drawing.Point(27, 200 + i * 30);
                customBytedata.Name               = "customByteData1";
                customBytedata.Size               = new System.Drawing.Size(500, 37);
                customBytedata.TabIndex           = 6 + i;
                customBytedata.TxtDataDescription = "";
                dataBytes.Add(customBytedata);
                this.Controls.Add(customBytedata);
            }
            try
            {
                comboBoxCommand.SelectedIndex = comboBoxCommand.Items.Count - 1;
            }
            catch
            {
            }
        }
コード例 #3
0
ファイル: Form1.cs プロジェクト: fenogy/V25-Emulator
        private void FillCommandBox()
        {
            dbMgr = new DBManager();
            dbMgr.OpenConfig(configFileName);
            ArrayList deviceCommandList = dbMgr.GetAvailableCommands(comboBoxDeviceType.Text);

            comboBoxCommand.DataSource = null;
            comboBoxCommand.DataSource = deviceCommandList;
            // comboBoxCommand.Sorted = true;
        }