Ejemplo n.º 1
0
        public void writeStatus(bool main_lights_power, bool lights_test, bool light_brightness, ref FSIcm fsi_object)
        {
            bool true_light_status = get(main_lights_power, lights_test);

            //write light status
            if (!is_dimmable)
            {
                //only bright lamp
                if (true_light_status != (bool)((PropertyInfo)lightMember).GetValue(fsi_object))
                {
                    ((PropertyInfo)lightMember).SetValue(fsi_object, true_light_status);
                }
            }
            else
            {
                //bright
                if (true_light_status != (bool)((PropertyInfo)lightMember).GetValue(fsi_object))
                {
                    ((PropertyInfo)lightMember).SetValue(fsi_object, true_light_status);
                }

                //dimmed
                if (!light_brightness != (bool)((PropertyInfo)dimmedLightMember).GetValue(fsi_object))
                {
                    ((PropertyInfo)dimmedLightMember).SetValue(fsi_object, !light_brightness);
                }
            }
        }
Ejemplo n.º 2
0
 public FSIcm(String desc) : base(desc)
 {
     inst = this;
 }