Ejemplo n.º 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();
                    }
                }
        }
Ejemplo n.º 2
0
 internal ButtonStateCollection(NanoKontrol2 parent, NanoKontrol2.ButtonCategory category, bool[] values)
 {
     LEDs     = new LEDCollection(parent, category);
     Values   = values;
     Category = category;
 }
Ejemplo n.º 3
0
 public LEDCollection(NanoKontrol2 parent, NanoKontrol2.ButtonCategory category)
 {
     Parent   = parent;
     Category = category;
 }