public void DelCont(PlcItem i) { _cont.Remove(i); if(block==i) { block=null; } if(i==_src) { owner.SetFlagI(0, true); _src=null; } if(_cont.Count==0) { owner.changed -= owner_changed; PLC.instance.DelVar(this); } }
public void AddCont(PlcItem i) { _cont.Add(i); PiBlock b; PiLink l; if((b= i as PiBlock)!=null) { block=b; if(block._decl!=null && block._decl.pins[owner.name].op) { if(ip) { throw new ArgumentException(string.Format("{0} already hat source {1}", owner.path, _src)); } _src=i; owner.SetFlagI(0, false); } } else if((l=i as PiLink)!=null) { if(l.output==this) { if(ip) { throw new ArgumentException(string.Format("{0} already hat source {1}", owner.path, _src)); } _src=i; owner.SetFlagI(0, false); } } }
internal void AddBlock(PiBlock bl) { _blocks.Add(bl); }
public void DeInit(PiBlock This) { if(_deinitFunc!=null) { _deinitFunc.Call(This, null); } }
public void Calc(PiBlock This) { if(_calcFunc!=null) { _calcFunc.Call(This, null); } }