Sha256: f0a3118f0e90d71521f9ee66500c69b1dc4f5bfc8feca559f66afd4906436538
Contents?: true
Size: 994 Bytes
Versions: 1
Compression:
Stored size: 994 Bytes
Contents
module Asposetasksjava module UpdateProjectFile def initialize() data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/' # Instantiate project object project = Rjb::import('com.aspose.tasks.Project').new(data_dir + 'test_tasks.mpp') # create a new task task = project.getRootTask().getChildren().add("Task1") # set start date cal = Rjb::import('java.util.Calendar').getInstance() cal.set(2015, 7, 1, 8, 0,0); task.set(Rjb::import('com.aspose.tasks.Tsk').START, cal.getTime()) cal.set(2015, 7, 1, 17, 0, 0) task.set(Rjb::import('com.aspose.tasks.Tsk').FINISH , cal.getTime()) # Save the project as MPP project file project.save(data_dir + "AfterLinking.mpp", Rjb::import('com.aspose.tasks.SaveFileFormat').MPP) puts "Project file updated, please check the output file." end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
asposetasksjava-0.0.1 | lib/asposetasksjava/Projects/updateprojectfile.rb |