Skip to content

Commit

Permalink
Merge pull request #82 from aspose-tasks/main
Browse files Browse the repository at this point in the history
Updated to Aspose.Tasks for .NET 24.11
  • Loading branch information
sva1000 authored Nov 21, 2024
2 parents acbe041 + 4aa0ed0 commit fc839ac
Show file tree
Hide file tree
Showing 54 changed files with 680 additions and 85 deletions.
31 changes: 28 additions & 3 deletions english/net/aspose.tasks.saving/csvoptions/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,37 @@ Shows how to use <see cref="Aspose.Tasks.Saving.CsvOptions" /> to save a p
```csharp
var project = new Project(DataDir + "EstimatedMilestoneTasks.mpp");
var options = new CsvOptions
{
DataCategory = DataCategory.Resources, TextDelimiter = CsvTextDelimiter.Semicolon, Encoding = Encoding.Unicode, IncludeHeaders = true
};
{
DataCategory = DataCategory.Resources,
TextDelimiter = CsvTextDelimiter.Semicolon,
Encoding = Encoding.Unicode, IncludeHeaders = true
};

project.Save(OutDir + "WorkWithCsvOptions_out.csv", options);
```

Shows how to use <see cref="Aspose.Tasks.Saving.CsvOptions" /> to take the columns of the default Gantt Chart and

```csharp
// save them to a CSV file.
var project = new Project(DataDir + "EstimatedMilestoneTasks.mpp");

CsvOptions options = new CsvOptions();
options.TextDelimiter = CsvTextDelimiter.Tab;

var view = project.DefaultView;
options.View = ProjectView.GetDefaultGanttChartView();
options.View.Columns.Clear();

foreach (var t in view.Table.TableFields)
{
var columnTitle = string.IsNullOrEmpty(t.Title) ? FieldHelper.GetDefaultFieldTitle(t.Field) : t.Title;
options.View.Columns.Add(new GanttChartColumn(columnTitle, 10, t.Field));
}

project.Save(OutDir + "CustomizeViewForCsvOptions_out.csv", options);
```

### See Also

* class [SimpleSaveOptions](../simplesaveoptions/)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@ Shows how to use <see cref="Aspose.Tasks.Saving.CsvOptions" /> to save a p
```csharp
var project = new Project(DataDir + "EstimatedMilestoneTasks.mpp");
var options = new CsvOptions
{
DataCategory = DataCategory.Resources, TextDelimiter = CsvTextDelimiter.Semicolon, Encoding = Encoding.Unicode, IncludeHeaders = true
};
{
DataCategory = DataCategory.Resources,
TextDelimiter = CsvTextDelimiter.Semicolon,
Encoding = Encoding.Unicode, IncludeHeaders = true
};

project.Save(OutDir + "WorkWithCsvOptions_out.csv", options);
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@ Shows how to use <see cref="Aspose.Tasks.Saving.CsvOptions" /> to save a p
```csharp
var project = new Project(DataDir + "EstimatedMilestoneTasks.mpp");
var options = new CsvOptions
{
DataCategory = DataCategory.Resources, TextDelimiter = CsvTextDelimiter.Semicolon, Encoding = Encoding.Unicode, IncludeHeaders = true
};
{
DataCategory = DataCategory.Resources,
TextDelimiter = CsvTextDelimiter.Semicolon,
Encoding = Encoding.Unicode, IncludeHeaders = true
};

project.Save(OutDir + "WorkWithCsvOptions_out.csv", options);
```

Expand Down
9 changes: 6 additions & 3 deletions english/net/aspose.tasks.saving/csvoptions/encoding/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@ Shows how to use <see cref="Aspose.Tasks.Saving.CsvOptions" /> to save a p
```csharp
var project = new Project(DataDir + "EstimatedMilestoneTasks.mpp");
var options = new CsvOptions
{
DataCategory = DataCategory.Resources, TextDelimiter = CsvTextDelimiter.Semicolon, Encoding = Encoding.Unicode, IncludeHeaders = true
};
{
DataCategory = DataCategory.Resources,
TextDelimiter = CsvTextDelimiter.Semicolon,
Encoding = Encoding.Unicode, IncludeHeaders = true
};

project.Save(OutDir + "WorkWithCsvOptions_out.csv", options);
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@ Shows how to use <see cref="Aspose.Tasks.Saving.CsvOptions" /> to save a p
```csharp
var project = new Project(DataDir + "EstimatedMilestoneTasks.mpp");
var options = new CsvOptions
{
DataCategory = DataCategory.Resources, TextDelimiter = CsvTextDelimiter.Semicolon, Encoding = Encoding.Unicode, IncludeHeaders = true
};
{
DataCategory = DataCategory.Resources,
TextDelimiter = CsvTextDelimiter.Semicolon,
Encoding = Encoding.Unicode, IncludeHeaders = true
};

project.Save(OutDir + "WorkWithCsvOptions_out.csv", options);
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@ Shows how to use <see cref="Aspose.Tasks.Saving.CsvOptions" /> to save a p
```csharp
var project = new Project(DataDir + "EstimatedMilestoneTasks.mpp");
var options = new CsvOptions
{
DataCategory = DataCategory.Resources, TextDelimiter = CsvTextDelimiter.Semicolon, Encoding = Encoding.Unicode, IncludeHeaders = true
};
{
DataCategory = DataCategory.Resources,
TextDelimiter = CsvTextDelimiter.Semicolon,
Encoding = Encoding.Unicode, IncludeHeaders = true
};

project.Save(OutDir + "WorkWithCsvOptions_out.csv", options);
```

Expand Down
9 changes: 6 additions & 3 deletions english/net/aspose.tasks.saving/csvtextdelimiter/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ Shows how to use <see cref="Aspose.Tasks.Saving.CsvOptions" /> to save a p
```csharp
var project = new Project(DataDir + "EstimatedMilestoneTasks.mpp");
var options = new CsvOptions
{
DataCategory = DataCategory.Resources, TextDelimiter = CsvTextDelimiter.Semicolon, Encoding = Encoding.Unicode, IncludeHeaders = true
};
{
DataCategory = DataCategory.Resources,
TextDelimiter = CsvTextDelimiter.Semicolon,
Encoding = Encoding.Unicode, IncludeHeaders = true
};

project.Save(OutDir + "WorkWithCsvOptions_out.csv", options);
```

Expand Down
9 changes: 6 additions & 3 deletions english/net/aspose.tasks.saving/datacategory/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,12 @@ Shows how to use <see cref="Aspose.Tasks.Saving.CsvOptions" /> to save a p
```csharp
var project = new Project(DataDir + "EstimatedMilestoneTasks.mpp");
var options = new CsvOptions
{
DataCategory = DataCategory.Resources, TextDelimiter = CsvTextDelimiter.Semicolon, Encoding = Encoding.Unicode, IncludeHeaders = true
};
{
DataCategory = DataCategory.Resources,
TextDelimiter = CsvTextDelimiter.Semicolon,
Encoding = Encoding.Unicode, IncludeHeaders = true
};

project.Save(OutDir + "WorkWithCsvOptions_out.csv", options);
```

Expand Down
6 changes: 4 additions & 2 deletions english/net/aspose.tasks.saving/mppsaveoptions/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ public class MPPSaveOptions : SimpleSaveOptions

| Name | Description |
| --- | --- |
| [ClearVba](../../aspose.tasks.saving/mppsaveoptions/clearvba/) { get; set; } | Gets or sets a value indicating whether to remove existing VBA macros data when saving a project to MPP format. |
| [ProtectionPassword](../../aspose.tasks.saving/mppsaveoptions/protectionpassword/) { getset; } | Gets or sets a password which is used to protect a resulting MPP file. Currently is supported for MS Project 2010 and newer formats. Null value indicates that the project file is not protected. |
| [RemoveInvalidAssignments](../../aspose.tasks.saving/mppsaveoptions/removeinvalidassignments/) { getset; } | Gets or sets a value indicating whether to remove invalid resource assignments when saving to MPP. MS Project creates an empty resource assignment for each task. Set this flag to true to remove them on save. |
| [SaveFormat](../../aspose.tasks.saving/simplesaveoptions/saveformat/) { get; } | Gets or sets the format in which the document will be saved if this save options object is used. |
| [TasksComparer](../../aspose.tasks.saving/simplesaveoptions/taskscomparer/) { getset; } | Gets or sets the comparer to sort tasks on Gantt chart and Task Sheet chart. |
| [TasksFilter](../../aspose.tasks.saving/simplesaveoptions/tasksfilter/) { getset; } | Gets or sets the condition which is used to filter tasks rendered on Gantt, Task Sheet and Task Usage charts. |
| [WriteFilters](../../aspose.tasks.saving/mppsaveoptions/writefilters/) { getset; } | Gets or sets a value indicating whether to write filter data when saving to MPP. Filter data includes Project.TaskFilters and Project.ResourceFilters collections. |
| [WriteViewData](../../aspose.tasks.saving/mppsaveoptions/writeviewdata/) { getset; } | Gets or sets a value indicating whether to write view data when saving to MPP. View data includes Project.Views, Filters and Tables collections. |
| [WriteFilters](../../aspose.tasks.saving/mppsaveoptions/writefilters/) { getset; } | Gets or sets a value indicating whether to write filter data when saving a project to MPP for format. Filter data includes Project.TaskFilters and Project.ResourceFilters collections. |
| [WriteGroups](../../aspose.tasks.saving/mppsaveoptions/writegroups/) { getset; } | Gets or sets a value indicating whether to write groups data when saving a project to MPP for format. Group data includes Project.TaskGroups and Project.ResourceGroups collections. |
| [WriteViewData](../../aspose.tasks.saving/mppsaveoptions/writeviewdata/) { getset; } | Gets or sets a value indicating whether to write view data when saving a project to MPP format. View data includes Project.Views, Filters and Tables collections. |

## Examples

Expand Down
23 changes: 23 additions & 0 deletions english/net/aspose.tasks.saving/mppsaveoptions/clearvba/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: MPPSaveOptions.ClearVba
second_title: Aspose.Tasks for .NET API Reference
description: MPPSaveOptions property. Gets or sets a value indicating whether to remove existing VBA macros data when saving a project to MPP format
type: docs
weight: 20
url: /net/aspose.tasks.saving/mppsaveoptions/clearvba/
---
## MPPSaveOptions.ClearVba property

Gets or sets a value indicating whether to remove existing VBA macros data when saving a project to MPP format.

```csharp
public bool ClearVba { get; set; }
```

### See Also

* class [MPPSaveOptions](../)
* namespace [Aspose.Tasks.Saving](../../mppsaveoptions/)
* assembly [Aspose.Tasks](../../../)


Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: MPPSaveOptions.ProtectionPassword
second_title: Aspose.Tasks for .NET API Reference
description: MPPSaveOptions property. Gets or sets a password which is used to protect a resulting MPP file. Currently is supported for MS Project 2010 and newer formats. Null value indicates that the project file is not protected
type: docs
weight: 20
weight: 30
url: /net/aspose.tasks.saving/mppsaveoptions/protectionpassword/
---
## MPPSaveOptions.ProtectionPassword property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: MPPSaveOptions.RemoveInvalidAssignments
second_title: Aspose.Tasks for .NET API Reference
description: MPPSaveOptions property. Gets or sets a value indicating whether to remove invalid resource assignments when saving to MPP. MS Project creates an empty resource assignment for each task. Set this flag to true to remove them on save
type: docs
weight: 30
weight: 40
url: /net/aspose.tasks.saving/mppsaveoptions/removeinvalidassignments/
---
## MPPSaveOptions.RemoveInvalidAssignments property
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
title: MPPSaveOptions.WriteFilters
second_title: Aspose.Tasks for .NET API Reference
description: MPPSaveOptions property. Gets or sets a value indicating whether to write filter data when saving to MPP. Filter data includes Project.TaskFilters and Project.ResourceFilters collections
description: MPPSaveOptions property. Gets or sets a value indicating whether to write filter data when saving a project to MPP for format. Filter data includes Project.TaskFilters and Project.ResourceFilters collections
type: docs
weight: 40
weight: 50
url: /net/aspose.tasks.saving/mppsaveoptions/writefilters/
---
## MPPSaveOptions.WriteFilters property

Gets or sets a value indicating whether to write filter data when saving to MPP. Filter data includes Project.TaskFilters and Project.ResourceFilters collections.
Gets or sets a value indicating whether to write filter data when saving a project to MPP for format. Filter data includes Project.TaskFilters and Project.ResourceFilters collections.

```csharp
public bool WriteFilters { get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: MPPSaveOptions.WriteGroups
second_title: Aspose.Tasks for .NET API Reference
description: MPPSaveOptions property. Gets or sets a value indicating whether to write groups data when saving a project to MPP for format. Group data includes Project.TaskGroups and Project.ResourceGroups collections
type: docs
weight: 60
url: /net/aspose.tasks.saving/mppsaveoptions/writegroups/
---
## MPPSaveOptions.WriteGroups property

Gets or sets a value indicating whether to write groups data when saving a project to MPP for format. Group data includes Project.TaskGroups and Project.ResourceGroups collections.

```csharp
public bool WriteGroups { get; set; }
```

### See Also

* class [MPPSaveOptions](../)
* namespace [Aspose.Tasks.Saving](../../mppsaveoptions/)
* assembly [Aspose.Tasks](../../../)


Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
title: MPPSaveOptions.WriteViewData
second_title: Aspose.Tasks for .NET API Reference
description: MPPSaveOptions property. Gets or sets a value indicating whether to write view data when saving to MPP. View data includes Project.Views Filters and Tables collections
description: MPPSaveOptions property. Gets or sets a value indicating whether to write view data when saving a project to MPP format. View data includes Project.Views Filters and Tables collections
type: docs
weight: 50
weight: 70
url: /net/aspose.tasks.saving/mppsaveoptions/writeviewdata/
---
## MPPSaveOptions.WriteViewData property

Gets or sets a value indicating whether to write view data when saving to MPP. View data includes Project.Views, Filters and Tables collections.
Gets or sets a value indicating whether to write view data when saving a project to MPP format. View data includes Project.Views, Filters and Tables collections.

```csharp
public bool WriteViewData { get; set; }
Expand Down
19 changes: 15 additions & 4 deletions english/net/aspose.tasks/availabilityperiod/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void WorkWithAvailabilityPeriod()
var resource = project.Resources.Add("Work Resource");

// Add availability periods to new resource
IEnumerable<AvailabilityPeriod> periods = this.GetPeriods();
IEnumerable<AvailabilityPeriod> periods = GetPeriods();
foreach (var period in periods)
{
resource.AvailabilityPeriods.Add(period);
Expand All @@ -55,13 +55,24 @@ public void WorkWithAvailabilityPeriod()
}
}

private IEnumerable<AvailabilityPeriod> GetPeriods()
private static IEnumerable<AvailabilityPeriod> GetPeriods()
{
var periods = new List<AvailabilityPeriod>(2);
var period = new AvailabilityPeriod { AvailableFrom = new DateTime(2011, 12, 12), AvailableTo = new DateTime(2013, 12, 12), AvailableUnits = 0.99 };
var period = new AvailabilityPeriod
{
AvailableFrom = new DateTime(2011, 12, 12),
AvailableTo = new DateTime(2013, 12, 12),
AvailableUnits = 0.99
};

periods.Add(period);

var period2 = new AvailabilityPeriod { AvailableFrom = new DateTime(2013, 12, 12), AvailableTo = new DateTime(2015, 12, 12), AvailableUnits = 0.94 };
var period2 = new AvailabilityPeriod
{
AvailableFrom = new DateTime(2013, 12, 12),
AvailableTo = new DateTime(2015, 12, 12),
AvailableUnits = 0.94
};
periods.Add(period2);
return periods;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public void WorkWithAvailabilityPeriod()
var resource = project.Resources.Add("Work Resource");

// Add availability periods to new resource
IEnumerable<AvailabilityPeriod> periods = this.GetPeriods();
IEnumerable<AvailabilityPeriod> periods = GetPeriods();
foreach (var period in periods)
{
resource.AvailabilityPeriods.Add(period);
Expand All @@ -40,13 +40,24 @@ public void WorkWithAvailabilityPeriod()
}
}

private IEnumerable<AvailabilityPeriod> GetPeriods()
private static IEnumerable<AvailabilityPeriod> GetPeriods()
{
var periods = new List<AvailabilityPeriod>(2);
var period = new AvailabilityPeriod { AvailableFrom = new DateTime(2011, 12, 12), AvailableTo = new DateTime(2013, 12, 12), AvailableUnits = 0.99 };
var period = new AvailabilityPeriod
{
AvailableFrom = new DateTime(2011, 12, 12),
AvailableTo = new DateTime(2013, 12, 12),
AvailableUnits = 0.99
};

periods.Add(period);

var period2 = new AvailabilityPeriod { AvailableFrom = new DateTime(2013, 12, 12), AvailableTo = new DateTime(2015, 12, 12), AvailableUnits = 0.94 };
var period2 = new AvailabilityPeriod
{
AvailableFrom = new DateTime(2013, 12, 12),
AvailableTo = new DateTime(2015, 12, 12),
AvailableUnits = 0.94
};
periods.Add(period2);
return periods;
}
Expand Down
19 changes: 15 additions & 4 deletions english/net/aspose.tasks/availabilityperiod/availableto/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public void WorkWithAvailabilityPeriod()
var resource = project.Resources.Add("Work Resource");

// Add availability periods to new resource
IEnumerable<AvailabilityPeriod> periods = this.GetPeriods();
IEnumerable<AvailabilityPeriod> periods = GetPeriods();
foreach (var period in periods)
{
resource.AvailabilityPeriods.Add(period);
Expand All @@ -40,13 +40,24 @@ public void WorkWithAvailabilityPeriod()
}
}

private IEnumerable<AvailabilityPeriod> GetPeriods()
private static IEnumerable<AvailabilityPeriod> GetPeriods()
{
var periods = new List<AvailabilityPeriod>(2);
var period = new AvailabilityPeriod { AvailableFrom = new DateTime(2011, 12, 12), AvailableTo = new DateTime(2013, 12, 12), AvailableUnits = 0.99 };
var period = new AvailabilityPeriod
{
AvailableFrom = new DateTime(2011, 12, 12),
AvailableTo = new DateTime(2013, 12, 12),
AvailableUnits = 0.99
};

periods.Add(period);

var period2 = new AvailabilityPeriod { AvailableFrom = new DateTime(2013, 12, 12), AvailableTo = new DateTime(2015, 12, 12), AvailableUnits = 0.94 };
var period2 = new AvailabilityPeriod
{
AvailableFrom = new DateTime(2013, 12, 12),
AvailableTo = new DateTime(2015, 12, 12),
AvailableUnits = 0.94
};
periods.Add(period2);
return periods;
}
Expand Down
Loading

0 comments on commit fc839ac

Please sign in to comment.