/// <summary> /// 注册向PMS取数据的所有action到队列中 /// </summary> private void RegisterAction() { ActionList.Add(new Login()); #region getbug if (appconfig.ShowBug) { ZuggerObservableCollection <BugItem> bugCollection = new ZuggerObservableCollection <BugItem>(); GetBug gb = new GetBug(bugCollection); lbBugCount.DataContext = bugCollection; gb.OnNewItemArrive += new NewItemArrive(NewItem_OnNewItemArrive); ActionList.Add(gb); } #endregion #region gettask if (appconfig.ShowTask) { ZuggerObservableCollection <TaskItem> taskCollection = new ZuggerObservableCollection <TaskItem>(); GetTask gt = new GetTask(taskCollection); lbTaskCount.DataContext = taskCollection; gt.OnNewItemArrive += new NewItemArrive(NewItem_OnNewItemArrive); ActionList.Add(gt); } #endregion #region 由我创建的bug if (appconfig.ShowOpendByMe) { ZuggerObservableCollection <BugItem> openedByMeCollection = new ZuggerObservableCollection <BugItem>(); GetOpenedByMeBug gobm = new GetOpenedByMeBug(openedByMeCollection); lbOpenedByMeBugCount.DataContext = openedByMeCollection; ActionList.Add(gobm); } #endregion #region 需求 if (appconfig.ShowStory) { ZuggerObservableCollection <StoryItem> storyCollection = new ZuggerObservableCollection <StoryItem>(); GetStory gs = new GetStory(storyCollection); lbStoryCount.DataContext = storyCollection; gs.OnNewItemArrive += new NewItemArrive(NewItem_OnNewItemArrive); ActionList.Add(gs); } #endregion }
/// <summary> /// 注册向PMS取数据的所有action到队列中 /// </summary> private void RegisterAction() { ActionList.Add(new Login()); #region getbug if (appconfig.ShowBug) { ZuggerObservableCollection <BugItem> bugCollection = new ZuggerObservableCollection <BugItem>(); GetBug gb = new GetBug(bugCollection); lbBugCount.DataContext = bugCollection; gb.OnNewItemArrive += new NewItemArrive(NewItem_OnNewItemArrive); ActionList.Add(gb); } #endregion #region gettask if (appconfig.ShowTask) { ZuggerObservableCollection <TaskItem> taskCollection = new ZuggerObservableCollection <TaskItem>(); GetTask gt = new GetTask(taskCollection); lbTaskCount.DataContext = taskCollection; gt.OnNewItemArrive += new NewItemArrive(NewItem_OnNewItemArrive); ActionList.Add(gt); } #endregion #region 由我创建的bug if (appconfig.ShowOpendByMe) { ZuggerObservableCollection <BugItem> openedByMeCollection = new ZuggerObservableCollection <BugItem>(); GetOpenedByMeBug gobm = new GetOpenedByMeBug(openedByMeCollection); lbOpenedByMeBugCount.DataContext = openedByMeCollection; ActionList.Add(gobm); } #endregion #region 未关闭的项目 if (appconfig.ShowUnclosedProject) { ZuggerObservableCollection <ProjectItem> UnclosedProjectCollection = new ZuggerObservableCollection <ProjectItem>(); GetUnclosedProject goup = new GetUnclosedProject(UnclosedProjectCollection); lbUnclosedProjectCount.DataContext = UnclosedProjectCollection; ActionList.Add(goup); } #endregion #region 未关闭的story if (appconfig.ShowUnclosedStory) { ZuggerObservableCollection <StoryItem> UnclosedStoryCollection = new ZuggerObservableCollection <StoryItem>(); GetUnclosedStory gous = new GetUnclosedStory(UnclosedStoryCollection); lbUnclosedStoryCount.DataContext = UnclosedStoryCollection; ActionList.Add(gous); } #endregion #region 未关闭的task if (appconfig.ShowUnclosedTask) { ZuggerObservableCollection <TaskItem> UnclosedTaskCollection = new ZuggerObservableCollection <TaskItem>(); GetUnclosedTask gout = new GetUnclosedTask(UnclosedTaskCollection); lbUnclosedTaskCount.DataContext = UnclosedTaskCollection; ActionList.Add(gout); } #endregion #region 未关闭的bug if (appconfig.ShowUnclosedBug) { ZuggerObservableCollection <BugItem> UnclosedBugCollection = new ZuggerObservableCollection <BugItem>(); GetUnclosedBug goub = new GetUnclosedBug(UnclosedBugCollection); lbUnclosedBugCount.DataContext = UnclosedBugCollection; ActionList.Add(goub); } #endregion #region 未关闭的ToDo if (appconfig.ShowUnclosedToDo) { ZuggerObservableCollection <ToDoItem> UnclosedToDoCollection = new ZuggerObservableCollection <ToDoItem>(); GetUnclosedToDo gout = new GetUnclosedToDo(UnclosedToDoCollection); lbUnclosedToDoCount.DataContext = UnclosedToDoCollection; ActionList.Add(gout); } #endregion #region 需求 if (appconfig.ShowStory) { ZuggerObservableCollection <StoryItem> storyCollection = new ZuggerObservableCollection <StoryItem>(); GetStory gs = new GetStory(storyCollection); lbStoryCount.DataContext = storyCollection; gs.OnNewItemArrive += new NewItemArrive(NewItem_OnNewItemArrive); ActionList.Add(gs); } #endregion }