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

Run() public static method

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

            // Read the source Project
            Project project = new Project(dataDir + "GetNumberOfPagesForViews.mpp");

            // Get number of pages,  Months and  ThirdsOfMonths
            Console.WriteLine(string.Format("Number of Pages = '{0}'", project.GetPageCount(PresentationFormat.ResourceUsage, Timescale.Days)));
            Console.WriteLine(string.Format("Number of Pages = '{0}'", project.GetPageCount(PresentationFormat.ResourceUsage, Timescale.Months)));
            Console.WriteLine(string.Format("Number of Pages = '{0}'", project.GetPageCount(PresentationFormat.ResourceUsage, Timescale.ThirdsOfMonths)));
            // ExEnd:GetNumberOfPagesForViews
        }
    }
GetNumberOfPagesForViews