バージョン

Project プロパティ

コントロールによって表示される Project を取得または設定します。
シンタックス
'宣言
 
Public Property Project As Infragistics.Win.UltraWinSchedule.Project
public Infragistics.Win.UltraWinSchedule.Project Project {get; set;}
解説

デフォルトでは、Project プロパティが UnassignedProjectを返します。別のプロジェクトに明示的に割り当てられなかったタスクのみが表示されます。Project プロパティを設定すると、割り当てられたプロジェクト以外のタスクをフィルター (表示から削除) します。

Project プロパティが新しい値に設定するときに、そのプロジェクトの StartDate をコントロールの表示されている領域に移動するために、タイムラインが自動的にスクロールされます。

使用例
Imports Infragistics.Win.UltraWinSchedule
Imports Infragistics.Win.UltraWinGanttView

Private Sub Tasks_Programmatically_Load(ByVal sender As Object, ByVal e As EventArgs) 
    ' Create a new Project other than the Unassigned Project 
     Dim quarterlyProject As Project = Me.ultraCalendarInfo1.Projects.Add("QuartlerlyProject", DateTime.Today) 
     quarterlyProject.Key = "projkey1" 

   	' Create a Summary or Parent Task 
     Dim requirementsTask As Task = Me.ultraCalendarInfo1.Tasks.Add(DateTime.Today, TimeSpan.FromDays(5), "Requirements", "projkey1") 
	
   	' Create a child task 
		Dim budgetTask As Task = requirementsTask.Tasks.Add(DateTime.Today, TimeSpan.FromDays(2), "Budget Analysis") 
		' Set Deadline 
		budgetTask.Deadline = DateTime.Today.AddDays(3) 
		'Assign a Resource for this task 
		Dim budgetOwner As Owner = Me.ultraCalendarInfo1.Owners.Add("BudgetOwner", "Bill Isacky") 
		budgetTask.Resources.Add(budgetOwner) 

		' Create another child task 
		Dim teamTask As Task = requirementsTask.Tasks.Add(DateTime.Today.AddDays(3), TimeSpan.FromDays(2), "Team Allocation") 
		' Set a Constraint for this Task 
		teamTask.ConstraintDateTime = DateTime.Today.AddDays(4) 
		teamTask.Constraint = TaskConstraint.FinishNoLaterThan 


		' Create a Summary or Parent Task 
		Dim implemetationTask As Task = Me.ultraCalendarInfo1.Tasks.Add(DateTime.Now.AddDays(7), TimeSpan.FromDays(3), "Implementation", "projkey1") 

		' Create a child task 
		Dim frontendTask As Task = implemetationTask.Tasks.Add(DateTime.Now.AddDays(7), TimeSpan.FromDays(3), "GUI Design") 
		' Set this task as a Milestone 
		frontendTask.Milestone = True 
		' Set Percent Complete for this Task 
		frontendTask.PercentComplete = 40 
		frontendTask.Dependencies.Add(budgetTask, TaskDependencyType.StartToStart) 
		frontendTask.Dependencies.Add(teamTask, TaskDependencyType.FinishToStart) 

		Me.ultraGanttView1.CalendarInfo = Me.ultraCalendarInfo1 
		' Assign the new Project to GanttView so that this Project is shown in GanttView and not the unassigned Project. 
		Me.ultraGanttView1.Project = Me.ultraGanttView1.CalendarInfo.Projects(1) 

End Sub
using Infragistics.Win.UltraWinSchedule;
using Infragistics.Win.UltraWinGanttView;

 private void Tasks_Programmatically_Load(object sender, EventArgs e)
 {
					// Create a new Project other than the Unassigned Project
            Project quarterlyProject = this.ultraCalendarInfo1.Projects.Add("QuartlerlyProject", DateTime.Today);
            quarterlyProject.Key = "projkey1";
            
            // Create a Summary or Parent Task
            Task requirementsTask = this.ultraCalendarInfo1.Tasks.Add(DateTime.Today, TimeSpan.FromDays(5), "Requirements", "projkey1");
           
            // Create a child task
            Task budgetTask = requirementsTask.Tasks.Add(DateTime.Today, TimeSpan.FromDays(2), "Budget Analysis");
            // Set Deadline
            budgetTask.Deadline = DateTime.Today.AddDays(3); 
            //Assign a Resource for this task
            Owner budgetOwner = this.ultraCalendarInfo1.Owners.Add("BudgetOwner", "Bill Isacky");
            budgetTask.Resources.Add(budgetOwner);
           
            // Create another child task
            Task teamTask = requirementsTask.Tasks.Add(DateTime.Today.AddDays(3), TimeSpan.FromDays(2), "Team Allocation");
            // Set a Constraint for this Task
            teamTask.ConstraintDateTime = DateTime.Today.AddDays(4);
            teamTask.Constraint = TaskConstraint.FinishNoLaterThan;
            
           
            
            // Create a Summary or Parent Task
            Task implemetationTask = this.ultraCalendarInfo1.Tasks.Add(DateTime.Now.AddDays(7), TimeSpan.FromDays(3), "Implementation", "projkey1");
           
            // Create a child task
            Task frontendTask = implemetationTask.Tasks.Add(DateTime.Now.AddDays(7), TimeSpan.FromDays(3), "GUI Design");
            // Set this task as a Milestone
            frontendTask.Milestone = true;
            // Set Percent Complete for this Task
            frontendTask.PercentComplete = 40;
            frontendTask.Dependencies.Add(budgetTask, TaskDependencyType.StartToStart);
            frontendTask.Dependencies.Add(teamTask, TaskDependencyType.FinishToStart);

            this.ultraGanttView1.CalendarInfo = this.ultraCalendarInfo1;
            // Assign the new Project to GanttView so that this Project is shown in GanttView and not the unassigned Project.
            this.ultraGanttView1.Project = this.ultraGanttView1.CalendarInfo.Projects[1];

 }
参照