Beispiel #1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            SynchronizationContext.SetSynchronizationContext(new WindowsFormsSynchronizationContext());

            for (var i = 0; i < Ports.Length; i++)
            {
                Ports[i]         = new VirtualMidiPort("Virtual TotalMix Channel " + i, false);
                Ports[i].OnData += Vm_OnData;
            }
            Console.WriteLine("Virtual TotalMix device active");

            using (var nk2 = NK2 = new NanoKontrol2())
                try {
                    nk2.OnControlChanged += Nk2_OnChanged;
                    nk2.OnButtonChanged  += Nk2_OnButtonChanged;

                    Application.Run();
                } finally {
                    foreach (var port in Ports)
                    {
                        port.Dispose();
                    }
                }
        }
Beispiel #2
0
 internal ButtonStateCollection(NanoKontrol2 parent, NanoKontrol2.ButtonCategory category, bool[] values)
 {
     LEDs     = new LEDCollection(parent, category);
     Values   = values;
     Category = category;
 }
Beispiel #3
0
 public LEDCollection(NanoKontrol2 parent, NanoKontrol2.ButtonCategory category)
 {
     Parent   = parent;
     Category = category;
 }