| |
|
EWSoftware PDI Class Library
The EWSoftware Personal Data Interchange (PDI) Library presents you
with a complete set of classes that let you have access to all objects,
properties, parameter types, and data types as defined by the vCard (RFC
2426), vCalendar, and iCalendar (RFC 2445) specifications. Using these
classes, you can read and write data files in a well-defined format used by
many applications on various platforms to exchange personal information
such as business cards, telephone numbers, addresses, dates and times of
appointments, etc. A recurrence engine is also provided that allows you to
easily and reliably calculate occurrence dates and times for even the most
complex recurrence patterns. The classes can be used in both Windows Forms
applications and ASP.NET web applications.
For flexibility, a number of the data type classes such as
Duration, Period, DateTimeCollection,
and the Recurrence class are implemented as standalone classes
that can be used independently of the PDI calendar and vCard classes. This
lets you take advantage of their features without including any unnecessary
overhead.
The library contains the following features:
- The library is built in 100% .NET managed code written in C# and
provides a complete implementation of the vCard 2.1, vCard 3.0 (RFC 2426),
vCalendar 1.0, and iCalendar 2.0 (RFC 2445) specifications.
- Objects can be created by parsing them from a data stream such as a
string, text file, or a URL or in code using a rich, consistent object
model.
- Type-safe, enumerable, searchable, sortable collection classes are
provided for all of the objects that need a collection class. Almost all
of the collections also have overloaded
Add and
AddRange methods to quickly and easily add values to the them.
Collections containing objects with unique IDs (vCard, event, journal, to
do, and free/busy items) can be indexed using a unique ID value.
- PDI object collections support standard data binding on the collection,
top level properties, and child properties up to three levels deep.
- Some of the classes like
Holiday and Recurrence
support serialization (XML, SOAP, and binary).
- The recurrence engine which supports all iCalendar 2.0 recurrence
patterns and options is separate from the PDI data classes. As such, if
all you need is recurrence pattern generation without support for
exceptions or other features provided by the calendar classes, you only
need to reference one assembly containing just those classes that you need.
- The recurrence engine is very fast and supports the full date/time
range of the .NET
DateTime data type (01/01/0001 12:00:00AM to
12/31/9999 11:59:59PM).
- The
Recurrence class provides a type-safe enumerator
so that you can use a recurrence object in a foreach loop to
iterate over the entire set of date/times generated by a recurrence
pattern. Alternately, you can use various class methods to obtain a
DateTimeCollection for all instances or a range of instances
generated by the pattern.
- Additional classes are provided to define and determine the dates on
which holidays fall (
Holiday and HolidayCollection). These
can be used in conjunction with the recurrence engine to filter out
recurrence dates when they fall on a holiday. They can also be used by
themselves for any other purpose you may have that requires tracking
holiday dates.
- Holidays can be defined as fixed (occurring on a specific month and day
with optional support for moving them to the preceeding Friday if they fall
on a Saturday or the following Monday if they fall on a Sunday) or as
floating (occurring on a specific instance of a day of the week in a given
month). As with the recurrence engine, the holiday classes supports the
full date/time range of the .NET
DateTime data type.
- When the recurrence engine is used in conjunction with the PDI calendar
classes (
VEvent, VToDo, and VJournal), full support is
provided for multiple recurrence rules, recurrence dates, exception rules,
and exception dates so that very complex recurrence sets can be generated.
Instances can be generated in local time or the time zone of the component.
- Parser classes are provided to read vCard, vCalendar, and iCalendar
files. The parsers are fast and flexible enough to handle PDI data in any
format regardless of spacing, line folding, text case, and object,
property, or parameter order. Simply pass them a string, filename, URL, or
a
TextReader-derived stream class and they will do all of the work
necessary to load the objects.
- All PDI classes are able to write themselves out in the appropriate
format based on the specification version including encoding and folding
lines where appropriate. Simply use their
ToString method or use
the WriteToStream method to save them to a TextWriter-derived
stream class.
- Encoding and decoding support is built into the property classes and
they can handle all defined types including inline quoted-printable and
Base64 encoded binary data.
- Switching between specification versions is achieved by setting the
Version property on a top-level object such as VCard or
VCalendar.
- Support for iCalendar 2.0 time zones is provided. The
VTimeZone
and VTimeZoneCollection classes contain information about time zone
objects found in an iCalendar file. For calender properties that utilize
the TimeZoneID (TZID) parameter, their date/time values are
converted to/from local time automatically. You can also access the
underlying date/time for the time zone itself.
- Utility methods are provided in the
VCalendar class to convert
date/times from one time zone to another and between a time zone and local
time. The methods are Daylight Saving Time aware and will take it into
account when necessary based on the observance rules defined in the
VTimeZone objects.
- Other methods are provided in the components to apply a time zone with
date/time adjustment to the calendar as a whole or to individual components
and to set a time zone ID without changing the date/time values in the
calendar as a whole or in individual components.
- Some Windows Forms controls are provided for interacting with the PDI
classes (i.e. a holiday manager user control, holiday properties dialog,
recurrence pattern user controls, and a recurrence properties dialog).
- An ASP.NET web server control is provided for editing recurrence patterns
in a user-friendly fashion similar to the Windows Forms Recurrence Pattern
control.
Click the images for a larger view.
The HolidayManager control is used to maintain a set of holidays.
The set can optionally be saved to and loaded from an XML file. The
HolidayPropertiesDlg is used to edit the properties of the holiday items.
The RecurrencePropertiesDlg uses the RecurrencePattern control
to allow the editing of recurrence rule patterns. In simple mode (shown on the
left), the control uses a simple set of controls to allow you to edit patterns
in a fashion similar to Microsoft Outlook. When the Advanced checkbox
is checked, it switches to a more complete set of options to allow you finer
control over all of the possible recurrence rule parts. When initially opened,
the control examines the supplied pattern to determine the best mode to start
in based on the rule parts present in the pattern. Advanced mode can be
disabled to lock the control into only allowing the creation of simple patterns
as well.
Demo Applications
Various demo applications are included to show you how the classes can be used.
The vCard Browser shown below demonstrates how to load a vCard file and
edit vCard properties. Some sample vCard files are included the download.
The Calendar Browser shown below demonstrates how to load a
vCalendar or an iCalendar file and edit the various component properties.
Some sample calendar files are included the download.
The web application demonstrates various aspects of the EWSoftware
PDI classes (a C# and a VB.NET version are included in the download).
It covers most of the same areas as the other Windows Forms applications
included in the download and shows several examples of data binding with
the collection objects. It also demonstrates the recurrence pattern editor
web server control. You can try it out by
clicking here.
The shareware version of the EWSoftware PDI Library can be downloaded here:
NOTE: The recurrence class in the shareware version will not
generate any instances past May 31st, 2007. The vCard and
vCalendar/iCalendar classes also add a custom shareware tag to all output
files and the web server control displays a link to this page. In the
licensed version, the recurrence class supports all future dates and the
shareware tags are not output to the PDI files or in the web server control.
See above for a live demo.
The supplied demo projects are Visual Studio 2005 projects but can be
opened and converted to Visual Studio 2008 projects without any problems.
New Feature Requests
The components in this library provide an extensive set of features. However,
everyone has different needs, some of which might not have been anticipated.
If you find that these controls are missing features that you need, please
feel free to make a request to have them added. Every effort will be made
to work them into a future release.
A single user license or a site license can be purchased. The single user
license is for a single developer on a single PC. The site license is for
any number of developers at a single location. The licensed version
contains fully commented C# source code for all classes and controls in the
library. Technical support and bug fixes will be supplied to licensed users
free of charge. Once purchased, distribution of the assemblies containing
the classes and controls with your applications is royalty-free (see
the enclosed license agreement for full details).
Payment and Delivery
For fastest delivery, please choose a payment option below. Payment is
handled via PayPal and you will be e-mailed a URL within two (2) business
days that allows you to download the licensed version from this site. If
you would prefer to pay by an alternate method such as check or money
order, please contact the author directly at
Eric@EWoodruff.us.
Thank you!
NOTE: The download URL will be sent to the e-mail address on the
PayPal invoice. If you would like it sent to an alternate e-mail address,
please e-mail a note containing the alternate e-mail address at the same
time payment is made.
| 08/19/2007 |
2.0.0.1 - Minor update: Fixed some issues in the
VCalendar time zone conversion methods that caused incorrect
times or time zone names when crossing a standard to daylight saving time
boundary and vice versa.
Added support for parsing vNote objects defined in the IrMC 1.1
specification (see VNoteParser, VNote,
VNoteColllection, and BodyProperty). A new
section for vNote was added to the PDI Road Map help file topic.
|
| 05/29/2007 |
2.0.0.0 - Changes in this release:
- General Changes
- Added a
TryParse method to the Duration
and Period classes.
- Added a
UtcDateTime property to
BaseDateTimeProperty to get or set the value as a date/time
value expressed in Universal Time.
- Added the
EWSoftware.PDI.Binding namespace that
contains a generic base collection class along with some supporting
classes.
- All collections in the library now derive from a generic base
class (
Collection<T> or ExtendedBindingList<T>).
ExtendedBindingList<T> is bindable and contains several
utility methods for searching and sorting the collection using predicates.
- Fixed vCard 2.1 and vCalendar 1.0 properties so that they did
not escape commas unnecessarily.
- Added a topic to the help file to clarify the various time
formats used by the calendar objects and how to work with them.
- Added a topic to the help file to describe the data binding
capabilities of the
ExtendedBindingList<T> class.
- Updated the time zone information file used by the web demos to
reflect recent changes in Daylight Saving Time.
- PDI Object and Property Classes
- Child properties in
FreeBusyProperty,
ObservanceRule, VAlarm, VCard,
VEvent, VFreeBusy, VJournal,
VTimeZone, and VToDo are now bindable as well.
In order to bind to a child property, separate its name from the parent
property using an underscore (i.e. Name_SortableName,
Organization_Name, LastRevision_DateTimeValue,
TimeZoneId_Value). The demo applications contain examples.
The child property binding mechanism can be extended to other classes at
runtime by adding their type to the description provider by passing the type
to the static ChildPropertyTypeDescriptionProvider.Add method.
- Breaking Change: The
TimeZoneIdChangedEventHandler
delegate has been removed. Use the generic form
EventHandler<TimeZoneIdChangedEventArgs> instead.
- Breaking Change: The use of
System.Collections.Specialized.StringCollection has been
replaced with the use of EWSoftware.PDI.StringCollection which
may cause some conflicts. Update any affected code to use the new
PDI library string collection class instead.
- Web controls
- The recurrence pattern control now renders a fully
client-side DHTML implementation of the recurrence pattern editor with no
unnecessary postbacks.
- Breaking Change: The
RecurrencePattern.ShowTimePatterns
property has been replaced by the MaximumPattern property. This
lets you specify a RecurFrequency option that determines the
maximum pattern type that will be editable.
- Breaking Change: The
RecurrencePattern.SetFocus
method had been renamed Focus to match the .NET 2.0 method in the
standard web controls.
- Windows Forms Controls
- Breaking Change: The
RecurrencePattern.ShowTimePatterns
and RecurrencePropertiesDlg.ShowTimePatterns properties have been
replaced by the MaximumPattern property. This lets you specify a
RecurFrequency option that determines the maximum pattern type
that will be editable.
- Breaking Change: The
BrowseControl has
been rewritten to utilize standard data binding using a BindingSource.
This greatly simplifies the code needed to edit collection items. If you
currently make use of this control to edit the PDI collections. See the
demos for examples on how to use the updated browse control.
- Demo Applications
- The demos have been updated to make use of the new features
available in the .NET 2.0 version of the library. Much of the code related
to sorting and binding has been eliminated and those operations have been
greatly simplified. The collections now contain built-in generic search
and sort methods and they also contain improved data binding support.
|
| 05/01/2006 |
1.2.1.0 - Minor Update: Fixed a couple of vCard 2.1 properties
so that they did not escape special characters twice under certain
conditions.
|
| 04/17/2006 |
1.2.0.9 - Minor Update: Added static
VCalendar.TimeZoneTimeToUtc and VCalendar.UtcToTimeZoneTime
methods to convert time zone date/times to/from universal time. Fixed
VCalendar.TimeZoneToTimeZone so that it correctly converts times between
time zones near the standard time/daylight saving time shift.
|
| 03/12/2006 |
1.2.0.8 - Minor Update: Made another adjustment to the parser's
handling of line folds so that it handles soft line breaks in quoted printable
text with no data on the next line.
|
For a full list of all changes in prior versions see the help file supplied
with the download.
|