From e6a3fa5091edd096290cff6cc7d7f56e54f136e9 Mon Sep 17 00:00:00 2001 From: "wenfeng.ge" Date: Sat, 18 Mar 2017 16:36:16 +0800 Subject: [PATCH] Add API comments for ElmSharp API - Backgound|Check|CheckStateChangedEventArgs|Color|ColorSelector| ColorSelector|ColorSelectorItem|Conformant|Container|ContextPopup| ContextPopupItem|DateChangedEventArgs|DateTimeSelector| DisplayedMonthChangedEventArgs Change-Id: I1a4ff17ca41ec93ec3219043af3712b8a4c23fe3 Signed-off-by: wenfeng.ge --- src/ElmSharp/ElmSharp/Background.cs | 1 - src/ElmSharp/ElmSharp/Check.cs | 18 +++++ .../ElmSharp/CheckStateChangedEventArgs.cs | 16 ++++ src/ElmSharp/ElmSharp/Color.cs | 85 ++++++++++++++++++++ src/ElmSharp/ElmSharp/ColorChangedEventArgs.cs | 16 ++++ src/ElmSharp/ElmSharp/ColorSelector.cs | 60 ++++++++++++++ src/ElmSharp/ElmSharp/ColorSelectorItem.cs | 6 ++ src/ElmSharp/ElmSharp/Conformant.cs | 10 +++ src/ElmSharp/ElmSharp/Container.cs | 14 ++++ src/ElmSharp/ElmSharp/ContextPopup.cs | 93 ++++++++++++++++++++++ src/ElmSharp/ElmSharp/ContextPopupItem.cs | 15 ++++ src/ElmSharp/ElmSharp/DateChangedEventArgs.cs | 20 +++++ src/ElmSharp/ElmSharp/DateTimeSelector.cs | 51 ++++++++++++ .../ElmSharp/DisplayedMonthChangedEventArgs.cs | 20 +++++ 14 files changed, 424 insertions(+), 1 deletion(-) mode change 100644 => 100755 src/ElmSharp/ElmSharp/Check.cs mode change 100644 => 100755 src/ElmSharp/ElmSharp/CheckStateChangedEventArgs.cs mode change 100644 => 100755 src/ElmSharp/ElmSharp/Color.cs mode change 100644 => 100755 src/ElmSharp/ElmSharp/ColorChangedEventArgs.cs mode change 100644 => 100755 src/ElmSharp/ElmSharp/ColorSelector.cs mode change 100644 => 100755 src/ElmSharp/ElmSharp/ColorSelectorItem.cs mode change 100644 => 100755 src/ElmSharp/ElmSharp/Conformant.cs mode change 100644 => 100755 src/ElmSharp/ElmSharp/Container.cs mode change 100644 => 100755 src/ElmSharp/ElmSharp/ContextPopup.cs mode change 100644 => 100755 src/ElmSharp/ElmSharp/ContextPopupItem.cs mode change 100644 => 100755 src/ElmSharp/ElmSharp/DateChangedEventArgs.cs mode change 100644 => 100755 src/ElmSharp/ElmSharp/DateTimeSelector.cs mode change 100644 => 100755 src/ElmSharp/ElmSharp/DisplayedMonthChangedEventArgs.cs diff --git a/src/ElmSharp/ElmSharp/Background.cs b/src/ElmSharp/ElmSharp/Background.cs index 0360458..c463ce8 100755 --- a/src/ElmSharp/ElmSharp/Background.cs +++ b/src/ElmSharp/ElmSharp/Background.cs @@ -115,7 +115,6 @@ namespace ElmSharp /// public enum BackgroundOptions { - /// /// Centers the background image /// diff --git a/src/ElmSharp/ElmSharp/Check.cs b/src/ElmSharp/ElmSharp/Check.cs old mode 100644 new mode 100755 index c4419fd..ae153d8 --- a/src/ElmSharp/ElmSharp/Check.cs +++ b/src/ElmSharp/ElmSharp/Check.cs @@ -18,11 +18,20 @@ using System; namespace ElmSharp { + /// + /// The check is a widget allows for toggling a value between true and false. + /// public class Check : Layout { private SmartEvent _changed; private bool _currentState; + /// + /// Creates and initializes a new instance of the Check class. + /// + /// + /// The EvasObject to which the new Check will be attached as a child. + /// public Check(EvasObject parent) : base(parent) { _changed = new SmartEvent(this, this.RealHandle, "changed"); @@ -32,8 +41,17 @@ namespace ElmSharp }; } + /// + /// StateChanged will be triggered when the IsChecked in the Check is changed. + /// public event EventHandler StateChanged; + /// + /// Sets or gets whether the given Check is checked or not. + /// + /// + /// When object is checked, the value will set to true, Conversely will set to false. + /// public bool IsChecked { get diff --git a/src/ElmSharp/ElmSharp/CheckStateChangedEventArgs.cs b/src/ElmSharp/ElmSharp/CheckStateChangedEventArgs.cs old mode 100644 new mode 100755 index 28578ce..461798f --- a/src/ElmSharp/ElmSharp/CheckStateChangedEventArgs.cs +++ b/src/ElmSharp/ElmSharp/CheckStateChangedEventArgs.cs @@ -18,12 +18,28 @@ using System; namespace ElmSharp { + /// + /// It inherits System.EventArgs. + /// The CheckStateChangedEventArgs is EventArgs to record Check's state. + /// Include old state and new state. + /// public class CheckStateChangedEventArgs : EventArgs { + /// + /// Gets the OldState property.The return type is bool. + /// public bool OldState { get; private set; } + /// + /// Gets the NewState property.The return type is bool. + /// public bool NewState { get; private set; } + /// + /// Creates and initializes a new instance of the CheckStateChangedEventArgs class. + /// + /// Old state of Check which to use this CheckStateChangedEventArgs. + /// New state of Check which to use this CheckStateChangedEventArgs. public CheckStateChangedEventArgs(bool oldState, bool newState) { this.OldState = oldState; diff --git a/src/ElmSharp/ElmSharp/Color.cs b/src/ElmSharp/ElmSharp/Color.cs old mode 100644 new mode 100755 index 7b3ef17..8b2845f --- a/src/ElmSharp/ElmSharp/Color.cs +++ b/src/ElmSharp/ElmSharp/Color.cs @@ -19,6 +19,9 @@ using System.Globalization; namespace ElmSharp { + /// + /// The Color is a struct to record Check's state. + /// public struct Color { readonly int _a; @@ -34,40 +37,81 @@ namespace ElmSharp Rgb } + /// + /// Gets a default Color instance. + /// + /// + /// In default Color instance,Mode type is Default,RGBA all set as -1. + /// public static Color Default { get { return new Color(-1, -1, -1, -1, Mode.Default); } } + /// + /// Gets whether the Color instance's mode is default or not. + /// Return type is bool. + /// public bool IsDefault { get { return _mode == Mode.Default; } } + /// + /// Gets A value of RGBA. + /// A means the Alpha in color. + /// public int A { get { return _a; } } + /// + /// Gets R value of RGBA. + /// R means the Red in color. + /// public int R { get { return _r; } } + /// + /// Gets G value of RGBA. + /// G means the Green in color. + /// public int G { get { return _g; } } + /// + /// Gets B value of RGBA. + /// B means the Blue in color. + /// public int B { get { return _b; } } + /// + /// Creates and initializes a new instance of the Color class. + /// With RGB parameters. + /// + /// Red of RGB + /// Green of RGB + /// Blue of RGB public Color(int r, int g, int b) : this(r, g, b, 255) { } + /// + /// Creates and initializes a new instance of the Color class. + /// With RGBA parameters. + /// + /// Red of RGBA + /// Green of RGBA< + /// Blue of RGBA< + /// Alpha of RGBA< public Color(int r, int g, int b, int a) : this(r, g, b, a, Mode.Rgb) { } @@ -106,6 +150,14 @@ namespace ElmSharp return base.Equals(obj); } + /// + /// Compare whether two Color instance is same or not. + /// + /// A Color instance. + /// A Color instance. + /// The result whether two instance is same or not. + /// Return type is bool.If they are same, return true. + /// public static bool operator ==(Color a, Color b) { if (ReferenceEquals(a, b)) @@ -117,6 +169,14 @@ namespace ElmSharp return EqualsInner(a, b); } + /// + /// Compare whether two Color instance is different or not. + /// + /// A Color instance. + /// A Color instance. + /// The result whether two instance is different or not. + /// Return type is bool.If they are different, return true. + /// public static bool operator !=(Color a, Color b) { return !(a == b); @@ -134,6 +194,11 @@ namespace ElmSharp return string.Format(CultureInfo.InvariantCulture, "[Color: R={0}, G={1}, B={2}, A={3}]", R, G, B, A); } + /// + /// Gets a Color instance with a hexadecimal string parameter. + /// + /// Hexadecimal string. + /// New instance of Color struct. public static Color FromHex(string hex) { hex = hex.Replace("#", ""); @@ -152,17 +217,37 @@ namespace ElmSharp return FromUint(Convert.ToUInt32(hex.Replace("#", ""), 16)); } + /// + /// Gets a Color instance with a Unsigned integer parameter. + /// + /// Unsigned integer indicates RGBA. + /// New instance of Color struct. [CLSCompliant(false)] public static Color FromUint(uint argb) { return FromRgba((byte)((argb & 0x00ff0000) >> 0x10), (byte)((argb & 0x0000ff00) >> 0x8), (byte)(argb & 0x000000ff), (byte)((argb & 0xff000000) >> 0x18)); } + /// + /// Gets a Color instance with R,G,B,A parameters. + /// + /// Red in RGBA. + /// Green in RGBA. + /// Blue in RGBA. + /// Alpha in RGBA. + /// New instance of Color struct. public static Color FromRgba(int r, int g, int b, int a) { return new Color(r, g, b, a); } + /// + /// Gets a Color instance with R,G,B,A parameters. + /// + /// Red in RGB. + /// Green in RGB. + /// Blue in RGB. + /// New instance of Color struct. public static Color FromRgb(int r, int g, int b) { return FromRgba(r, g, b, 255); diff --git a/src/ElmSharp/ElmSharp/ColorChangedEventArgs.cs b/src/ElmSharp/ElmSharp/ColorChangedEventArgs.cs old mode 100644 new mode 100755 index 6ff13e9..b1090de --- a/src/ElmSharp/ElmSharp/ColorChangedEventArgs.cs +++ b/src/ElmSharp/ElmSharp/ColorChangedEventArgs.cs @@ -18,12 +18,28 @@ using System; namespace ElmSharp { + /// + /// It inherits System.EventArgs. + /// Event ColorChanged of ColorSelector contain ColorChangedEventArgs as a parameter. + /// Refer to type. + /// public class ColorChangedEventArgs : EventArgs { + /// + /// Gets old color in color changed event. + /// public Color OldColor { get; private set; } + /// + /// Gets new color in color changed event. + /// public Color NewColor { get; private set; } + /// + /// Creates and initializes a new instance of the ColorChangedEventArgs class. + /// + /// old color + /// new color public ColorChangedEventArgs(Color oldColor, Color newColor) { this.OldColor = oldColor; diff --git a/src/ElmSharp/ElmSharp/ColorSelector.cs b/src/ElmSharp/ElmSharp/ColorSelector.cs old mode 100644 new mode 100755 index 6036ea9..2a40ca1 --- a/src/ElmSharp/ElmSharp/ColorSelector.cs +++ b/src/ElmSharp/ElmSharp/ColorSelector.cs @@ -18,22 +18,59 @@ using System; namespace ElmSharp { + /// + /// Enumeration for mode of ColorSelector + /// public enum ColorSelectorMode { + /// + /// Only color palette is displayed, default + /// Palette, + /// + /// Only color selector is displayed + /// Components, + /// + /// Both Palette and selector is displayed + /// Both, + /// + /// Only color picker is displayed + /// Picker, + /// + /// This mode is not supported. If you use this, nothing will be shown + /// Plane, + /// + /// This mode is not supported. If you use this, it will be shown same with Palette mode + /// PallettePlane, + /// + /// This mode is not supported. If you use this, it will be shown same with Palette mode + /// All } + /// + /// The ColorSelector is a widget to set a series of colors. + /// It also allows to load/save colors from/to config with a unique identifier. + /// + /// + /// By default, the colors are loaded/saved from/to config using "default" identifier. + /// The colors can be picked by user from the color set by clicking on individual + /// color item on the palette or by selecting it from selector. + /// public class ColorSelector : Layout { private readonly SmartEvent _changed; private Color _currentColor; + /// + /// Creates and initializes a new instance of the ColorSelector class. + /// + /// public ColorSelector(EvasObject parent) : base(parent) { _changed = new SmartEvent(this, "changed", (data, obj, info) => @@ -42,12 +79,18 @@ namespace ElmSharp }); } + /// + /// ColorChanged will be triggered when the SelectedColor changed. + /// public event EventHandler ColorChanged { add { _changed.On += value; } remove { _changed.On -= value; } } + /// + /// Gets or sets color of colorselector. + /// public Color SelectedColor { get @@ -64,6 +107,9 @@ namespace ElmSharp } } + /// + /// Gets Alpha of a default Color Class. + /// public override int Opacity { get @@ -77,6 +123,9 @@ namespace ElmSharp } } + /// + /// Gets or sets Colorselector's mode. + /// public ColorSelectorMode Mode { get @@ -89,6 +138,9 @@ namespace ElmSharp } } + /// + /// Get or set current palette's name. + /// public string PaletteName { get @@ -101,6 +153,11 @@ namespace ElmSharp } } + /// + /// Adds a new color item to palette. + /// + /// Color item to add + /// A new color palette Item. public ColorSelectorItem AddPaletteColor(Color color) { ColorSelectorItem item = new ColorSelectorItem(); @@ -108,6 +165,9 @@ namespace ElmSharp return item; } + /// + /// Clear the palette items. + /// public void ClearPalette() { Interop.Elementary.elm_colorselector_palette_clear(Handle); diff --git a/src/ElmSharp/ElmSharp/ColorSelectorItem.cs b/src/ElmSharp/ElmSharp/ColorSelectorItem.cs old mode 100644 new mode 100755 index 4ee5f7a..10205e2 --- a/src/ElmSharp/ElmSharp/ColorSelectorItem.cs +++ b/src/ElmSharp/ElmSharp/ColorSelectorItem.cs @@ -18,12 +18,18 @@ using System; namespace ElmSharp { + /// + /// A instance to the ColorSelector item added. + /// public class ColorSelectorItem : ItemObject { internal ColorSelectorItem() : base(IntPtr.Zero) { } + /// + /// Gets or sets the Palette item's color + /// public Color Color { get diff --git a/src/ElmSharp/ElmSharp/Conformant.cs b/src/ElmSharp/ElmSharp/Conformant.cs old mode 100644 new mode 100755 index 17bc9c6..84da0e3 --- a/src/ElmSharp/ElmSharp/Conformant.cs +++ b/src/ElmSharp/ElmSharp/Conformant.cs @@ -18,8 +18,18 @@ using System; namespace ElmSharp { + /// + /// The check is a widget that can be used in elementary apps + /// to account for space taken up by the indicator, + /// virtual keypad & softkey windows when running the illume2 module of E17. + /// public class Conformant : Widget { + /// + /// Creates and initializes a new instance of the Conformant class. + /// + /// The parent is a given container which will be attached by Conformant + /// as a child.It's type. public Conformant(Window parent) : base(parent) { Interop.Evas.evas_object_size_hint_weight_set(Handle, 1.0, 1.0); diff --git a/src/ElmSharp/ElmSharp/Container.cs b/src/ElmSharp/ElmSharp/Container.cs old mode 100644 new mode 100755 index b9c4b08..aa73ba2 --- a/src/ElmSharp/ElmSharp/Container.cs +++ b/src/ElmSharp/ElmSharp/Container.cs @@ -19,14 +19,28 @@ using System.Collections.Generic; namespace ElmSharp { + /// + /// It inherits . + /// The Container is a abstract class. + /// Other class inherits it to Elementary is about displaying + /// its widgets in a nice layout. + /// public abstract class Container : Widget { HashSet _children = new HashSet(); + /// + /// Creates and initializes a new instance of class which inherit from Container. + /// + /// The parent is a given object which will be attached by Container + /// as a child.It's type. public Container(EvasObject parent) : base(parent) { } + /// + /// Sets the background color of a given Container. + /// public override Color BackgroundColor { set diff --git a/src/ElmSharp/ElmSharp/ContextPopup.cs b/src/ElmSharp/ElmSharp/ContextPopup.cs old mode 100644 new mode 100755 index e812c8c..3be2baa --- a/src/ElmSharp/ElmSharp/ContextPopup.cs +++ b/src/ElmSharp/ElmSharp/ContextPopup.cs @@ -19,21 +19,48 @@ using System.Collections.Generic; namespace ElmSharp { + /// + /// Enumeration of ContextPopup direction type. + /// public enum ContextPopupDirection { + /// + /// ContextPopup show appear below clicked area + /// /// Down, + /// + /// ContextPopup show appear to the right of the clicked area + /// Right, + /// + /// ContextPopup show appear to the left of the clicked area + /// Left, + /// + /// ContextPopup show appear above the clicked area + /// Up, + /// + /// ContextPopup does not determine it's direction yet + /// Unknown } + /// + /// It inherits . + /// The ContextPopup is a widget that when it shown, pops up a list of items. + /// public class ContextPopup : Layout { HashSet _children = new HashSet(); SmartEvent _dismissed; Interop.Evas.SmartCallback _onSelected; + /// + /// Creates and initializes a new instance of the ContextPopup class. + /// + /// The parent is a given container which will be attached by ContextPopup + /// as a child.It's type. public ContextPopup(EvasObject parent) : base(parent) { _dismissed = new SmartEvent(this, this.RealHandle, "dismissed"); @@ -48,8 +75,20 @@ namespace ElmSharp }; } + /// + /// Dismissed is raised when the ContextPopup item is dismissed. + /// + /// + /// Outside of ContextPopup was clicked or it's parent area is changed or the language is changed. and then ContextPopup is dismissed. + /// public event EventHandler Dismissed; + /// + /// Gets the current direction of a ContextPopup. + /// + /// + /// Once the ContextPopup showed up, the direction would be determined. + /// public ContextPopupDirection Direction { get @@ -58,6 +97,10 @@ namespace ElmSharp } } + /// + /// Gets or sets the value of current ContextPopup object's orientation. + /// True for horizontal mode, False for vertical mode (or errors) + /// public bool IsHorizontal { get @@ -70,6 +113,13 @@ namespace ElmSharp } } + /// + /// Gets or sets whether ContextPopup hide automatically + /// or not when parent of ContextPopup is resized. + /// + /// + /// Default value of AutoHide is False. + /// public bool AutoHide { get @@ -82,16 +132,33 @@ namespace ElmSharp } } + /// + /// Clears all items in the given ContextPopup object. + /// public void Clear() { Interop.Elementary.elm_ctxpopup_clear(Handle); } + /// + /// Sets the direction priority of a ContextPopup. + /// + /// 1st priority of direction + /// 2nd priority of direction + /// 3th priority of direction + /// 4th priority of direction public void SetDirectionPriorty(ContextPopupDirection first, ContextPopupDirection second, ContextPopupDirection third, ContextPopupDirection fourth) { Interop.Elementary.elm_ctxpopup_direction_priority_set(RealHandle, (int)first, (int)second, (int)third, (int)fourth); } + /// + /// Gets the direction priority of a ContextPopup. + /// + /// 1st priority of direction to be returned + /// 2nd priority of direction to be returned + /// 2nd priority of direction to be returned + /// 4th priority of direction to be returned public void GetDirectionPriority(out ContextPopupDirection first, out ContextPopupDirection second, out ContextPopupDirection third, out ContextPopupDirection fourth) { int firstOut, secondOut, thirdOut, fourthOut; @@ -102,11 +169,24 @@ namespace ElmSharp fourth = (ContextPopupDirection)fourthOut; } + /// + /// Adds a new item to a ContextPopup object with label. + /// + /// The Label of the new item + /// + /// A ContextPopupItem added or NULL, on errors + /// public ContextPopupItem Append(string label) { return Append(label, null); } + /// + /// Adds a new item to a ContextPopup object with label and icon. + /// + /// The Label of the new item + /// Icon to be set on new item + /// A ContextPopupItem added or NULL, on errors public ContextPopupItem Append(string label, EvasObject icon) { ContextPopupItem item = new ContextPopupItem(label, icon); @@ -115,16 +195,29 @@ namespace ElmSharp return item; } + /// + /// Dismiss a ContextPopup object. The ContextPopup will be hidden and the "clicked" signal will be emitted. + /// public void Dismiss() { Interop.Elementary.elm_ctxpopup_dismiss(RealHandle); } + /// + /// Gets the possibility that the direction would be available + /// + /// A direction user wants to check + /// + /// Get false if you cannot put it in the direction. Gets true if it's possible. + /// public bool IsAvailableDirection(ContextPopupDirection direction) { return Interop.Elementary.elm_ctxpopup_direction_available_get(RealHandle, (int)direction); } + /// + /// Gets Alpha of a default Color Class. + /// public override int Opacity { get diff --git a/src/ElmSharp/ElmSharp/ContextPopupItem.cs b/src/ElmSharp/ElmSharp/ContextPopupItem.cs old mode 100644 new mode 100755 index 6fcdcb7..35c908b --- a/src/ElmSharp/ElmSharp/ContextPopupItem.cs +++ b/src/ElmSharp/ElmSharp/ContextPopupItem.cs @@ -18,6 +18,10 @@ using System; namespace ElmSharp { + /// + /// It inherits . + /// A instance to the ContextPopup item added. + /// public class ContextPopupItem : ItemObject { internal ContextPopupItem(string text, EvasObject icon) : base(IntPtr.Zero) @@ -26,8 +30,19 @@ namespace ElmSharp Icon = icon; } + /// + /// Gets the Text property of the given ContextPopupItem. + /// public string Text { get; internal set; } + + /// + /// Gets the Icon(type is ) property of the given ContextPopupItem. + /// public EvasObject Icon { get; internal set; } + + /// + /// Selected will be triggered when the ContextPopupItem is Selected. + /// public event EventHandler Selected; internal void SendSelected() diff --git a/src/ElmSharp/ElmSharp/DateChangedEventArgs.cs b/src/ElmSharp/ElmSharp/DateChangedEventArgs.cs old mode 100644 new mode 100755 index c2f7842..25d622c --- a/src/ElmSharp/ElmSharp/DateChangedEventArgs.cs +++ b/src/ElmSharp/ElmSharp/DateChangedEventArgs.cs @@ -18,12 +18,32 @@ using System; namespace ElmSharp { + /// + /// It inherits System.EventArgs. + /// The DateChanged event in Calendar and DateTimeChanged event in DateTimeSelector. + /// contain DateChangedEventArgs as a parameter. + /// public class DateChangedEventArgs : EventArgs { + /// + /// Gets the OldDate property of the given DateChangedEventArgs. + /// public DateTime OldDate { get; private set; } + /// + /// Gets the NewDate property of the given DateChangedEventArgs. + /// public DateTime NewDate { get; private set; } + /// + /// Creates and initializes a new instance of the DateChangedEventArgs class. + /// + /// + /// Old date when DateChanged event or DateTimeChanged event triggered + /// + /// + /// New date when DateChanged event or DateTimeChanged event triggered + /// public DateChangedEventArgs(DateTime oldDate, DateTime newDate) { this.OldDate = oldDate; diff --git a/src/ElmSharp/ElmSharp/DateTimeSelector.cs b/src/ElmSharp/ElmSharp/DateTimeSelector.cs old mode 100644 new mode 100755 index 5aff93a..584c236 --- a/src/ElmSharp/ElmSharp/DateTimeSelector.cs +++ b/src/ElmSharp/ElmSharp/DateTimeSelector.cs @@ -18,6 +18,9 @@ using System; namespace ElmSharp { + /// + /// Enumeration of datetime field types for DateTimeSelector. + /// public enum DateTimeFieldType { Year, @@ -28,11 +31,22 @@ namespace ElmSharp AmPm } + /// + /// It inherits + /// DateTimeSelector is a widget to display and input date & time values. + /// This widget displays date and time as per the system's locale settings + /// (Date includes Day, Month & Year along with the defined separators and Time includes Hour, Minute & AM/PM fields. Separator for AM/PM field is ignored. + /// public class DateTimeSelector : Layout { SmartEvent _changed; DateTime _cacheDateTime; + /// + /// Creates and initializes a new instance of the DateTimeSelector class. + /// + /// The parent is a given container which will be attached by DateTimeSelector + ///as a child.It's type. public DateTimeSelector(EvasObject parent) : base(parent) { _changed = new SmartEvent(this, this.RealHandle, "changed"); @@ -44,8 +58,17 @@ namespace ElmSharp }; } + /// + /// ItemSelected is raised when Datetime field value changed. + /// public event EventHandler DateTimeChanged; + /// + /// Gets or sets the datetime format. + /// + /// + /// format is a combination of allowed LIBC date format specifiers like: "%b %d, %Y %I : %M %p". + /// public string Format { get @@ -58,6 +81,9 @@ namespace ElmSharp } } + /// + /// Gets or sets the upper boundary of DateTime field. + /// public DateTime MaximumDateTime { get @@ -73,6 +99,9 @@ namespace ElmSharp } } + /// + /// Gets or sets the lower boundary of DateTime field. + /// public DateTime MinimumDateTime { get @@ -88,6 +117,9 @@ namespace ElmSharp } } + /// + /// Gets or sets the current value of DateTime field. + /// public DateTime DateTime { get @@ -104,16 +136,35 @@ namespace ElmSharp } } + /// + /// Gets whether a field can be visible. + /// + /// Enumeration + /// + /// The field is visible or not. + /// Type is bool.If visible, return true. + /// public bool IsFieldVisible(DateTimeFieldType type) { return Interop.Elementary.elm_datetime_field_visible_get(RealHandle, (int)type); } + /// + /// Sets the field limits of a field. + /// + /// Enumeration + /// minimum limit + /// maximum limit public void SetFieldLimit(DateTimeFieldType type, int minimum, int maximum) { Interop.Elementary.elm_datetime_field_limit_set(RealHandle, (int)type, minimum, maximum); } + /// + /// Gets whether a field can be visible. + /// + /// Enumeration + /// When set as true, the field type visible. public void SetFieldVisible(DateTimeFieldType type, bool visible) { Interop.Elementary.elm_datetime_field_visible_set(RealHandle, (int)type, visible); diff --git a/src/ElmSharp/ElmSharp/DisplayedMonthChangedEventArgs.cs b/src/ElmSharp/ElmSharp/DisplayedMonthChangedEventArgs.cs old mode 100644 new mode 100755 index 85badc3..8407f6d --- a/src/ElmSharp/ElmSharp/DisplayedMonthChangedEventArgs.cs +++ b/src/ElmSharp/ElmSharp/DisplayedMonthChangedEventArgs.cs @@ -18,12 +18,32 @@ using System; namespace ElmSharp { + /// + /// It inherits System.EventArgs. + /// The DisplayedMonthChangedEvent in Calendar contain + /// DisplayedMonthChangedEventArgs as a parameter. + /// public class DisplayedMonthChangedEventArgs : EventArgs { + /// + /// Gets the OldMonth property of the given DisplayedMonthChangedEventArgs. + /// public int OldMonth { get; private set; } + /// + /// Gets the NewMonth property of the given DisplayedMonthChangedEventArgs. + /// public int NewMonth { get; private set; } + /// + /// Creates and initializes a new instance of the DisplayedMonthChangedEventArgs class. + /// + /// + /// old month of date when DisplayedMonthChangedEvent triggered. + /// + /// + /// new month of date when DisplayedMonthChangedEvent triggered. + /// public DisplayedMonthChangedEventArgs(int oldMonth, int newMonth) { this.OldMonth = oldMonth; -- 2.7.4