Author: fmantek
Date: Thu Sep 13 08:32:52 2007
New Revision: 249
Modified:
trunk/clients/cs/src/extensions/when.cs
trunk/clients/cs/src/gcalendar/evententry.cs
Log:
More constructors for When and EventEntry to make live easier (by Jeff Fisher)
Modified: trunk/clients/cs/src/extensions/when.cs
==============================================================================
--- trunk/clients/cs/src/extensions/when.cs (original)
+++ trunk/clients/cs/src/extensions/when.cs Thu Sep 13 08:32:52 2007
@@ -53,6 +53,35 @@
/// </summary>
protected ArrayList reminders;
+ /// <summary>
+ /// Constructs a new instance of a When object.
+ /// </summary>
+ public When() : base()
+ {
+ }
+
+ /// <summary>
+ /// Constructs a new instance of a When object with provided data.
+ /// </summary>
+ /// <param name="start">The beginning of the event.</param>
+ /// <param name="end">The end of the event.</param>
+ public When(DateTime start, DateTime end) : this()
+ {
+ this.StartTime = start;
+ this.EndTime = end;
+ }
+
+ /// <summary>
+ /// Constructs a new instance of a When object with provided data.
+ /// </summary>
+ /// <param name="start">The beginning of the event.</param>
+ /// <param name="end">The end of the event.</param>
+ /// <param name="allDay">A flag to indicate an all day event.</param>
+ public When(DateTime start, DateTime end, bool allDay) : this(start,
end)
+ {
+ this.AllDay = allDay;
+ }
+
//////////////////////////////////////////////////////////////////////
/// <summary>accessor method public DateTime StartTime</summary>
/// <returns> </returns>
Modified: trunk/clients/cs/src/gcalendar/evententry.cs
==============================================================================
--- trunk/clients/cs/src/gcalendar/evententry.cs (original)
+++ trunk/clients/cs/src/gcalendar/evententry.cs Thu Sep 13 08:32:52 2007
@@ -50,6 +50,41 @@
participants = new WhoCollection(this);
}
+ /// <summary>
+ /// Constructs a new EventEntry instance with provided data.
+ /// </summary>
+ /// <param name="title">The descriptive title of the event ("What" in
the UI)</param>
+ public EventEntry(string title) : this()
+ {
+ this.Title.Text = title;
+ }
+
+ /// <summary>
+ /// Constructs a new EventEntry instance with provided data.
+ /// </summary>
+ /// <param name="title">The descriptive title of the event ("What" in
the UI)</param>
+ /// <param name="description">A longer description of the event
+ /// ("Description" in the UI)</param>
+ public EventEntry(string title, string description) : this(title)
+ {
+ this.Content.Content = description;
+ }
+
+ /// <summary>
+ /// Constructs a new EventEntry instance with provided data.
+ /// </summary>
+ /// <param name="title">The descriptive title of the event ("What" in
the UI)</param>
+ /// <param name="description">A longer description of the event
+ /// ("Description" in the UI)</param>
+ /// <param name="location">The location of the event ("Where" in the
UI)</param>
+ public EventEntry(string title, string description, string location)
+ : this(title, description)
+ {
+ Where eventLocation = new Where();
+ eventLocation.ValueString = location;
+ this.Locations.Add(eventLocation);
+ }
+
/// <summary>
/// Constructs a new EventStatus instance
@@ -766,4 +801,5 @@
}
}
+
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Data API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/google-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---