protected override void OnMouseClick(MouseEventArgs e)
 {
     for (int i = 0; i < items.Count; i++)
     {
         if (IsEnterRectange(items[i].Rect, e.X, e.Y))
         {
             if (lastClickItem != null)
             {
                 lastClickItem.IsClick = false;
             }
             items[i].IsClick   = true;
             items[i].IsChecked = !items[i].IsChecked;
             if (items[i].IsChecked)
             {
                 checkedItems.Add(items[i]);
             }
             else
             {
                 checkedItems.Remove(items[i]);
             }
             lastClickItem = items[i];
             OnSelectItemChanged?.Invoke(this, items[i]);
             Invalidate();
             break;
         }
     }
 }
 public void AddItem(FlowChatCheckItemModel newItem)
 {
     items.Add(newItem);
     items = (from item in items
              orderby item.Text
              select item).ToList();
 }
 protected override void OnMouseMove(MouseEventArgs e)
 {
     base.OnMouseMove(e);
     for (int i = 0; i < items.Count; i++)
     {
         if (e.X > items[i].Rect.X && e.X <items[i].Rect.X + items[i].Rect.Width &&
                                           e.Y> items[i].Rect.Y && e.Y < items[i].Rect.Y + items[i].Rect.Height)
         {
             if (lastMouseMoveItem != null)
             {
                 lastMouseMoveItem.IsFocus = false;
             }
             items[i].IsFocus  = true;
             lastMouseMoveItem = items[i];
             Invalidate();
             break;
         }
     }
 }