private void confirmButton_Click(object sender, EventArgs e) { DeviceBoxItem item = this.deviceListBox.SelectedItem as DeviceBoxItem; this.callback(item.devNum); this.Close(); }
private void DeviceList_Load(object sender, EventArgs e) { for (int i = -1; i < WaveOut.DeviceCount; i++) { var boxItem = new DeviceBoxItem(WaveOut.GetCapabilities(i), i); this.deviceListBox.Items.Add(boxItem); } }