Beispiel #1
0
 void ifk_OutputChange(object sender, OutputChangeEventArgs e)
 {
     this.Dispatcher.Invoke(new Action(delegate()
     {
         digiOutDispChkArray[e.Index].IsChecked = e.Value;
     }));
 }
Beispiel #2
0
        //Digital output change event handler
        //Here we check or uncheck the corresponding output checkbox
        //based on the index of the output that generated the event
        void ifKit_OutputChange(object sender, OutputChangeEventArgs e)
        {
            m_outputChangeEvents++;
            Console.WriteLine("m_outputChangeEvents {0}", m_outputChangeEvents);
            if (Ready && m_readySent == false)
            {
                if (m_readyEvent != null)
                {
                    m_readyEvent.Set();
                }
                m_readySent = true;
                m_pCallback(PhidgetCallbackCode.PHIDGET_READY);
            }
            //digiOutDispArray[e.Index].Checked = e.Value;
            m_output[e.Index] = e.Value;

            if (m_outEvent != null)
            {
                m_eventCode[PhidgetCallbackCode.OUTPUTCHANGE]++;
                m_outEvent.Set();
            }
        }
Beispiel #3
0
 //digital output change event handler... here we check or uncheck the corresponding output checkbox based on the index of
 //the output that generated the event
 void ifk_OutputChange(object sender, OutputChangeEventArgs e)
 {
     digiOutArray[e.Index].Checked = e.Value;
 }
 static void ifKit_OutputChange(object sender, OutputChangeEventArgs e)
 {
     Console.WriteLine("Output index {0} value {0}" + " " + e.Index + " " + e.Value.ToString());
 }
Beispiel #5
0
 //Output change event handler...Display the output index and the new valu to
 //the console
 static void ifKit_OutputChange(object sender, OutputChangeEventArgs e)
 {
     //Console.WriteLine("Output index {0} value {0}", e.Index, e.Value.ToString());
 }
            //Output change event handler...Display the output index and the new valu to 
            //the console
            public void ifKit_OutputChange(object sender, OutputChangeEventArgs e)
            {
                Console.WriteLine("Output index {0} value {1}", e.Index, e.Value.ToString());

                try
                {
                    PhidgetStarterKitModule phidgetData = (PhidgetStarterKitModule)_phidgetData;
                    phidgetData.DigitalOutput[e.Index] = e.Value;
                    // Call SendToPhidgetClients(PSx, data).
                    Console.WriteLine(string.Format("SendToPhidgetClients: {0} / {1}", _phidgetServerDetails.MachineName, _phidgetData.ToString()));
                    _phidgetServer.PhidgetServerHubProxy.Invoke("SendToPhidgetClients", _phidgetServerDetails, phidgetData).ContinueWith(task =>
                    {
                        if (task.IsFaulted)
                        {
                            Console.WriteLine("!!! There was an error on SendToPhidgetClients call: {0}  \n", task.Exception.GetBaseException().Message);
                        }
                    }).Wait();
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.Message);
                }
            }
Beispiel #7
0
 //digital output change event handler... here we check or uncheck the corresponding output checkbox based on the index of
 //the output that generated the event
 void ifk_OutputChange(object sender, OutputChangeEventArgs e)
 {
     digiOutArray[e.Index].Checked = e.Value;
 }
Beispiel #8
0
 void OutputChange(object sender, OutputChangeEventArgs e)
 {
 }
 void ifk_OutputChange(object sender, OutputChangeEventArgs e)
 {
     this.Dispatcher.Invoke(new Action(delegate()
         {
             digiOutDispChkArray[e.Index].IsChecked = e.Value;
         }));
 }