示例#1
0
        public MainWindow()
        {
            InitializeComponent();

            _inputActivity = new ActivityLight(this);

            inputIds  = new List <int?>();
            outputIds = new List <int?>();

            /*
             * timer = new Timer(50, this); // ms
             * timer.addActionListener(this);
             */
            try
            {
                jpm = new JPM(this, _inputActivity, this);
                jpm.setTrace(true);
                loadDeviceChoices();

                /*
                 * timer.start(); // don't start timer if there's an error
                 */
            }
            catch (CsPortMidiException e)
            {
                Console.WriteLine(e);
            }
        }
示例#2
0
            internal readonly int HALF_BLINK_PERIOD = 250; // ms

            public JPM(MainWindow outerInstance, ActivityLight al, MainWindow df)
            {
                this.outerInstance = outerInstance;
                light      = al;
                frame      = df;
                lightTime  = 0;
                lightState = false; // meaning "off"
                now        = 0;
            }