Sha256: 48d10d2e0f2c461a6a3b4da4461b7a1cb123bc9b60d1c391f0da936822ba71ef

Contents?: true

Size: 708 Bytes

Versions: 1

Compression:

Stored size: 708 Bytes

Contents

module Asposetasksjava
  module CreateStandardCalendar
    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')

        # Define Calendar
    	cal1 = project.getCalendars().add("My Cal")
    	Rjb::import('com.aspose.tasks.Calendar').makeStandardCalendar(cal1)

    	# Save the Project
    	project.save(data_dir + "CreateStandardCalendar.xml", Rjb::import('com.aspose.tasks.SaveFileFormat').XML)

    	puts "Created standard calendar, 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/Calendars/createstandardcalendar.rb