public void DrawTray(Bitmap screen, IProvideNotifications notificationProvider, Font font ) { //battery level var level = Battery.Level;// Util.Random.Next(0, 100); this.DrawBattery(screen, new Point(1, 0), 13, 9, 1, Color.White, Color.Black, Battery.Charging, level); screen.DrawText(level.ToString(), font, Color.White, 15, -2); var notificationSummary = new NotificationSummary(notificationProvider); if (notificationSummary.MissedCallCount > 99) notificationSummary.MissedCallCount = 99; if (notificationSummary.EmailCount > 99) notificationSummary.EmailCount = 99; if (notificationSummary.TextCount > 99) notificationSummary.TextCount = 99; if (notificationSummary.VoiceCount > 99) notificationSummary.VoiceCount = 99; if (notificationSummary.EmailCount > 0) { Debug.Print("Emails: " + notificationSummary.EmailCount.ToString()); screen.DrawImage(33, 0, EmailImage, 0, 0, EmailImage.Width, EmailImage.Height); screen.DrawText(notificationSummary.EmailCount.ToString(), font, Color.White, 45, -2); } if (notificationSummary.TextCount > 0) { Debug.Print("Text: " + notificationSummary.TextCount.ToString()); screen.DrawImage(58, 0, TextImage, 0, 0, TextImage.Width, TextImage.Height); screen.DrawText(notificationSummary.TextCount.ToString(), font, Color.White, 70, -2); } if (notificationSummary.VoiceCount > 0) { Debug.Print("Voice: " + notificationSummary.VoiceCount.ToString()); screen.DrawImage(83, 0, VoiceMailImage, 0, 0, VoiceMailImage.Width, VoiceMailImage.Height); screen.DrawText(notificationSummary.VoiceCount.ToString(), font, Color.White, 95, -2); } if (notificationSummary.MissedCallCount > 0) { Debug.Print("Missed Calls: " + notificationSummary.MissedCallCount.ToString()); screen.DrawImage(106, 0, CalendarImage, 0, 0, CalendarImage.Width, CalendarImage.Height); screen.DrawText(notificationSummary.MissedCallCount.ToString(), font, Color.White, 117, -2); } }