diff --git a/english/net/aspose.tasks.leveling/levelingoptions/_index.md b/english/net/aspose.tasks.leveling/levelingoptions/_index.md index a73345f07b..e1e10ff45b 100644 --- a/english/net/aspose.tasks.leveling/levelingoptions/_index.md +++ b/english/net/aspose.tasks.leveling/levelingoptions/_index.md @@ -32,6 +32,23 @@ public sealed class LevelingOptions | [Resources](../../aspose.tasks.leveling/levelingoptions/resources) { get; set; } | Gets or sets the list of the resources which will be leveled. If null is set, all project resources will be leveled. | | [StartDate](../../aspose.tasks.leveling/levelingoptions/startdate) { get; set; } | Gets or sets leveling period start date. The default value is the project`s start date. | +### Examples + +Shows how to level specific resource, customize leveling options and examine leveling algorithm messages. + +```csharp +var project = new Project(DataDir + "Software Development Plan.mpp"); + +var levelingOptions = new LevelingOptions(); +levelingOptions.StartDate = new DateTime(2013, 3, 10); +levelingOptions.FinishDate = new DateTime(2013, 4, 30); +levelingOptions.Resources = new List { project.Resources.GetById(7) }; +levelingOptions.MessageLevel = MessageLevel.Information; +levelingOptions.MessageHandler = new LevelingMessageHandler(); + +ResourceLeveler.LevelResources(project, levelingOptions); +``` + ### See Also * namespace [Aspose.Tasks.Leveling](../../aspose.tasks.leveling) diff --git a/english/net/aspose.tasks.leveling/levelingoptions/messagehandler/_index.md b/english/net/aspose.tasks.leveling/levelingoptions/messagehandler/_index.md index 8f4ff0cf40..90778cc7a7 100644 --- a/english/net/aspose.tasks.leveling/levelingoptions/messagehandler/_index.md +++ b/english/net/aspose.tasks.leveling/levelingoptions/messagehandler/_index.md @@ -14,6 +14,23 @@ Gets or sets message handler callback which can be used to intercept log message public IMessageHandler MessageHandler { get; set; } ``` +### Examples + +Shows how to level specific resource, customize leveling options and examine leveling algorithm messages. + +```csharp +var project = new Project(DataDir + "Software Development Plan.mpp"); + +var levelingOptions = new LevelingOptions(); +levelingOptions.StartDate = new DateTime(2013, 3, 10); +levelingOptions.FinishDate = new DateTime(2013, 4, 30); +levelingOptions.Resources = new List { project.Resources.GetById(7) }; +levelingOptions.MessageLevel = MessageLevel.Information; +levelingOptions.MessageHandler = new LevelingMessageHandler(); + +ResourceLeveler.LevelResources(project, levelingOptions); +``` + ### See Also * interface [IMessageHandler](../../../aspose.tasks/imessagehandler) diff --git a/english/net/aspose.tasks.leveling/levelingoptions/messagelevel/_index.md b/english/net/aspose.tasks.leveling/levelingoptions/messagelevel/_index.md index 9ce9127660..d25fc6724a 100644 --- a/english/net/aspose.tasks.leveling/levelingoptions/messagelevel/_index.md +++ b/english/net/aspose.tasks.leveling/levelingoptions/messagelevel/_index.md @@ -14,6 +14,23 @@ Gets or sets level of log messages emitted by Aspose.Tasks during resource level public MessageLevel MessageLevel { get; set; } ``` +### Examples + +Shows how to level specific resource, customize leveling options and examine leveling algorithm messages. + +```csharp +var project = new Project(DataDir + "Software Development Plan.mpp"); + +var levelingOptions = new LevelingOptions(); +levelingOptions.StartDate = new DateTime(2013, 3, 10); +levelingOptions.FinishDate = new DateTime(2013, 4, 30); +levelingOptions.Resources = new List { project.Resources.GetById(7) }; +levelingOptions.MessageLevel = MessageLevel.Information; +levelingOptions.MessageHandler = new LevelingMessageHandler(); + +ResourceLeveler.LevelResources(project, levelingOptions); +``` + ### See Also * enum [MessageLevel](../../../aspose.tasks/messagelevel) diff --git a/english/net/aspose.tasks.leveling/levelingresult/_index.md b/english/net/aspose.tasks.leveling/levelingresult/_index.md index ae57527f19..5dedb3ec9e 100644 --- a/english/net/aspose.tasks.leveling/levelingresult/_index.md +++ b/english/net/aspose.tasks.leveling/levelingresult/_index.md @@ -26,6 +26,26 @@ public sealed class LevelingResult | --- | --- | | [AffectedTasks](../../aspose.tasks.leveling/levelingresult/affectedtasks) { get; } | Gets a set of tasks affected by resource leveling. | +### Examples + +Shows how to level all project's resources using default options. + +```csharp +var project = new Project(DataDir + "Software Development Plan.mpp"); + +var levelingResult = ResourceLeveler.LevelAll(project); + +foreach (var task in levelingResult.AffectedTasks) +{ + Console.WriteLine("Task affected by the leveling operation: " + task.Name); +} + +project.Save(OutDir + "Software Development Plan.leveled.mpp"); +ResourceLeveler.ClearLeveling(project); + +Console.WriteLine("Leveling cleared"); +``` + ### See Also * namespace [Aspose.Tasks.Leveling](../../aspose.tasks.leveling) diff --git a/english/net/aspose.tasks.leveling/resourceleveler/clearleveling/_index.md b/english/net/aspose.tasks.leveling/resourceleveler/clearleveling/_index.md index ffb1b5d81b..b48b99221d 100644 --- a/english/net/aspose.tasks.leveling/resourceleveler/clearleveling/_index.md +++ b/english/net/aspose.tasks.leveling/resourceleveler/clearleveling/_index.md @@ -18,6 +18,26 @@ public static void ClearLeveling(Project project) | --- | --- | --- | | project | Project | Project to clear leveling. | +### Examples + +Shows how to level all project's resources using default options. + +```csharp +var project = new Project(DataDir + "Software Development Plan.mpp"); + +var levelingResult = ResourceLeveler.LevelAll(project); + +foreach (var task in levelingResult.AffectedTasks) +{ + Console.WriteLine("Task affected by the leveling operation: " + task.Name); +} + +project.Save(OutDir + "Software Development Plan.leveled.mpp"); +ResourceLeveler.ClearLeveling(project); + +Console.WriteLine("Leveling cleared"); +``` + ### See Also * class [Project](../../../aspose.tasks/project) diff --git a/english/net/aspose.tasks.leveling/resourceleveler/levelall/_index.md b/english/net/aspose.tasks.leveling/resourceleveler/levelall/_index.md index 947a360166..3f877e27cc 100644 --- a/english/net/aspose.tasks.leveling/resourceleveler/levelall/_index.md +++ b/english/net/aspose.tasks.leveling/resourceleveler/levelall/_index.md @@ -22,6 +22,26 @@ public static LevelingResult LevelAll(Project project) Object containing results of resource leveling. +### Examples + +Shows how to level all project's resources using default options. + +```csharp +var project = new Project(DataDir + "Software Development Plan.mpp"); + +var levelingResult = ResourceLeveler.LevelAll(project); + +foreach (var task in levelingResult.AffectedTasks) +{ + Console.WriteLine("Task affected by the leveling operation: " + task.Name); +} + +project.Save(OutDir + "Software Development Plan.leveled.mpp"); +ResourceLeveler.ClearLeveling(project); + +Console.WriteLine("Leveling cleared"); +``` + ### See Also * class [LevelingResult](../../levelingresult) diff --git a/english/net/aspose.tasks.leveling/resourceleveler/levelresources/_index.md b/english/net/aspose.tasks.leveling/resourceleveler/levelresources/_index.md index 60e731a08f..3c0ad850c2 100644 --- a/english/net/aspose.tasks.leveling/resourceleveler/levelresources/_index.md +++ b/english/net/aspose.tasks.leveling/resourceleveler/levelresources/_index.md @@ -29,6 +29,23 @@ Object containing results of resource leveling. | --- | --- | | ArgumentNullException | if parameter options is null. | +### Examples + +Shows how to level specific resource, customize leveling options and examine leveling algorithm messages. + +```csharp +var project = new Project(DataDir + "Software Development Plan.mpp"); + +var levelingOptions = new LevelingOptions(); +levelingOptions.StartDate = new DateTime(2013, 3, 10); +levelingOptions.FinishDate = new DateTime(2013, 4, 30); +levelingOptions.Resources = new List { project.Resources.GetById(7) }; +levelingOptions.MessageLevel = MessageLevel.Information; +levelingOptions.MessageHandler = new LevelingMessageHandler(); + +ResourceLeveler.LevelResources(project, levelingOptions); +``` + ### See Also * class [LevelingResult](../../levelingresult) diff --git a/english/net/aspose.tasks/imessagehandler/_index.md b/english/net/aspose.tasks/imessagehandler/_index.md index c458b1f2cc..460f4d309d 100644 --- a/english/net/aspose.tasks/imessagehandler/_index.md +++ b/english/net/aspose.tasks/imessagehandler/_index.md @@ -20,6 +20,23 @@ public interface IMessageHandler | --- | --- | | [Message](../../aspose.tasks/imessagehandler/message)(MessageLevel, string) | Aspose.Tasks invokes this method when outputs a message. | +### Examples + +Shows how to level specific resource, customize leveling options and examine leveling algorithm messages. + +```csharp +var project = new Project(DataDir + "Software Development Plan.mpp"); + +var levelingOptions = new LevelingOptions(); +levelingOptions.StartDate = new DateTime(2013, 3, 10); +levelingOptions.FinishDate = new DateTime(2013, 4, 30); +levelingOptions.Resources = new List { project.Resources.GetById(7) }; +levelingOptions.MessageLevel = MessageLevel.Information; +levelingOptions.MessageHandler = new LevelingMessageHandler(); + +ResourceLeveler.LevelResources(project, levelingOptions); +``` + ### See Also * namespace [Aspose.Tasks](../../aspose.tasks) diff --git a/english/net/aspose.tasks/primaverabasereader/getprojectinfos/_index.md b/english/net/aspose.tasks/primaverabasereader/getprojectinfos/_index.md index d3296b1087..a7b134a959 100644 --- a/english/net/aspose.tasks/primaverabasereader/getprojectinfos/_index.md +++ b/english/net/aspose.tasks/primaverabasereader/getprojectinfos/_index.md @@ -14,6 +14,34 @@ Return a list of the project's short info objects. public List GetProjectInfos() ``` +### Examples + +Shows how to examine short projects' info from a Primavera XML file. + +```csharp +var reader = new PrimaveraXmlReader(DataDir + "MultiprojectWithExternal.xml"); +var projectInfos = reader.GetProjectInfos(); +foreach (var info in projectInfos) +{ + Console.WriteLine("{0} - '{1}' - {2}", info.Uid, info.Name, info.ExportFlag); +} +``` + +Shows how to examine short projects' info from a Primavera XER file. + +```csharp +var reader = new PrimaveraXerReader(DataDir + "MultiprojectWithExternal.xer"); +var projectInfos = reader.GetProjectInfos(); +foreach (var info in projectInfos) +{ + Console.WriteLine("{0} - '{1}' - {2}", info.Uid, info.Name, info.ExportFlag); +} + +var project = reader.LoadProject(5494); + +Console.WriteLine("Loaded project '{0}' with Uid {1}", project.Name, project.Uid); +``` + ### See Also * class [PrimaveraProjectInfo](../../../aspose.tasks.primavera/primaveraprojectinfo) diff --git a/english/net/aspose.tasks/primaverabasereader/loadproject/_index.md b/english/net/aspose.tasks/primaverabasereader/loadproject/_index.md index 362f850f55..3015a6724a 100644 --- a/english/net/aspose.tasks/primaverabasereader/loadproject/_index.md +++ b/english/net/aspose.tasks/primaverabasereader/loadproject/_index.md @@ -32,6 +32,21 @@ var project = reader.LoadProject(3882); Console.WriteLine(project.Name); ``` +Shows how to examine short projects' info from a Primavera XER file. + +```csharp +var reader = new PrimaveraXerReader(DataDir + "MultiprojectWithExternal.xer"); +var projectInfos = reader.GetProjectInfos(); +foreach (var info in projectInfos) +{ + Console.WriteLine("{0} - '{1}' - {2}", info.Uid, info.Name, info.ExportFlag); +} + +var project = reader.LoadProject(5494); + +Console.WriteLine("Loaded project '{0}' with Uid {1}", project.Name, project.Uid); +``` + ### See Also * class [Project](../../project) diff --git a/english/net/aspose.tasks/primaveraxerreader/_index.md b/english/net/aspose.tasks/primaveraxerreader/_index.md index 288e791c4c..aa57ec66b5 100644 --- a/english/net/aspose.tasks/primaveraxerreader/_index.md +++ b/english/net/aspose.tasks/primaveraxerreader/_index.md @@ -29,6 +29,23 @@ public sealed class PrimaveraXerReader : PrimaveraBaseReader | [GetProjectUids](../../aspose.tasks/primaverabasereader/getprojectuids)() | Return a list of the projects' unique identifiers. | | [LoadProject](../../aspose.tasks/primaverabasereader/loadproject)(int) | Loads the project with the specified unique identifier. | +### Examples + +Shows how to examine short projects' info from a Primavera XER file. + +```csharp +var reader = new PrimaveraXerReader(DataDir + "MultiprojectWithExternal.xer"); +var projectInfos = reader.GetProjectInfos(); +foreach (var info in projectInfos) +{ + Console.WriteLine("{0} - '{1}' - {2}", info.Uid, info.Name, info.ExportFlag); +} + +var project = reader.LoadProject(5494); + +Console.WriteLine("Loaded project '{0}' with Uid {1}", project.Name, project.Uid); +``` + ### See Also * class [PrimaveraBaseReader](../primaverabasereader) diff --git a/english/net/aspose.tasks/primaveraxerreader/primaveraxerreader/_index.md b/english/net/aspose.tasks/primaveraxerreader/primaveraxerreader/_index.md index 0bf5d9d3ff..7cc1e40c93 100644 --- a/english/net/aspose.tasks/primaveraxerreader/primaveraxerreader/_index.md +++ b/english/net/aspose.tasks/primaveraxerreader/primaveraxerreader/_index.md @@ -18,6 +18,23 @@ public PrimaveraXerReader(string xerFilePath) | --- | --- | --- | | xerFilePath | String | Path to .xer file where Primavera project or projects are located. | +### Examples + +Shows how to examine short projects' info from a Primavera XER file. + +```csharp +var reader = new PrimaveraXerReader(DataDir + "MultiprojectWithExternal.xer"); +var projectInfos = reader.GetProjectInfos(); +foreach (var info in projectInfos) +{ + Console.WriteLine("{0} - '{1}' - {2}", info.Uid, info.Name, info.ExportFlag); +} + +var project = reader.LoadProject(5494); + +Console.WriteLine("Loaded project '{0}' with Uid {1}", project.Name, project.Uid); +``` + ### See Also * class [PrimaveraXerReader](../../primaveraxerreader) diff --git a/english/net/aspose.tasks/primaveraxmlreader/_index.md b/english/net/aspose.tasks/primaveraxmlreader/_index.md index fa511914f7..de645ae3ff 100644 --- a/english/net/aspose.tasks/primaveraxmlreader/_index.md +++ b/english/net/aspose.tasks/primaveraxmlreader/_index.md @@ -31,14 +31,14 @@ public class PrimaveraXmlReader : PrimaveraBaseReader ### Examples -Shows how to import a project from a Primavera XML file. +Shows how to examine short projects' info from a Primavera XML file. ```csharp -var reader = new PrimaveraXmlReader(DataDir + "primavera.xml"); -List projectUids = reader.GetProjectUids(); -foreach (var projectUid in projectUids) +var reader = new PrimaveraXmlReader(DataDir + "MultiprojectWithExternal.xml"); +var projectInfos = reader.GetProjectInfos(); +foreach (var info in projectInfos) { - Console.WriteLine("Project UID: " + projectUid); + Console.WriteLine("{0} - '{1}' - {2}", info.Uid, info.Name, info.ExportFlag); } ``` diff --git a/english/net/aspose.tasks/primaveraxmlreader/primaveraxmlreader/_index.md b/english/net/aspose.tasks/primaveraxmlreader/primaveraxmlreader/_index.md index 865a577c81..44a5c6d755 100644 --- a/english/net/aspose.tasks/primaveraxmlreader/primaveraxmlreader/_index.md +++ b/english/net/aspose.tasks/primaveraxmlreader/primaveraxmlreader/_index.md @@ -20,14 +20,14 @@ public PrimaveraXmlReader(string templatePath) ### Examples -Shows how to import a project from a Primavera XML file. +Shows how to examine short projects' info from a Primavera XML file. ```csharp -var reader = new PrimaveraXmlReader(DataDir + "primavera.xml"); -List projectUids = reader.GetProjectUids(); -foreach (var projectUid in projectUids) +var reader = new PrimaveraXmlReader(DataDir + "MultiprojectWithExternal.xml"); +var projectInfos = reader.GetProjectInfos(); +foreach (var info in projectInfos) { - Console.WriteLine("Project UID: " + projectUid); + Console.WriteLine("{0} - '{1}' - {2}", info.Uid, info.Name, info.ExportFlag); } ```