Example #1
0
 /// <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);
         }
     }
 }
Example #2
0
 private void SetLineRuleInternal(LineRule rule, TagBehaiver behaiver)
 {
     if (behaiver == null)
     {
         return;
     }
     behaiver.lineRule = rule;
 }