// Provide a specialized method the client can use to add nodes.
        public void AddProject(Project project)
        {
            //TreeNode nodeNew = new TreeNode(project.Name,
            //	(int)NodeImages.NormalProject, (int)NodeImages.SelectedProject);

            // Store the project object for later use
            // (when the event is raised).
            //nodeNew.Tag = project;
            ProjectTreeNode nodeNew = new ProjectTreeNode(project, project.Name,
                                                          (int)NodeImages.NormalProject, (int)NodeImages.SelectedProject);

            //	(int)NodeImages.NormalProject, (int)NodeImages.SelectedProject);

            // Store the project object for later use
            // (when the event is raised).
            //nodeNew.Tag = project;

            switch (project.Status)
            {
            case Project.StatusType.Unassigned:
                nodeUnassigned.Nodes.Add(nodeNew);
                break;

            case Project.StatusType.InProgress:
                nodeInProgress.Nodes.Add(nodeNew);
                break;

            case Project.StatusType.Closed:
                nodeClosed.Nodes.Add(nodeNew);
                break;
            }
        }
Beispiel #2
0
			// Provide a specialized method the client can use to add nodes.
			public void AddProject(Project project)
			{
				//TreeNode nodeNew = new TreeNode(project.Name,
				//	(int)NodeImages.NormalProject, (int)NodeImages.SelectedProject);

				// Store the project object for later use
				// (when the event is raised).
				//nodeNew.Tag = project;
				ProjectTreeNode nodeNew = new ProjectTreeNode(project, project.Name,
					(int)NodeImages.NormalProject, (int)NodeImages.SelectedProject);

				//	(int)NodeImages.NormalProject, (int)NodeImages.SelectedProject);

				// Store the project object for later use
				// (when the event is raised).
				//nodeNew.Tag = project;

				switch (project.Status)
				{
					case Project.StatusType.Unassigned:
						nodeUnassigned.Nodes.Add(nodeNew);
						break;
					case Project.StatusType.InProgress:
						nodeInProgress.Nodes.Add(nodeNew);
						break;
					case Project.StatusType.Closed:
						nodeClosed.Nodes.Add(nodeNew);
						break;
				}
			}