JSON 헤더 및 파일 경로에서 지향 필드 추출

Microsoft Project에서 일정을 특정 작업과 연결할 수 있습니다. ASPOSE.TASK는이 기능을 지원합니다.

달력이있는 작업

작업 클래스는 작업과 관련된 캘린더를 설정하거나 얻는 데 사용되는 캘린더 속성을 노출시킵니다. 이 속성은 com.Aspose.Tasks.calendar 클래스의 객체를 수락하거나 반환합니다.

Microsoft Project에서 작업을위한 캘린더를 작성하려면 :

  1. Microsoft Project에서 프로젝트를 시작하십시오.
  2. 프로젝트 메뉴에서 작업 시간 변경을 선택한 다음 새 캘린더를 만듭니다.
  3. 캘린더를 작업에 할당하려면 작업 입력 양식에서 작업을 두 번 클릭하십시오.
  4. 고급 탭을 선택하십시오.

맞춤형 캘린더를 보여주는 작업 시간 변경 대화 상자

Microsoft 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
 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.