Aspose.Tasks.Examples.CSharp.WorkingWithProjects.Rescheduling.RescheduleProjectFromStartDate.Run C# (CSharp) Method

Run() public static method

public static Run ( ) : void
return void
        public static void Run()
        {
            // ExStart:ReschedueProjectFromStartDate
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.FullName);

            Project project = new Project(dataDir + "Project2.mpp");
            project.Set(Prj.ScheduleFromStart, true);
            project.Set(Prj.StartDate, new DateTime(2014, 1, 1));

            // Now all tasks dates (Start, Finish, EarlyStart, EarlyFinish, LateStart, LateFinish) are calculated. To get the critical path we need to calculate slacks (can be invoked in separate thread, but only after calculation of all early/late dates)
            project.Recalculate();
            TaskCollection criticalPath = project.CriticalPath;
            // ExEnd:ReschedueProjectFromStartDate
        }
    }
RescheduleProjectFromStartDate