public void CreateView(ViewCategory c) { IViewsManager vm = Task.Navigator.ViewsManager; InteractionPointInfoEx ip = (vm as IDynamicViewsManager).CreateView(c); (View as IMainView).AddViewToNavPane(ip); }
protected override InteractionPointInfo CreateInteractionPointInfo( string viewName, InteractionPointAttribute ipAttribute) { InteractionPointInfoEx result = new InteractionPointInfoEx(); result.ViewName = viewName; result.ControllerType = ipAttribute.ControllerType; result.IsCommonTarget = ipAttribute.IsCommonTarget; result.ViewCategory = (ipAttribute as IPointExAttribute).ViewCategory; return result; }
protected override InteractionPointInfo CreateInteractionPointInfo( string viewName, InteractionPointAttribute ipAttribute) { InteractionPointInfoEx result = new InteractionPointInfoEx(); result.ViewName = viewName; result.ControllerType = ipAttribute.ControllerType; result.IsCommonTarget = ipAttribute.IsCommonTarget; result.ViewCategory = (ipAttribute as IPointExAttribute).ViewCategory; 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; }
public override IController GetController(string viewName) { IController result = base.GetController(viewName); if (result != null) { return(result); } InteractionPointInfoEx ip = TaskInfo.InteractionPoints[viewName] as InteractionPointInfoEx; Type cType = null; switch (ip.ViewCategory) { case ViewCategory.Mail: cType = typeof(MailController); break; case ViewCategory.Notes: cType = typeof(NoteController); break; case ViewCategory.Tasks: cType = typeof(TaskController); break; } ip.ControllerType = cType; return(base.GetController(viewName)); }