Skip to content

Commit

Permalink
Merge pull request #71 from aspose-tasks/main
Browse files Browse the repository at this point in the history
python-24.7-api  &  Aspose.Tasks for .NET 24.8.
  • Loading branch information
sva1000 authored Aug 25, 2024
2 parents 1f57a8e + abb800b commit 4662606
Show file tree
Hide file tree
Showing 14 changed files with 232 additions and 10 deletions.
17 changes: 17 additions & 0 deletions english/net/aspose.tasks.leveling/levelingoptions/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,23 @@ public sealed class LevelingOptions
| [Resources](../../aspose.tasks.leveling/levelingoptions/resources) { getset; } | 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) { getset; } | 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<Resource> { 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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Resource> { project.Resources.GetById(7) };
levelingOptions.MessageLevel = MessageLevel.Information;
levelingOptions.MessageHandler = new LevelingMessageHandler();

ResourceLeveler.LevelResources(project, levelingOptions);
```

### See Also

* interface [IMessageHandler](../../../aspose.tasks/imessagehandler)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Resource> { project.Resources.GetById(7) };
levelingOptions.MessageLevel = MessageLevel.Information;
levelingOptions.MessageHandler = new LevelingMessageHandler();

ResourceLeveler.LevelResources(project, levelingOptions);
```

### See Also

* enum [MessageLevel](../../../aspose.tasks/messagelevel)
Expand Down
20 changes: 20 additions & 0 deletions english/net/aspose.tasks.leveling/levelingresult/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Resource> { project.Resources.GetById(7) };
levelingOptions.MessageLevel = MessageLevel.Information;
levelingOptions.MessageHandler = new LevelingMessageHandler();

ResourceLeveler.LevelResources(project, levelingOptions);
```

### See Also

* class [LevelingResult](../../levelingresult)
Expand Down
17 changes: 17 additions & 0 deletions english/net/aspose.tasks/imessagehandler/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<Resource> { project.Resources.GetById(7) };
levelingOptions.MessageLevel = MessageLevel.Information;
levelingOptions.MessageHandler = new LevelingMessageHandler();

ResourceLeveler.LevelResources(project, levelingOptions);
```

### See Also

* namespace [Aspose.Tasks](../../aspose.tasks)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,34 @@ Return a list of the project's short info objects.
public List<PrimaveraProjectInfo> 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)
Expand Down
15 changes: 15 additions & 0 deletions english/net/aspose.tasks/primaverabasereader/loadproject/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
17 changes: 17 additions & 0 deletions english/net/aspose.tasks/primaveraxerreader/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 5 additions & 5 deletions english/net/aspose.tasks/primaveraxmlreader/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<int> 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);
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<int> 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);
}
```

Expand Down

0 comments on commit 4662606

Please sign in to comment.