public ItensityClass FindChn(LightChn chanel) { //Itensity itensity = new Itensity() { Chanel = Chanels.None, On = false, Value = 0 }; int chn = LightingOPT.SwitchChannel(chanel); return(FindChn(chn)); }
private ExecutePrmOPT AddChanel(LightChn chn, int value) { ItensityClass itensity; itensity = FindChn(chn); //存在就修改 if (itensity != null) { itensity.On = true; itensity.Value = value; } //不存在 else { int chnInt = LightingOPT.SwitchChannel(chn); itensity = new ItensityClass() { Chanel = (Chanels)chnInt, On = true, Value = value }; this.ListCls.Add(itensity); } return(this); }