Exemplo n.º 1
0
 // Method
 // Send the changed trim channel to the server
 //
 private void KHR_1HV_Trim_SliderControlChanged(object sender, SliderControlEventsArgs e)
 {
     // which channel is changed
     int channelNumber = (int)(sender as SliderControl).Tag - 1;
     // and what is the value of that channel
     int channelValue = e.Value;
     // Add the changed value to the servo channel array
     saServo.SetValue(Convert.ToString(channelValue), channelNumber);
     // send the servo channel array to the server
     trimservos.changeAllChannels(saServo);
 }
Exemplo n.º 2
0
        private void ChangeSliderControl(int function, int value)
        {
            SliderControlEventsArgs SliderControlEvents = new SliderControlEventsArgs(function, value);

            // Now, raise the event by invoking the delegate. Pass in
            // the objects that initiated the event (this) as wel as
            // AccelerationChangeEventArgs.
            // The call must match the signature of the AccelerationChangeEventHandler.
            if (SliderControlChanged != null)
            {
                SliderControlChanged(this, SliderControlEvents);
            }
        }
Exemplo n.º 3
0
 void KHR_1HV_Position_SliderControlChanged(object sender, SliderControlEventsArgs e)
 {
     int channelNumber = (int)(sender as SliderControl).Tag - 1;
     int channelValue = e.Value;
     saWidth.SetValue(channelValue.ToString(), channelNumber);
     servos.changeAllChannels(saWidth);
 }