Ejemplo n.º 1
0
 void ifk_InputChange(object sender, InputChangeEventArgs e)
 {
     this.Dispatcher.Invoke(new Action(delegate()
     {
         digiInChkArray[e.Index].IsChecked = e.Value;
     }));
 }
Ejemplo n.º 2
0
 //Digital input change event handler
 //Here we check or uncheck the corresponding input checkbox based
 //on the index of the digital input that generated the event
 void ifKit_InputChange(object sender, InputChangeEventArgs e)
 {
     //digiInArray[e.Index].Checked = e.Value;
     m_inputs[e.Index] = e.Value;
     if (m_inEvent != null)
     {
         m_eventCode[PhidgetCallbackCode.INPUTCHANGE]++;
         m_inEvent.Set();
     }
 }
Ejemplo n.º 3
0
        private void InputChange(object sender, InputChangeEventArgs e)
        {
            Dispatcher.Invoke(DispatcherPriority.Normal, (Action)(() =>
            {
                // We only care about the index we are looking at.
                if (e.Index == Index && Convertor != null)
                {
                    // this is kinda a hack. Pass 0 for false,
                    // anything else for true
                    int value = 0;
                    if (IfKit.inputs[Index])
                    {
                        value = 1;
                    }

                    SetString(Convertor(value));
                }
            }));
        }
Ejemplo n.º 4
0
        // The input has changed, do the work here
        private void InputChange(object sender, InputChangeEventArgs ex)
        {
            // If e.CurrentValue is true, then it used to be false.
            // Trigger when appropriate

            // We are dealing with the right input
            if (ex.Index == index)
            {
                // If its true and we turn on when it turns on
                // then trigger
                if (ex.Value && onWhenOn)
                {
                    Trigger();
                }
                else if (!ex.Value && !onWhenOn)
                {
                    // otherwise, if it its off, and we trigger
                    // when it turns off, then trigger
                    Trigger();
                }
            }
        }
Ejemplo n.º 5
0
 //Input Change event handler....Display the Input index and the new input value
 static void stepper_InputChange(object sender, InputChangeEventArgs e)
 {
     Console.WriteLine("Input {0} changed! New Value: {1}", e.Index.ToString(),
                                 e.Value.ToString());
 }
Ejemplo n.º 6
0
 //Input Change event handler....Display the Input index and the new input value
 public void stepper_InputChange(object sender, InputChangeEventArgs e)
 {
     Console.WriteLine("Input {0} changed! New Value: {1}", e.Index.ToString(),
                       e.Value.ToString());
 }
Ejemplo n.º 7
0
 void InputChange(object sender, InputChangeEventArgs e)
 {
     FChanged = true;
 }
Ejemplo n.º 8
0
        //Input Change event handler...Display the input index and the new value to the
        //console
        void ifKit_InputChange(object sender, InputChangeEventArgs e)
        {
            if (Program.mainForm == null)
                return;

            bool isPressed = !((InterfaceKit)sender).inputs[e.Index];

            if (isPressed)
                Program.mainForm.handleMouseDown(false);
            else
                Program.mainForm.handleMouseUp(false);

            /*
            if(((InterfaceKit)sender).SerialNumber.ToString() == "13508")
                //then Polhemus
            {
                switch (e.Index + 1)
                {
                    case 1:
                        if (polhemusController.isUser1Touching == true)
                        {
                            polhemusController.isUser1Touching = false;
                            //tell table player 1 clicked
                            polhemusController.stationDidClick(1);
                        }
                        else
                        {
                            polhemusController.isUser1Touching = true;
                        }
                        break;
                    case 2:
                        if (polhemusController.isUser2Touching == true)
                        {
                            polhemusController.isUser2Touching = false;
                            //tell table player 2 clicked
                            polhemusController.stationDidClick(2);
                        }
                        else
                        {
                            polhemusController.isUser2Touching = true;
                        }
                        break;
                }
            }*/
        }
Ejemplo n.º 9
0
 //Input Change event handler...DIsplay the new value of te digital input
 //(the pushbutton) to the console
 static void encoder_InputChange(object sender, InputChangeEventArgs e)
 {
     Console.WriteLine("Input {0} value {1}", e.Index, e.Value);
 }
 void ifk_InputChange(object sender, InputChangeEventArgs e)
 {
     this.Dispatcher.Invoke(new Action(delegate()
         {
             digiInChkArray[e.Index].IsChecked = e.Value;
         }));
 }
Ejemplo n.º 11
0
 //Input Change event handler....on the current Phidget Encoders, this means the pushbutton in the knob.
 //Event arguements contain the input index (on current Phidget Encoders will only be 1) and the value, a bool
 //to represent clicked or unlcicked state
 void encoder_InputChange(object sender, InputChangeEventArgs e)
 {
     ((CheckBox)inputArray[e.Index]).Checked = e.Value;
 }
Ejemplo n.º 12
0
 //Input Change event handler...DIsplay the new value of te digital input
 //(the pushbutton) to the console
 static void encoder_InputChange(object sender, InputChangeEventArgs e)
 {
     Console.WriteLine("Input {0} value {1}", e.Index, e.Value);
 }
Ejemplo n.º 13
0
 void stepper_InputChange(object sender, InputChangeEventArgs e)
 {
     ((CheckBox)inputsGrp.Controls["input" + e.Index.ToString() + "Chk"]).Checked = e.Value;
 }
Ejemplo n.º 14
0
 private void InputChange(object sender, InputChangeEventArgs e)
 {
 }
Ejemplo n.º 15
0
        //Input change event handler...display the result of a digital input change
        void motoControl_InputChange(object sender, InputChangeEventArgs e)
        {
            CheckBox inputCheck = ((CheckBox)digitalInputsGroup.Controls["input" + e.Index + "Chk"]);

            inputCheck.Checked = e.Value;
        }
Ejemplo n.º 16
0
 void motoControl_InputChange(object sender, InputChangeEventArgs e)
 {
 }
Ejemplo n.º 17
0
 //Input Change event handler....on the current Phidget Encoders, this means the pushbutton in the knob.
 //Event arguements contain the input index (on current Phidget Encoders will only be 1) and the value, a bool
 //to represent clicked or unlcicked state
 void encoder_InputChange(object sender, InputChangeEventArgs e)
 {
     ((CheckBox)inputArray[e.Index]).Checked = e.Value;
 }
Ejemplo n.º 18
0
 //Input change event handler. Dislay the index and new input value to console
 static void motoControl_InputChange(object sender, InputChangeEventArgs e)
 {
     Console.WriteLine("Input Index {0} Value {1}", e.Index, e.Value);
 }
Ejemplo n.º 19
0
 //Input change event handler. Dislay the index and new input value to console
 void motoControl_InputChange(object sender, InputChangeEventArgs e)
 {
     lbEvents.Items.Add(string.Format("Input Index {0} Value {1}", e.Index, e.Value));
 }
Ejemplo n.º 20
0
 //digital input change event handler... here we check or uncheck the corresponding input checkbox based on the index of
 //the digital input that generated the event
 void ifk_InputChange(object sender, InputChangeEventArgs e)
 {
     digiInArray[e.Index].Checked = e.Value;
 }
Ejemplo n.º 21
0
 //Input Change event handler
 void ifKit_InputChange(object sender, InputChangeEventArgs e)
 {
     // A cartridge has been inserted
     _cartridgeInserted = true;
 }
Ejemplo n.º 22
0
 void stepper_InputChange(object sender, InputChangeEventArgs e)
 {
     ((CheckBox)inputsGrp.Controls["input" + e.Index.ToString() + "Chk"]).Checked = e.Value;
 }
Ejemplo n.º 23
0
 //Input change event handler...display the result of a digital input change
 void motoControl_InputChange(object sender, InputChangeEventArgs e)
 {
     CheckBox inputCheck = ((CheckBox)digitalInputsGroup.Controls["input" + e.Index + "Chk"]);
     inputCheck.Checked = e.Value;
 }
 //Input Change event handler...Display the input index and the new value to the 
 //console
 public void ifKit_InputChange(object sender, InputChangeEventArgs e)
 {
     Console.WriteLine("Input index {0} value {1}", e.Index, e.Value.ToString());
 }
 static void ifKit_InputChange(object sender, InputChangeEventArgs e)
 {
     Console.WriteLine("Input index {0} value {1}" + " " + e.Index + " " + e.Value.ToString());
 }
Ejemplo n.º 26
0
        void ifKit_InputChange(object sender, InputChangeEventArgs e)
        {
            if (e.Index == 1)
            {
                vindTick = vindTick + 1;
            }

            if (e.Index == 2)
            {
                rainTick = rainTick + 1;
            }

            //try
            //{
            //    _888IfKitRep obj = new _888IfKitRep();
            //    obj.SetInput(e.Index, ifKit.inputs[e.Index], Serialnumber);

            //    //MessageBox.Show(ifKit.inputs[e.Index].ToString());
            //}
            //catch (Exception ex)
            //{

            //    //Errors err = new Errors();
            //    //err.Card = Serialnumber;
            //    //err.Date = DateTime.Now.ToString();
            //    //err.From = System.Environment.MachineName;
            //    //err.Message = ex.Message;
            //    //err.Method = "ifKit_InputChange";

            //    //objErr.AddErrors(err);
            //}
        }
Ejemplo n.º 27
0
 //digital input change event handler... here we check or uncheck the corresponding input checkbox based on the index of
 //the digital input that generated the event
 void ifk_InputChange(object sender, InputChangeEventArgs e)
 {
     digiInArray[e.Index].Checked = e.Value;
 }
Ejemplo n.º 28
0
 //Input change event handler. Dislay the index and new input value to console
 static void motoControl_InputChange(object sender, InputChangeEventArgs e)
 {
     Console.WriteLine("Input Index {0} Value {1}", e.Index, e.Value);
 }