示例#1
0
 public InteractionPointInfoEx CreateView(ViewCategory vc)
 {
     InteractionPointInfoEx result = new InteractionPointInfoEx();
     result.ViewName = vc.ToString() + " " + (ViewInfos.Count-1).ToString();
     result.IsCommonTarget = true;
     result.ViewCategory = vc;
     Navigator.TaskInfo.InteractionPoints[result.ViewName] = result;
     ViewInfoEx vi = new ViewInfoEx(result.ViewName, "", null);
     switch (vc)
     {
         case ViewCategory.Mail:
             vi.ImgName = "Mail"; vi.ViewType = typeof(MailView); break;
         case ViewCategory.Notes:
             vi.ImgName = "Notes"; vi.ViewType = typeof(NoteView); break;
         case ViewCategory.Tasks:
             vi.ImgName = "Tasks"; vi.ViewType = typeof(TaskView); break;
     }
     ViewInfos.Add(vi);
     return result;
 }
        public InteractionPointInfoEx CreateView(ViewCategory vc)
        {
            InteractionPointInfoEx result = new InteractionPointInfoEx();

            result.ViewName       = vc.ToString() + " " + (ViewInfos.Count - 1).ToString();
            result.IsCommonTarget = true;
            result.ViewCategory   = vc;
            Navigator.TaskInfo.InteractionPoints[result.ViewName] = result;
            ViewInfoEx vi = new ViewInfoEx(result.ViewName, "", null);

            switch (vc)
            {
            case ViewCategory.Mail:
                vi.ImgName = "Mail"; vi.ViewType = typeof(MailView); break;

            case ViewCategory.Notes:
                vi.ImgName = "Notes"; vi.ViewType = typeof(NoteView); break;

            case ViewCategory.Tasks:
                vi.ImgName = "Tasks"; vi.ViewType = typeof(TaskView); break;
            }
            ViewInfos.Add(vi);
            return(result);
        }
示例#3
0
        public void AddViewToNavPane(InteractionPointInfoEx ip)
        {
            TaskInfo ti = Controller.Task.Navigator.TaskInfo;

            if (ip.ViewCategory == ViewCategory.None)
            {
                return;
            }
            ViewInfoEx vi = ti.ViewInfos[ip.ViewName] as ViewInfoEx;
            Image      i  = Resources.ResourceManager.GetObject(vi.ImgName) as Image;

            imgList.Images.Add(ip.ViewName, i);
            ListView lv = lvMail;

            switch (ip.ViewCategory)
            {
            case ViewCategory.Mail: lv = lvMail; break;

            case ViewCategory.Notes: lv = lvNotes; break;

            case ViewCategory.Tasks: lv = lvTasks; break;
            }
            lv.Items.Add(ip.ViewName, ip.ViewName);
        }