public virtual void TempUse(IPara para) { if (temp == null) { temp = new MyDictionary <string, Stack <IPara> >(); } if (!temp.ContainsKey(para.GetName())) { temp[para.GetName()] = new Stack <IPara>(); } temp[para.GetName()].Push(paras[para.GetName()]); this.paras[para.GetName()] = para; }
public override bool HasPara(IPara para) { bool has = this.paras.ContainsKey(para.GetName()); if (!has) { for (int i = 0; i < fieldList.Count; i++) { IFields f = fieldList[i]; if (f.HasField(para.GetName())) { return(true); } } } return(has); }
public virtual IPara GetPara(IEventArgs args) { IPara para = ParaUtil.GetPara(type); if (para != null) { para = (IPara)para.Copy(); para.SetName(name); if (value == null) { value = string.Empty; } if (para is StringPara) { ((StringPara)para).SetValue(FreeUtil.ReplaceVar(value, args)); } else if (para is BoolPara) { ((BoolPara)para).SetValue(FreeUtil.ReplaceBool(value, args)); } else { double v = FreeUtil.ReplaceDouble(value, args); if (para is IntPara) { ((IntPara)para).SetValue((int)v); } else { if (para is FloatPara) { ((FloatPara)para).SetValue((float)v); } else { if (para is DoublePara) { ((DoublePara)para).SetValue(v); } } } } para.SetPublic(isPublic); para.SetName(FreeUtil.ReplaceVar(para.GetName(), args)); } return(para); }
public virtual void RemovePara(IPara para) { this.paras.Remove(para.GetName()); }
public virtual bool HasPara(IPara para) { return(this.paras.ContainsKey(para.GetName())); }
public virtual void AddPara(IPara para) { this.paras[para.GetName()] = para; }
public override bool HasPara(IPara para) { string paraName = para.GetName(); return(HasPara(paraName)); }