Пример #1
0
        public MainWindow()
        {
            InitializeComponent();

            var materialSkinManager = MaterialSkinManager.Instance;

            materialSkinManager.AddFormToManage(this);
            materialSkinManager.Theme       = MaterialSkinManager.Themes.LIGHT;
            materialSkinManager.ColorScheme = new ColorScheme(Primary.DeepOrange300, Primary.DeepOrange800, Primary.DeepOrange500, Accent.DeepOrange400, TextShade.WHITE);

            DeviceTypeMenu.SelectedIndex = 0;

            // Select all midi channels by default
            EventMidiChannelSelector.Items.Clear();
            for (int i = 0; i < MidiChannelSelector.Items.Count; i++)
            {
                MidiChannelSelector.SetItemChecked(i, true);
                midiChannels.Add(i + 1);

                // populate the midi channel dropdown with the midi channels
                EventMidiChannelSelector.Items.Add("Ch" + (i + 1));
            }

            for (int i = 0; i < InputDevice.DeviceCount; i++)
            {
                // loop through availible midi devices and push their names to the menu
                MidiDeviceSelector.Items.Add(InputDevice.GetDeviceCapabilities(i).name);

                TrayMenuConnect.DropDownItems.Add(InputDevice.GetDeviceCapabilities(i).name);
            }

            TrayMenuConnect.DropDownItemClicked += new ToolStripItemClickedEventHandler(TrayConnect_Click);
        }
Пример #2
0
 private void SelectNone_Click(object sender, EventArgs e)
 {
     EventMidiChannelSelector.Items.Clear();
     for (int i = 0; i < MidiChannelSelector.Items.Count; i++)
     {
         MidiChannelSelector.SetItemChecked(i, false);
         midiChannels.Clear();
     }
 }
Пример #3
0
        private void SelectAll_Click(object sender, EventArgs e)
        {
            EventMidiChannelSelector.Items.Clear();
            for (int i = 0; i < MidiChannelSelector.Items.Count; i++)
            {
                MidiChannelSelector.SetItemChecked(i, true);
                midiChannels.Add(i + 1);

                // populate the midi channel dropdown with the midi channels
                EventMidiChannelSelector.Items.Add("Ch" + (i + 1));
            }
        }