コード例 #1
0
 public void Add(CooperationProjectResponse resp)
 {
     this.TreeRoot.Visibility = Visibility.Visible;
     this.tbkTip.Visibility   = Visibility.Collapsed;
     foreach (CooperationProject item in resp.cooperationProject)
     {
         CooperationProjectWrapper cooperationProjectWrapper = new CooperationProjectWrapper(item);
         if (!this.dataService.ContainsCooperationProjectWrapper(cooperationProjectWrapper.UnitedProjecid))
         {
             TreeViewItem cooperationProjectNode = new TreeViewItem();
             cooperationProjectNode.Style = (base.TryFindResource("TreeViewItemStyle") as Style);
             CollaborationTreeViewItem uscCooperationProject = new CollaborationTreeViewItem(item);
             cooperationProjectNode.Header = uscCooperationProject;
             this.TreeRoot.Items.Add(cooperationProjectNode);
             this.dataService.AddCooperationProjectWrapper(cooperationProjectWrapper);
             this.dataService.AddCooperationProjectTvi(cooperationProjectWrapper.UnitedProjecid, cooperationProjectNode);
         }
     }
 }
コード例 #2
0
 public void Add(CooperationProjectResponse resp)
 {
     this.TreeRoot.Visibility = Visibility.Visible;
     this.tbkTip.Visibility = Visibility.Collapsed;
     foreach (CooperationProject item in resp.cooperationProject)
     {
         CooperationProjectWrapper cooperationProjectWrapper = new CooperationProjectWrapper(item);
         if (!this.dataService.ContainsCooperationProjectWrapper(cooperationProjectWrapper.UnitedProjecid))
         {
             TreeViewItem cooperationProjectNode = new TreeViewItem();
             cooperationProjectNode.Style = (base.TryFindResource("TreeViewItemStyle") as Style);
             CollaborationTreeViewItem uscCooperationProject = new CollaborationTreeViewItem(item);
             cooperationProjectNode.Header = uscCooperationProject;
             this.TreeRoot.Items.Add(cooperationProjectNode);
             this.dataService.AddCooperationProjectWrapper(cooperationProjectWrapper);
             this.dataService.AddCooperationProjectTvi(cooperationProjectWrapper.UnitedProjecid, cooperationProjectNode);
         }
     }
 }