+
+
+
+
+ [C#]
+ // create empty calendar
+ Calendar calendar = new Calendar("New calendar");
+ // adds default working days (8 working hours from 9:00 to 17:00)
+ calendar.Days.Add(WeekDay.CreateDefaultWorkingDay(DayType.Monday));
+ calendar.Days.Add(WeekDay.CreateDefaultWorkingDay(DayType.Tuesday));
+ calendar.Days.Add(WeekDay.CreateDefaultWorkingDay(DayType.Wednesday));
+ // create new new working day
+ WeekDay myWeekDay = new WeekDay(DayType.Thursday);
+ // Sets working time. Only time part of DateTime is important
+ WorkingTime wt1 = new WorkingTime();
+ wt1.FromTime = new DateTime(1, 1, 1, 6, 0, 0, 0);
+ wt1.ToTime = new DateTime(1, 1, 1, 12, 0, 0, 0);
+ WorkingTime wt2 = new WorkingTime();
+ wt2.FromTime = new DateTime(1, 1, 1, 14, 0, 0, 0);
+ wt2.ToTime = new DateTime(1, 1, 1, 18, 0, 0, 0);
+ myWeekDay.WorkingTimes.Add(wt1);
+ myWeekDay.WorkingTimes.Add(wt2);
+ myWeekDay.DayWorking = true;
+ calendar.Days.Add(myWeekDay);
+ calendar.Days.Add(WeekDay.CreateDefaultWorkingDay(DayType.Friday));
+ // adds weekend
+ calendar.Days.Add(new WeekDay(DayType.Saturday));
+ calendar.Days.Add(new WeekDay(DayType.Sunday));
+
+ [VB]
+ ' create empty calendar
+ Dim calendar As Calendar = New Calendar("New calendar")
+ ' adds default working days (8 working hours from 9:00 to 17:00)
+ calendar.Days.Add(WeekDay.CreateDefaultWorkingDay(DayType.Monday))
+ calendar.Days.Add(WeekDay.CreateDefaultWorkingDay(DayType.Tuesday))
+ calendar.Days.Add(WeekDay.CreateDefaultWorkingDay(DayType.Wednesday))
+ ' create new new working day
+ Dim myWeekDay As WeekDay = New WeekDay(DayType.Thursday)
+ ' Sets working time. Only time part of DateTime is important
+ Dim wt1 As WorkingTime = New WorkingTime()
+ wt1.FromTime = New DateTime(1, 1, 1, 6, 0, 0, 0)
+ wt1.ToTime = New DateTime(1, 1, 1, 12, 0, 0, 0)
+ Dim wt2 As WorkingTime = New WorkingTime()
+ wt2.FromTime = New DateTime(1, 1, 1, 14, 0, 0, 0)
+ wt2.ToTime = New DateTime(1, 1, 1, 18, 0, 0, 0)
+ myWeekDay.WorkingTimes.Add(wt1)
+ myWeekDay.WorkingTimes.Add(wt2)
+ myWeekDay.DayWorking = True
+ calendar.Days.Add(myWeekDay)
+ calendar.Days.Add(WeekDay.CreateDefaultWorkingDay(DayType.Friday))
+ ' adds weekend
+ calendar.Days.Add(New WeekDay(DayType.Saturday))
+ calendar.Days.Add(New WeekDay(DayType.Sunday))
+
+ [C#]
+
+ License license = new License();
+ license.SetLicense("MyLicense.lic");
+
+
+ [Visual Basic]
+
+ Dim license As license = New license
+ License.SetLicense("MyLicense.lic")
+
+ License license = new License();
+ license.setLicense("MyLicense.lic");
+
+ [C#]
+
+ License license = new License();
+ license.SetLicense("MyLicense.lic");
+
+
+ [Visual Basic]
+
+ Dim license As license = New license
+ License.SetLicense("MyLicense.lic")
+
+ License license = new License();
+ license.setLicense("MyLicense.lic");
+ Tries to find the license in the following locations:
+1. Explicit path.
+2. The folder that contains the Aspose component assembly.
+3. The folder that contains the client's calling assembly.
+4. The folder that contains the entry (startup) assembly.
+5. An embedded resource in the client's calling assembly.
++ Note:On the .NET Compact Framework, tries to find the license only in these locations:
+1. Explicit path.
+2. An embedded resource in the client's calling assembly.
+2. The folder that contains the Aspose component JAR file.
+3. The folder that contains the client's calling JAR file.
+
+ [C#]
+
+ License license = new License();
+ license.SetLicense("MyLicense.lic");
+
+
+ [Visual Basic]
+
+ Dim license As License = New License
+ license.SetLicense("MyLicense.lic")
+
+ License license = new License();
+ license.setLicense("MyLicense.lic");
+ Use this method to load a license from a stream.
+
+
+ [C#]
+
+ License license = new License();
+ license.SetLicense(myStream);
+
+
+ [Visual Basic]
+
+ Dim license as License = new License
+ license.SetLicense(myStream)
+
+
+ License license = new License();
+ license.setLicense(myStream);
+
+
+ Please wait. You'll be redirected to the online version of EULA.
+If it fails to redirect then please go the following link manually: http://www.aspose.com/corporate/purchase/end-user-license-agreement.aspx
+ + diff --git a/Examples/packages/repositories.config b/Examples/packages/repositories.config new file mode 100644 index 00000000..35c27349 --- /dev/null +++ b/Examples/packages/repositories.config @@ -0,0 +1,5 @@ + +