What’s New

  • 0.2.2
    • Task reminder
    • Priority Graphic

Task reminder

image

There is a new option in settings.

By selecting a task list with items to be reminded, the engine analyses the contents and notifies the user about items nearing the due date or with low estimated time.

Priority Graphic

image

Another addition in this version is a new Priority coloring. Application uses custom ListBox which overrides the drawing method to create items in different colors.

image

Same effect is applied on the priority  ComBox If you want to get this effect. Create custom ComboBox and override the OnDrawItem method.

public class ColorAbleComboBox : ComboBox 
{ 
   protected override void OnDrawItem(DrawItemEventArgs e) 
   { 
       if (e.Index >=0)
       { 
         Rectangle rect =new Rectangle(e.Bounds.X, e.Bounds.Y, e.Bounds.Width, e.Bounds.Height); 
         if (e.Index <=3) 
         {
             Color col = Color.FromArgb(0,255-(e.Index*60),0);
             SolidBrush greenBrush =new SolidBrush(col);
             e.Graphics.FillRectangle(greenBrush, rect);
         }
         else if (e.Index >3 &amp;&amp; e.Index <= 7)
         {   
              Color col = Color.FromArgb(0, 0, 255- ((e.Index-4) *60));
              SolidBrush blueBrush =new SolidBrush(col);
              e.Graphics.FillRectangle(blueBrush, rect);
         }
         else if (e.Index >7)
         {
             Color col = Color.FromArgb(255- ((e.Index -8) *60), 0,0 ); 
             SolidBrush redBrush =new SolidBrush(col); 27 e.Graphics.FillRectangle(redBrush, rect); 
         } 
         e.Graphics.DrawString(Items[e.Index].ToString(), Font, new SolidBrush(Color.White), new PointF(rect.X, rect.Y));
     }
   } 
}

 

This code assumes that there are more than seven items in the box.

Important !! If you want items to draw on your overloaded method you need to change a property DrawMode from Normal to Either OwnerDrawVariable or OwnerDrawFixed.

  • 0.2.3
    • changes in reminder
    • changes in notification logic
    • added NUnit tests to XmlAnalyser

Notification logic

Reminder is described in my previous post “Reminder Mechanism” . For notifications, I am using an abstract Notifier which is extended by specific classes like DueDateNotifier .  Reminder adds Notifiers to his list, and then is querying them asking if the user should be notified about them.

image

Next Week

  • 0.2.4
    • Report engine
    • UI in Wpf for reports engine