Sha256: 1bbdd4683b9198e3c90000f7c87ef1a5a409f284df08ea33cf8b0bbe498aa86a

Contents?: true

Size: 1.14 KB

Versions: 1

Compression:

Stored size: 1.14 KB

Contents

module Asposetasksjava
  module StopAndResumeTask
    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 ChildTasksCollector instance
		collector = Rjb::import('com.aspose.tasks.ChildTasksCollector').new

		# Collect all the tasks from RootTask using TaskUtils
		Rjb::import('com.aspose.tasks.TaskUtils').apply(project.getRootTask(), collector, 0)

		tasks = collector.getTasks()

		tsk = Rjb::import('com.aspose.tasks.Tsk')

		# Parse through all the collected tasks
		i = 0
		while i < tasks.size()
			task = tasks.get(i)
		    if task.get(tsk.STOP).toString() == "1/1/2015"
				puts "NA"
			else
				puts "Task Stop: " + task.get(tsk.STOP).toString()
			end

			if task.get(tsk.RESUME).toString() == "1/1/2015"
				puts "NA"
			else
				puts "Task Resume: " + task.get(tsk.RESUME).toString()
			end	  
		    puts "---------------------------------------------"
		    i +=1
		end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
asposetasksjava-0.0.1 lib/asposetasksjava/Tasks/stopandresumetask.rb