Exemplo n.º 1
0
 public bool IsSameSignType(SignInfo sign, SignGroupInfo group)
 {
     SignInfo[] array = DashboardItem.FindAllSigns(group);
     if (array.Length > 0)
     {
         return(sign.SignInfomation + sign.SignTypeColor == array[0].SignInfomation + array[0].SignTypeColor);
     }
     return(true);
 }
Exemplo n.º 2
0
 public static int GetRootChildCountByGroup(SignGroupInfo group)
 {
     if (group == null)
     {
         return(0);
     }
     SignInfo[] array = DashboardItem.FindAllSigns(GetRootGroup(group));
     return(array.Length);
 }
Exemplo n.º 3
0
        public bool Remove(DashboardItem item)
        {
            if (item == null)
            {
                return(false);
            }

            return(item.DashboardType == DashboardType.Group ?RemoveGroup(item as SignGroupInfo, false)
                    : RemoveSign(item as SignInfo));
        }
Exemplo n.º 4
0
        public bool Add(DashboardItem item)
        {
            if (item == null)
            {
                return(false);
            }


            return(item.DashboardType == DashboardType.Group ?AddGroup(item as SignGroupInfo)
                    : AddSign(item as SignInfo));
        }
Exemplo n.º 5
0
 /// <summary>
 /// Determine the sign  whether more than 20
 /// </summary>
 /// <param name="group">Group of testing</param>
 /// <returns></returns>
 public static bool IsSignCountValid(SignGroupInfo group)
 {
     if (group == null)
     {
         return(false);
     }
     SignInfo[] array = DashboardItem.FindAllSigns(GetRootGroup(group));
     if (array.Length < 20)
     {
         return(false);
     }
     return(true);
 }