internal void CalcViewInfo()
 {
     using (Graphics graphics = CreateGraphics())
     {
         ViewInfo.CalcViewInfo(graphics);
         ReminderListBox.Bounds = ViewInfo.ItemsRectangle;
         ReminderListBox.CalcButton(graphics);
         EditPanel.Bounds = ViewInfo.ItemsRectangle;
     }
     MinimumSize = new Size(ViewInfo.HeaderTextBounds.Width + HeaderButton.ButtonViewInfo.Bounds.Width, 0);
     ReminderListBox.Invalidate();
 }
 private void InvalidateButtons(ButtonViewInfo buttonViewInfo)
 {
     if (buttonViewInfo.Owner.Kind == ButtonKind.HeaderAdd)
     {
         Invalidate(ViewInfo.HeaderBounds);
     }
     else
     {
         int index = ReminderListBox.ButtonsInfo.IndexOf(buttonViewInfo);
         if (index == -1)
         {
             return;
         }
         Rectangle itemRect = ReminderListBox.GetItemRectangle(index);
         ReminderListBox.Invalidate(itemRect);
     }
 }