bar code generator in c# Figure 6-7. A repeating calendar event in Objective-C

Generate Data Matrix in Objective-C Figure 6-7. A repeating calendar event

Figure 6-7. A repeating calendar event
Data Matrix ECC200 Maker In Objective-C
Using Barcode creation for iPhone Control to generate, create Data Matrix 2d barcode image in iPhone applications.
www.OnBarcode.com
Draw EAN / UCC - 13 In Objective-C
Using Barcode encoder for iPhone Control to generate, create UCC.EAN - 128 image in iPhone applications.
www.OnBarcode.com
PIM events support four fundamental types of repetition: RepeatRule.DAILY, RepeatRule.WEEKLY, RepeatRule.MONTHLY, and RepeatRule.YEARLY. Each of these can be set alone on a RepeatRule to create a simple repetition. For example, to have an event repeat at the same time each week, you would define the FREQUENCY as shown below.
Generate UCC - 12 In Objective-C
Using Barcode drawer for iPhone Control to generate, create GTIN - 12 image in iPhone applications.
www.OnBarcode.com
Encoding Barcode In Objective-C
Using Barcode creator for iPhone Control to generate, create Barcode image in iPhone applications.
www.OnBarcode.com
RepeatRule repeat = new RepeatRule(); repeat.setInt(RepeatRule.FREQUENCY, RepeatRule.WEEKLY);
QR Generator In Objective-C
Using Barcode encoder for iPhone Control to generate, create QR Code 2d barcode image in iPhone applications.
www.OnBarcode.com
Barcode Encoder In Objective-C
Using Barcode encoder for iPhone Control to generate, create Barcode image in iPhone applications.
www.OnBarcode.com
You can control when an event stops repeating by also applying a COUNT or an END value. The former states that the event will recur a certain number of times at the provided frequency and then stop. The latter means that the event will keep recurring until a certain calendar time, at which point it will cease. COUNT must be provided as an int, while END is a date. To make this event repeat for the next eight weeks, we would use the COUNT as shown below.
Generating UPC - 13 In Objective-C
Using Barcode creator for iPhone Control to generate, create GTIN - 13 image in iPhone applications.
www.OnBarcode.com
EAN / UCC - 8 Generation In Objective-C
Using Barcode generation for iPhone Control to generate, create EAN / UCC - 8 image in iPhone applications.
www.OnBarcode.com
repeat.setInt(RepeatRule.COUNT, 8);
Data Matrix 2d Barcode Encoder In Objective-C
Using Barcode creator for iPhone Control to generate, create ECC200 image in iPhone applications.
www.OnBarcode.com
Create DataMatrix In .NET
Using Barcode generator for Reporting Service Control to generate, create ECC200 image in Reporting Service applications.
www.OnBarcode.com
You can also specify multiple times at which an event will fire. To repeat an event on Monday, Wednesday, and Friday, you specify the DAY_IN_WEEK rule and provide a bitwise OR for those dates.
UCC.EAN - 128 Creator In None
Using Barcode maker for Online Control to generate, create GS1-128 image in Online applications.
www.OnBarcode.com
EAN13 Generation In None
Using Barcode encoder for Office Word Control to generate, create EAN-13 image in Office Word applications.
www.OnBarcode.com
repeat.setInt(RepeatRule.DAY_IN_WEEK, RepeatRule.MONDAY | RepeatRule.WEDNESDAY | RepeatRule.FRIDAY);
Generating QR Code JIS X 0510 In Visual Basic .NET
Using Barcode creation for .NET Control to generate, create QR-Code image in VS .NET applications.
www.OnBarcode.com
Read GTIN - 12 In None
Using Barcode decoder for Software Control to read, scan read, scan image in Software applications.
www.OnBarcode.com
Download at
Matrix 2D Barcode Maker In Visual Studio .NET
Using Barcode generation for .NET Control to generate, create 2D image in Visual Studio .NET applications.
www.OnBarcode.com
Linear Barcode Encoder In VB.NET
Using Barcode generation for VS .NET Control to generate, create 1D Barcode image in .NET applications.
www.OnBarcode.com
CHAPTER 6: Personal Information
Data Matrix ECC200 Decoder In None
Using Barcode scanner for Software Control to read, scan read, scan image in Software applications.
www.OnBarcode.com
Scanning QR In VB.NET
Using Barcode scanner for .NET framework Control to read, scan read, scan image in VS .NET applications.
www.OnBarcode.com
The available repetition modifiers are shown in Table 6-4. All the constants are defined in the RepeatRule class.
USS-128 Drawer In Visual C#.NET
Using Barcode generation for VS .NET Control to generate, create EAN / UCC - 13 image in .NET applications.
www.OnBarcode.com
Code128 Reader In None
Using Barcode recognizer for Software Control to read, scan read, scan image in Software applications.
www.OnBarcode.com
Table 6-4. Repetition Modifiers
Field
DAY_IN_WEEK
Values Allowed
SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY 1-31 1-365 FIRST, SECOND, THIRD, FOURTH, FIFTH, LAST, SECONDLAST, THIRDLAST, FOURTHLAST, FIFTHLAST JANUARY, FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST, SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER
DAY_IN_MONTH DAY_IN_YEAR WEEK_IN_MONTH
MONTH_IN_YEAR
For certain frequencies, you can combine multiple modifiers to create a more finegrained event time. If you want to celebrate American Thanksgiving, create a yearly event that occurs the fourth Thursday of every November.
repeat.setInt(RepeatRule.FREQUENCY, RepeatRule.YEARLY); repeat.setInt(RepeatRule.MONTH_IN_YEAR, RepeatRule.NOVEMBER); repeat.setInt(RepeatRule.WEEK_IN_MONTH, RepeatRule.FOURTH);
Not every modifier is available for every frequency; for instance, DAY_IN_YEAR doesn t make sense when applied to a WEEKLY recurrence. Frequencies can be controlled on a handset-by-handset basis depending on what the underlying calendar supports. To determine whether a certain modifier or set of modifiers is supported, you can query EventList.getSupportedRepeatRuleFields(). If a combination of modifiers is accepted, the set will be returned in a bitwise AND. The next example checks to see how yearly recurring events are supported.
int[] supported = events.getSupportedRepeatRuleFields(RepeatRule.YEARLY); for (int i = 0; i < supported.length; ++i) { int rules = supported[i]; if (rules == (RepeatRule.DAY_IN_MONTH & RepeatRule.MONTH_IN_YEAR)) System.out.println("Can specify by month."); else if (rules == RepeatRule.DAY_IN_YEAR) System.out.println("Can specify by absolute date."); }
Finally, you can specify exceptions to a repetition. You would add one exception for each time that the event should not occur. Exceptions are implemented as long time values. If you decide to cancel next month s appointment but keep all future appointments, you could use the following code.
Download at
CHAPTER 6: Personal Information
Calendar exceptionTime = Calendar.getInstance(); exceptionTime.set(Calendar.MONTH, 1); repeat.addExceptDate(exceptionTime.getTime().getTime ());
You can check to see what exceptions have already been added by calling getExceptDates() and remove an existing exception by calling removeExceptDate(long date). To query a previously created repeat rule, use the following methods. getFields() returns an array of all the fields that have been set. getInt(int field) retrieves a previously set field, such as the FREQUENCY or the DAY_IN_YEAR. getDate(RepeatRule.END) retrieves the specified end time. dates(long startdate, long subsetBeginning, long subsetEnding) allows you to provide a time window, and will return all of the repetitions that would occur within that window, excluding any exceptions. Once you have a RepeatRule configured the way you want it, call Event.setRepeat(RepeatRule repeat). This will replace any previously configured repeat rule. You can query an event s current repetition by calling Event.getRepeat(); this will return null if no repetition has been provided.
Eventful Data
As with contacts, there are a variety of fields at your disposal when editing or reading event data. Table 6-5 displays all the fields supported on BlackBerry. Most of these are very simple, with a single nonarray nonattribute value provided. LOCATION is a single string, which is easier than providing a structured address but also makes it more difficult to parse an event s location. The special ATTENDEES field can have multiple values, one for each attendee. ALLDAY is a special convenience field that will convert the event into an all-day event, running from midnight GMT of the start date through midnight GMT of the end date.
Copyright © OnBarcode.com . All rights reserved.