Added categories to tooltips

This commit is contained in:
gamosoft_cp 2013-09-12 11:07:39 +00:00
parent 735da28f52
commit 7177c27b6a

View File

@ -258,6 +258,25 @@ namespace Outlook2013TodoAddIn
// current.UseItemStyleForSubItems = false;
current.ToolTipText = String.Format("{0} - {1} {2}", i.Start.ToShortTimeString(), i.End.ToShortTimeString(), i.Subject);
if (!String.IsNullOrEmpty(i.Categories))
{
string[] allCats = i.Categories.Split(new char[] { ',' });
if (allCats != null && allCats.Length != 0)
{
List<string> cs = allCats.Select(cat => cat.Trim()).ToList();
cs.ForEach(cat =>
{
Outlook.Category c = Globals.ThisAddIn.Application.Session.Categories[cat] as Outlook.Category;
if (c != null)
{
current.ToolTipText += Environment.NewLine + " - " + c.Name;
}
});
}
}
current.Tag = i;
current.Group = grp;
switch (i.BusyStatus)