The easy way is to use the Raspberry GPIO interface.
1) enable GPIO interface from Configure->Interfaces
2) add GPIO 22 and 23 to a Control Group from Configure->Group&Modules
3) control GPIO 22 and 23 from the Control section
See attacched screenshots.
You'll also be able to script the GPIO switches by using a Wizard Script from Configure->Automation.
The hard way, without enabling Raspi GPIO interface, is by writing a C# program. See the example HomeGenie Leds program in the RaspberrySharp group of Configure->Automation section.