JSONヘッダーとファイルパスからSEO指向のフィールドを抽出します

Microsoftプロジェクトのカレンダーを特定のタスクに関連付けることができます。 Aspose.Taskはこの機能をサポートしています。

カレンダー付きのタスク

タスククラスは、 カレンダープロパティを公開します。これは、タスクに関連付けられているカレンダーを設定または取得するために使用されます。このプロパティは、com.Aspose.Tasks.calendarクラスのオブジェクトを受け入れるか、返します。

Microsoftプロジェクトでタスクのカレンダーを作成するには:

  1. Microsoftプロジェクトでプロジェクトを開きます。
  2. プロジェクトメニューで、作業時間の変更を選択してから新しいカレンダーを作成します。
  3. カレンダーをタスクに割り当てるには、タスクエントリフォームのタスクをダブルクリックします。
  4. Advancedタブを選択します。

カスタムメイドのカレンダーを示す作業時間の変更ダイアログ

Microsoftプロジェクトのリソースカレンダーでの労働時間の変更

タスクカレンダーの設定

標準カレンダーを作成し、タスクを作成します。カレンダーをタスクに割り当てます。

 1// For complete examples and data files, please go to https://github.com/aspose-tasks/Aspose.Tasks-for-Java
 2// The path to the documents directory.
 3String dataDir = Utils.getDataDir(TasksAndCalendars.class);
 4
 5Project project = new Project();
 6Task tsk = project.getRootTask().getChildren().add("Task1");
 7// add a standard calendar
 8Calendar cal = project.getCalendars().add("TaskCal1");
 9
10tsk.set(Tsk.CALENDAR, cal);

Getting Task Calendar

Get a task calendar by traversing the tasks in a project.

 1// For complete examples and data files, please go to https://github.com/aspose-tasks/Aspose.Tasks-for-Java
 2// The path to the documents directory.
 3String dataDir = Utils.getDataDir(TasksAndCalendars.class);
 4
 5// create a project instance
 6Project prj = new Project(dataDir + "project5.mpp");
 7
 8// Declare ChildTasksCollector class object
 9ChildTasksCollector collector = new ChildTasksCollector();
10
11// Use TaskUtils to get all children tasks in RootTask
12TaskUtils.apply(prj.getRootTask(), collector, 0);
13
14// Parse all the recursive children
15for (Task tsk : collector.getTasks()) {
16    Calendar tskCal = tsk.get(Tsk.CALENDAR);
17    System.out.println("Task calendar name:" + tskCal.getName());
18}
Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.