/// <summary> /// 设置颜色 /// </summary> /// <param name="rule"></param> public bool SetLineRule(LineRule rule, string key = null) { if (string.IsNullOrEmpty(key)) { ForEach((x) => { SetLineRuleInternal(rule, x); }); return(true); } else { TagBehaiver item; bool contain = tagbehavierDic.TryGetValue(key, out item); if (contain && item != null) { SetLineRuleInternal(rule, item); return(true); } else { return(false); } } }
private void SetLineRuleInternal(LineRule rule, TagBehaiver behaiver) { if (behaiver == null) { return; } behaiver.lineRule = rule; }