static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); LightControllerForm controlForm = new LightControllerForm(); LightControl control = new LightControl(controlForm); Application.Run(controlForm); }
public LightControl(LightControllerForm controllerForm) { RedOn = GetImageByName("trafficLight.Res.red_on_Light.bmp"); RedOff = GetImageByName("trafficLight.Res.red_off_Light.bmp"); OrangeOn = GetImageByName("trafficLight.Res.orange_on_Light.bmp"); OrangeOff = GetImageByName("trafficLight.Res.orange_off_Light.bmp"); GreenOn = GetImageByName("trafficLight.Res.green_on_Light.bmp"); GreenOff = GetImageByName("trafficLight.Res.green_off_Light.bmp"); this.lLogic = new LightLogic(); this.controllerForm = controllerForm; this.SetupAndShowDisplayForm(); this.RegisterHandlers(); }