Валютные свойства

Обзор

Microsoft Project позволяет пользователям устанавливать, какие затраты на валюты показаны в проекте. Они могут определить установить код валюты, числа после десятичной точки и символа валюты, чтобы затраты показали простым в чтении и интуитивно понятно. Aspose.Tasks для C ++ поддерживает эти функции и предоставляет ряд свойств, которые помогают разработчикам установить и контролировать валютные свойства. Эта тема объясняет, как читать валютные свойства и как их установить.

Aspose.Tasks обеспечивает свойства, выявленные классом Project, для управления валютными свойствами:

Reading Currency Properties

The code example given below demonstrates how to read a project’s currency properties.

Writing Currency Properties

To see the currency properties in Microsoft Project:

  1. Open the project file.

  2. On the Tools menu, select Options.

  3. Click the View tab and for Project 2016 Display. It will look like the one shown below.

edit currency properties in Microsoft Project 2016

The code example given below demonstrates how to write currency properties to the project.

 1// The path to the documents directory.
 2System::String dataDir = RunExamples::GetDataDir(System::Reflection::MethodBase::GetCurrentMethod(ASPOSE_CURRENT_FUNCTION)->get_DeclaringType().get_FullName());
 3    
 4// Create a project instance
 5System::SharedPtr<Project> project = System::MakeObject<Project>(dataDir + u"WriteCurrencyProperties.mpp");
 6    
 7// Set currency properties
 8project->Set<System::String>(Prj::CurrencyCode(), u"AUD");
 9project->Set<int32_t>(Prj::CurrencyDigits(), 2);
10project->Set<System::String>(Prj::CurrencySymbol(), u"$");
11project->Set<CurrencySymbolPositionType>(Prj::CurrencySymbolPosition(), Aspose::Tasks::CurrencySymbolPositionType::After);
12    
13// Save the project as XML project file
14project->Save(dataDir + u"WriteCurrencyProperties_out.xml", Aspose::Tasks::Saving::SaveFileFormat::XML);
Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.