public ReminderListBox(ReminderControl owner) : base() { DoubleBuffered = true; _Owner = owner; _ItemIndent = 15; _NotePainter = CreatePainter(); _ButtonsInfo = new List <ButtonViewInfo>(); }
protected virtual void DrawNoteButton(DrawItemEventArgs e, ReminderControl reminderControl) { Button noteButton = reminderControl.NoteButton; ReminderListBox listBox = reminderControl.ReminderListBox; if (e.Index < listBox.ButtonsInfo.Count) { ButtonViewInfo buttonViewInfo = listBox.ButtonsInfo[e.Index]; Rectangle buttonRect = buttonViewInfo.Bounds; Rectangle textRect = buttonViewInfo.TextBounds; buttonViewInfo.OffsetBounds(e.Bounds.Location, buttonViewInfo, buttonRect, textRect); noteButton.ButtonPainter.Draw(e.Graphics, buttonViewInfo); buttonViewInfo.RestoreBounds(e.Bounds.Location, buttonViewInfo, buttonRect, textRect); } }
public virtual void DrawItem(DrawItemEventArgs e, ReminderControl reminderControl) { ReminderListBox listBox = reminderControl.ReminderListBox; Note note = listBox.Items[e.Index] as Note; e.Graphics.FillRectangle(Brushes.CornflowerBlue, e.Bounds); e.Graphics.DrawRectangle(Pens.Indigo, e.Bounds); Rectangle noteRect = GetNoteTextRect(e, note, listBox.Font); e.Graphics.DrawString(note.Text, listBox.Font, Brushes.White, noteRect); string description = listBox.GetDescription(note); Rectangle descriptionRect = GetDescriptionRect(e, noteRect, description, listBox.DescriptionFont); e.Graphics.DrawString(description, listBox.DescriptionFont, Brushes.DarkOrange, descriptionRect); DrawNoteButton(e, reminderControl); if ((e.State & DrawItemState.Selected) == DrawItemState.Selected) { e.Graphics.DrawRectangle(Pens.White, e.Bounds); } }
public EditPanel(ReminderControl reminderControl) : base() { _Owner = reminderControl; _TextBox = CreateTextBox(); _DateControl = CreateDateControl(); }
public ReminderViewInfo(ReminderControl owner) { _Owner = owner; }