예제 #1
0
        private void UpdateDeviceListLocal()
        {
            //bool itemFound = false;
            MidiMap device = DeviceList.SelectedItem as MidiMap;

            DeviceList.BeginUpdate();
            DeviceList.Items.Clear();
            foreach (MidiMap map in MidiMapManager.Maps.Values)
            {
                DeviceList.Items.Add(map);
            }

            DeviceList.SelectedItem = device;

            if (DeviceList.Items.Count > 0 && DeviceList.SelectedIndex == -1)
            {
                DeviceList.SelectedIndex = 0;
            }
            DeviceList.EndUpdate();
        }