The snippet attached should show the basics of using solenoids. If you have a single solenoid, you want to use the "On" and "Off" values of the enum constant, and if you have a double, use "Forward" and "Reverse".
The example will turn on a single solenoid on the press of button 0 (and turn it off when released). Button 1 controls the forward/reverse state of the double solenoid. If you want to toggle, then read through
this thread.
__________________
2016 - NE District Championship Entrepreneurship Award
2016 - Hartford District Industrial Design Award
2016 - Waterbury District Engineering Inspiration Award