diff options
author | Jeonghyun Yun <jh0506.yun@samsung.com> | 2017-03-21 21:04:53 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.vlan103.tizen.org> | 2017-03-21 21:04:53 -0700 |
commit | db6dab709409352e3f46757d3752196453b6ad9d (patch) | |
tree | c7d2261d453fab26b25dbd52d82650711abb8d11 | |
parent | c85e5184ff9741bcb3dd6202a82d59afa51e5f2e (diff) | |
parent | 51aa2dbb59025a2266df5100b687cb2ca24a81da (diff) | |
download | elm-sharp-db6dab709409352e3f46757d3752196453b6ad9d.tar.gz elm-sharp-db6dab709409352e3f46757d3752196453b6ad9d.tar.bz2 elm-sharp-db6dab709409352e3f46757d3752196453b6ad9d.zip |
Merge "Add API comments for ElmSharp API" into tizen
-rwxr-xr-x | ElmSharp/ElmSharp/Background.cs | 1 | ||||
-rwxr-xr-x[-rw-r--r--] | ElmSharp/ElmSharp/Check.cs | 18 | ||||
-rwxr-xr-x[-rw-r--r--] | ElmSharp/ElmSharp/CheckStateChangedEventArgs.cs | 16 | ||||
-rwxr-xr-x[-rw-r--r--] | ElmSharp/ElmSharp/Color.cs | 85 | ||||
-rwxr-xr-x[-rw-r--r--] | ElmSharp/ElmSharp/ColorChangedEventArgs.cs | 16 | ||||
-rwxr-xr-x[-rw-r--r--] | ElmSharp/ElmSharp/ColorSelector.cs | 60 | ||||
-rwxr-xr-x[-rw-r--r--] | ElmSharp/ElmSharp/ColorSelectorItem.cs | 6 | ||||
-rwxr-xr-x[-rw-r--r--] | ElmSharp/ElmSharp/Conformant.cs | 10 | ||||
-rwxr-xr-x[-rw-r--r--] | ElmSharp/ElmSharp/Container.cs | 14 | ||||
-rwxr-xr-x[-rw-r--r--] | ElmSharp/ElmSharp/ContextPopup.cs | 93 | ||||
-rwxr-xr-x[-rw-r--r--] | ElmSharp/ElmSharp/ContextPopupItem.cs | 15 | ||||
-rwxr-xr-x[-rw-r--r--] | ElmSharp/ElmSharp/DateChangedEventArgs.cs | 20 | ||||
-rwxr-xr-x[-rw-r--r--] | ElmSharp/ElmSharp/DateTimeSelector.cs | 51 | ||||
-rwxr-xr-x[-rw-r--r--] | ElmSharp/ElmSharp/DisplayedMonthChangedEventArgs.cs | 20 |
14 files changed, 424 insertions, 1 deletions
diff --git a/ElmSharp/ElmSharp/Background.cs b/ElmSharp/ElmSharp/Background.cs index 0360458..c463ce8 100755 --- a/ElmSharp/ElmSharp/Background.cs +++ b/ElmSharp/ElmSharp/Background.cs @@ -115,7 +115,6 @@ namespace ElmSharp /// </summary> public enum BackgroundOptions { - /// <summary> /// Centers the background image /// </summary> diff --git a/ElmSharp/ElmSharp/Check.cs b/ElmSharp/ElmSharp/Check.cs index c4419fd..ae153d8 100644..100755 --- a/ElmSharp/ElmSharp/Check.cs +++ b/ElmSharp/ElmSharp/Check.cs @@ -18,11 +18,20 @@ using System; namespace ElmSharp { + /// <summary> + /// The check is a widget allows for toggling a value between true and false. + /// </summary> public class Check : Layout { private SmartEvent _changed; private bool _currentState; + /// <summary> + /// Creates and initializes a new instance of the Check class. + /// </summary> + /// <param name="parent"> + /// The EvasObject to which the new Check will be attached as a child. + /// </param> public Check(EvasObject parent) : base(parent) { _changed = new SmartEvent(this, this.RealHandle, "changed"); @@ -32,8 +41,17 @@ namespace ElmSharp }; } + /// <summary> + /// StateChanged will be triggered when the IsChecked in the Check is changed. + /// </summary> public event EventHandler<CheckStateChangedEventArgs> StateChanged; + /// <summary> + /// Sets or gets whether the given Check is checked or not. + /// </summary> + /// <remarks> + /// When object is checked, the value will set to true, Conversely will set to false. + /// </remarks> public bool IsChecked { get diff --git a/ElmSharp/ElmSharp/CheckStateChangedEventArgs.cs b/ElmSharp/ElmSharp/CheckStateChangedEventArgs.cs index 28578ce..461798f 100644..100755 --- a/ElmSharp/ElmSharp/CheckStateChangedEventArgs.cs +++ b/ElmSharp/ElmSharp/CheckStateChangedEventArgs.cs @@ -18,12 +18,28 @@ using System; namespace ElmSharp { + /// <summary> + /// It inherits System.EventArgs. + /// The CheckStateChangedEventArgs is EventArgs to record Check's state. + /// Include old state and new state. + /// </summary> public class CheckStateChangedEventArgs : EventArgs { + /// <summary> + /// Gets the OldState property.The return type is bool. + /// </summary> public bool OldState { get; private set; } + /// <summary> + /// Gets the NewState property.The return type is bool. + /// </summary> public bool NewState { get; private set; } + /// <summary> + /// Creates and initializes a new instance of the CheckStateChangedEventArgs class. + /// </summary> + /// <param name="oldState">Old state of Check which to use this CheckStateChangedEventArgs.</param> + /// <param name="newState">New state of Check which to use this CheckStateChangedEventArgs.</param> public CheckStateChangedEventArgs(bool oldState, bool newState) { this.OldState = oldState; diff --git a/ElmSharp/ElmSharp/Color.cs b/ElmSharp/ElmSharp/Color.cs index 7b3ef17..8b2845f 100644..100755 --- a/ElmSharp/ElmSharp/Color.cs +++ b/ElmSharp/ElmSharp/Color.cs @@ -19,6 +19,9 @@ using System.Globalization; namespace ElmSharp { + /// <summary> + /// The Color is a struct to record Check's state. + /// </summary> public struct Color { readonly int _a; @@ -34,40 +37,81 @@ namespace ElmSharp Rgb } + /// <summary> + /// Gets a default Color instance. + /// </summary> + /// <remarks> + /// In default Color instance,Mode type is Default,RGBA all set as -1. + /// </remarks> public static Color Default { get { return new Color(-1, -1, -1, -1, Mode.Default); } } + /// <summary> + /// Gets whether the Color instance's mode is default or not. + /// Return type is bool. + /// </summary> public bool IsDefault { get { return _mode == Mode.Default; } } + /// <summary> + /// Gets A value of RGBA. + /// A means the Alpha in color. + /// </summary> public int A { get { return _a; } } + /// <summary> + /// Gets R value of RGBA. + /// R means the Red in color. + /// </summary> public int R { get { return _r; } } + /// <summary> + /// Gets G value of RGBA. + /// G means the Green in color. + /// </summary> public int G { get { return _g; } } + /// <summary> + /// Gets B value of RGBA. + /// B means the Blue in color. + /// </summary> public int B { get { return _b; } } + /// <summary> + /// Creates and initializes a new instance of the Color class. + /// With RGB parameters. + /// </summary> + /// <param name="r">Red of RGB</param> + /// <param name="g">Green of RGB</param> + /// <param name="b">Blue of RGB</param> public Color(int r, int g, int b) : this(r, g, b, 255) { } + /// <summary> + /// Creates and initializes a new instance of the Color class. + /// With RGBA parameters. + /// </summary> + /// <param name="r">Red of RGBA</param> + /// <param name="g">Green of RGBA<</param> + /// <param name="b">Blue of RGBA<</param> + /// <param name="a">Alpha of RGBA<</param> 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); } + /// <summary> + /// Compare whether two Color instance is same or not. + /// </summary> + /// <param name="a">A Color instance.</param> + /// <param name="b">A Color instance.</param> + /// <returns>The result whether two instance is same or not. + /// Return type is bool.If they are same, return true. + /// </returns> public static bool operator ==(Color a, Color b) { if (ReferenceEquals(a, b)) @@ -117,6 +169,14 @@ namespace ElmSharp return EqualsInner(a, b); } + /// <summary> + /// Compare whether two Color instance is different or not. + /// </summary> + /// <param name="a">A Color instance.</param> + /// <param name="b">A Color instance.</param> + /// <returns>The result whether two instance is different or not. + /// Return type is bool.If they are different, return true. + /// </returns> 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); } + /// <summary> + /// Gets a Color instance with a hexadecimal string parameter. + /// </summary> + /// <param name="hex">Hexadecimal string.</param> + /// <returns>New instance of Color struct.</returns> public static Color FromHex(string hex) { hex = hex.Replace("#", ""); @@ -152,17 +217,37 @@ namespace ElmSharp return FromUint(Convert.ToUInt32(hex.Replace("#", ""), 16)); } + /// <summary> + /// Gets a Color instance with a Unsigned integer parameter. + /// </summary> + /// <param name="argb">Unsigned integer indicates RGBA.</param> + /// <returns>New instance of Color struct.</returns> [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)); } + /// <summary> + /// Gets a Color instance with R,G,B,A parameters. + /// </summary> + /// <param name="r">Red in RGBA.</param> + /// <param name="g">Green in RGBA.</param> + /// <param name="b">Blue in RGBA.</param> + /// <param name="a">Alpha in RGBA.</param> + /// <returns>New instance of Color struct.</returns> public static Color FromRgba(int r, int g, int b, int a) { return new Color(r, g, b, a); } + /// <summary> + /// Gets a Color instance with R,G,B,A parameters. + /// </summary> + /// <param name="r">Red in RGB.</param> + /// <param name="g">Green in RGB.</param> + /// <param name="b">Blue in RGB.</param> + /// <returns>New instance of Color struct.</returns> public static Color FromRgb(int r, int g, int b) { return FromRgba(r, g, b, 255); diff --git a/ElmSharp/ElmSharp/ColorChangedEventArgs.cs b/ElmSharp/ElmSharp/ColorChangedEventArgs.cs index 6ff13e9..b1090de 100644..100755 --- a/ElmSharp/ElmSharp/ColorChangedEventArgs.cs +++ b/ElmSharp/ElmSharp/ColorChangedEventArgs.cs @@ -18,12 +18,28 @@ using System; namespace ElmSharp { + /// <summary> + /// It inherits System.EventArgs. + /// Event ColorChanged of ColorSelector contain ColorChangedEventArgs as a parameter. + /// Refer to <see cref="ColorSelector"/>type. + /// </summary> public class ColorChangedEventArgs : EventArgs { + /// <summary> + /// Gets old color in color changed event. + /// </summary> public Color OldColor { get; private set; } + /// <summary> + /// Gets new color in color changed event. + /// </summary> public Color NewColor { get; private set; } + /// <summary> + /// Creates and initializes a new instance of the ColorChangedEventArgs class. + /// </summary> + /// <param name="oldColor">old color</param> + /// <param name="newColor">new color</param> public ColorChangedEventArgs(Color oldColor, Color newColor) { this.OldColor = oldColor; diff --git a/ElmSharp/ElmSharp/ColorSelector.cs b/ElmSharp/ElmSharp/ColorSelector.cs index 6036ea9..2a40ca1 100644..100755 --- a/ElmSharp/ElmSharp/ColorSelector.cs +++ b/ElmSharp/ElmSharp/ColorSelector.cs @@ -18,22 +18,59 @@ using System; namespace ElmSharp { + /// <summary> + /// Enumeration for mode of ColorSelector + /// </summary> public enum ColorSelectorMode { + /// <summary> + /// Only color palette is displayed, default + /// </summary> Palette, + /// <summary> + /// Only color selector is displayed + /// </summary> Components, + /// <summary> + /// Both Palette and selector is displayed + /// </summary> Both, + /// <summary> + /// Only color picker is displayed + /// </summary> Picker, + /// <summary> + /// This mode is not supported. If you use this, nothing will be shown + /// </summary> Plane, + /// <summary> + /// This mode is not supported. If you use this, it will be shown same with Palette mode + /// </summary> PallettePlane, + /// <summary> + /// This mode is not supported. If you use this, it will be shown same with Palette mode + /// </summary> All } + /// <summary> + /// 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. + /// </summary> + /// <remarks> + /// 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. + /// </remarks> public class ColorSelector : Layout { private readonly SmartEvent<ColorChangedEventArgs> _changed; private Color _currentColor; + /// <summary> + /// Creates and initializes a new instance of the ColorSelector class. + /// </summary> + /// <param name="parent"></param> public ColorSelector(EvasObject parent) : base(parent) { _changed = new SmartEvent<ColorChangedEventArgs>(this, "changed", (data, obj, info) => @@ -42,12 +79,18 @@ namespace ElmSharp }); } + /// <summary> + /// ColorChanged will be triggered when the SelectedColor changed. + /// </summary> public event EventHandler<ColorChangedEventArgs> ColorChanged { add { _changed.On += value; } remove { _changed.On -= value; } } + /// <summary> + /// Gets or sets color of colorselector. + /// </summary> public Color SelectedColor { get @@ -64,6 +107,9 @@ namespace ElmSharp } } + /// <summary> + /// Gets Alpha of a default Color Class. + /// </summary> public override int Opacity { get @@ -77,6 +123,9 @@ namespace ElmSharp } } + /// <summary> + /// Gets or sets Colorselector's mode. + /// </summary> public ColorSelectorMode Mode { get @@ -89,6 +138,9 @@ namespace ElmSharp } } + /// <summary> + /// Get or set current palette's name. + /// </summary> public string PaletteName { get @@ -101,6 +153,11 @@ namespace ElmSharp } } + /// <summary> + /// Adds a new color item to palette. + /// </summary> + /// <param name="color">Color item to add</param> + /// <returns>A new color palette Item.</returns> public ColorSelectorItem AddPaletteColor(Color color) { ColorSelectorItem item = new ColorSelectorItem(); @@ -108,6 +165,9 @@ namespace ElmSharp return item; } + /// <summary> + /// Clear the palette items. + /// </summary> public void ClearPalette() { Interop.Elementary.elm_colorselector_palette_clear(Handle); diff --git a/ElmSharp/ElmSharp/ColorSelectorItem.cs b/ElmSharp/ElmSharp/ColorSelectorItem.cs index 4ee5f7a..10205e2 100644..100755 --- a/ElmSharp/ElmSharp/ColorSelectorItem.cs +++ b/ElmSharp/ElmSharp/ColorSelectorItem.cs @@ -18,12 +18,18 @@ using System; namespace ElmSharp { + /// <summary> + /// A instance to the ColorSelector item added. + /// </summary> public class ColorSelectorItem : ItemObject { internal ColorSelectorItem() : base(IntPtr.Zero) { } + /// <summary> + /// Gets or sets the Palette item's color + /// </summary> public Color Color { get diff --git a/ElmSharp/ElmSharp/Conformant.cs b/ElmSharp/ElmSharp/Conformant.cs index 17bc9c6..84da0e3 100644..100755 --- a/ElmSharp/ElmSharp/Conformant.cs +++ b/ElmSharp/ElmSharp/Conformant.cs @@ -18,8 +18,18 @@ using System; namespace ElmSharp { + /// <summary> + /// 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. + /// </summary> public class Conformant : Widget { + /// <summary> + /// Creates and initializes a new instance of the Conformant class. + /// </summary> + /// <param name="parent">The parent is a given container which will be attached by Conformant + /// as a child.It's <see cref="EvasObject"/> type.</param> public Conformant(Window parent) : base(parent) { Interop.Evas.evas_object_size_hint_weight_set(Handle, 1.0, 1.0); diff --git a/ElmSharp/ElmSharp/Container.cs b/ElmSharp/ElmSharp/Container.cs index b9c4b08..aa73ba2 100644..100755 --- a/ElmSharp/ElmSharp/Container.cs +++ b/ElmSharp/ElmSharp/Container.cs @@ -19,14 +19,28 @@ using System.Collections.Generic; namespace ElmSharp { + /// <summary> + /// It inherits <see cref="Widget"/>. + /// The Container is a abstract class. + /// Other class inherits it to Elementary is about displaying + /// its widgets in a nice layout. + /// </summary> public abstract class Container : Widget { HashSet<EvasObject> _children = new HashSet<EvasObject>(); + /// <summary> + /// Creates and initializes a new instance of class which inherit from Container. + /// </summary> + /// <param name="parent">The parent is a given object which will be attached by Container + /// as a child.It's <see cref="EvasObject"/> type.</param> public Container(EvasObject parent) : base(parent) { } + /// <summary> + /// Sets the background color of a given Container. + /// </summary> public override Color BackgroundColor { set diff --git a/ElmSharp/ElmSharp/ContextPopup.cs b/ElmSharp/ElmSharp/ContextPopup.cs index e812c8c..3be2baa 100644..100755 --- a/ElmSharp/ElmSharp/ContextPopup.cs +++ b/ElmSharp/ElmSharp/ContextPopup.cs @@ -19,21 +19,48 @@ using System.Collections.Generic; namespace ElmSharp { + /// <summary> + /// Enumeration of ContextPopup direction type. + /// </summary> public enum ContextPopupDirection { + /// <summary> + /// ContextPopup show appear below clicked area + /// /// </summary> Down, + /// <summary> + /// ContextPopup show appear to the right of the clicked area + /// </summary> Right, + /// <summary> + /// ContextPopup show appear to the left of the clicked area + /// </summary> Left, + /// <summary> + /// ContextPopup show appear above the clicked area + /// </summary> Up, + /// <summary> + /// ContextPopup does not determine it's direction yet + /// </summary> Unknown } + /// <summary> + /// It inherits <see cref="Layout"/>. + /// The ContextPopup is a widget that when it shown, pops up a list of items. + /// </summary> public class ContextPopup : Layout { HashSet<ContextPopupItem> _children = new HashSet<ContextPopupItem>(); SmartEvent _dismissed; Interop.Evas.SmartCallback _onSelected; + /// <summary> + /// Creates and initializes a new instance of the ContextPopup class. + /// </summary> + /// <param name="parent">The parent is a given container which will be attached by ContextPopup + /// as a child.It's <see cref="EvasObject"/> type.</param> public ContextPopup(EvasObject parent) : base(parent) { _dismissed = new SmartEvent(this, this.RealHandle, "dismissed"); @@ -48,8 +75,20 @@ namespace ElmSharp }; } + /// <summary> + /// Dismissed is raised when the ContextPopup item is dismissed. + /// </summary> + /// <remarks> + /// Outside of ContextPopup was clicked or it's parent area is changed or the language is changed. and then ContextPopup is dismissed. + /// </remarks> public event EventHandler Dismissed; + /// <summary> + /// Gets the current direction of a ContextPopup. + /// </summary> + /// <remarks> + /// Once the ContextPopup showed up, the direction would be determined. + /// </remarks> public ContextPopupDirection Direction { get @@ -58,6 +97,10 @@ namespace ElmSharp } } + /// <summary> + /// Gets or sets the value of current ContextPopup object's orientation. + /// True for horizontal mode, False for vertical mode (or errors) + /// </summary> public bool IsHorizontal { get @@ -70,6 +113,13 @@ namespace ElmSharp } } + /// <summary> + /// Gets or sets whether ContextPopup hide automatically + /// or not when parent of ContextPopup is resized. + /// </summary> + /// <remarks> + /// Default value of AutoHide is False. + /// </remarks> public bool AutoHide { get @@ -82,16 +132,33 @@ namespace ElmSharp } } + /// <summary> + /// Clears all items in the given ContextPopup object. + /// </summary> public void Clear() { Interop.Elementary.elm_ctxpopup_clear(Handle); } + /// <summary> + /// Sets the direction priority of a ContextPopup. + /// </summary> + /// <param name="first">1st priority of direction </param> + /// <param name="second">2nd priority of direction </param> + /// <param name="third">3th priority of direction </param> + /// <param name="fourth">4th priority of direction</param> 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); } + /// <summary> + /// Gets the direction priority of a ContextPopup. + /// </summary> + /// <param name="first">1st priority of direction to be returned</param> + /// <param name="second">2nd priority of direction to be returned</param> + /// <param name="third">2nd priority of direction to be returned </param> + /// <param name="fourth">4th priority of direction to be returned</param> 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; } + /// <summary> + /// Adds a new item to a ContextPopup object with label. + /// </summary> + /// <param name="label">The Label of the new item</param> + /// <returns> + /// A ContextPopupItem added or NULL, on errors + /// </returns> public ContextPopupItem Append(string label) { return Append(label, null); } + /// <summary> + /// Adds a new item to a ContextPopup object with label and icon. + /// </summary> + /// <param name="label">The Label of the new item</param> + /// <param name="icon">Icon to be set on new item</param> + /// <returns>A ContextPopupItem added or NULL, on errors</returns> public ContextPopupItem Append(string label, EvasObject icon) { ContextPopupItem item = new ContextPopupItem(label, icon); @@ -115,16 +195,29 @@ namespace ElmSharp return item; } + /// <summary> + /// Dismiss a ContextPopup object. The ContextPopup will be hidden and the "clicked" signal will be emitted. + /// </summary> public void Dismiss() { Interop.Elementary.elm_ctxpopup_dismiss(RealHandle); } + /// <summary> + /// Gets the possibility that the direction would be available + /// </summary> + /// <param name="direction">A direction user wants to check</param> + /// <returns> + /// Get false if you cannot put it in the direction. Gets true if it's possible. + /// </returns> public bool IsAvailableDirection(ContextPopupDirection direction) { return Interop.Elementary.elm_ctxpopup_direction_available_get(RealHandle, (int)direction); } + /// <summary> + /// Gets Alpha of a default Color Class. + /// </summary> public override int Opacity { get diff --git a/ElmSharp/ElmSharp/ContextPopupItem.cs b/ElmSharp/ElmSharp/ContextPopupItem.cs index 6fcdcb7..35c908b 100644..100755 --- a/ElmSharp/ElmSharp/ContextPopupItem.cs +++ b/ElmSharp/ElmSharp/ContextPopupItem.cs @@ -18,6 +18,10 @@ using System; namespace ElmSharp { + /// <summary> + /// It inherits <see cref="ItemObject"/>. + /// A instance to the ContextPopup item added. + /// </summary> public class ContextPopupItem : ItemObject { internal ContextPopupItem(string text, EvasObject icon) : base(IntPtr.Zero) @@ -26,8 +30,19 @@ namespace ElmSharp Icon = icon; } + /// <summary> + /// Gets the Text property of the given ContextPopupItem. + /// </summary> public string Text { get; internal set; } + + /// <summary> + /// Gets the Icon(type is <see cref="EvasObject"/>) property of the given ContextPopupItem. + /// </summary> public EvasObject Icon { get; internal set; } + + /// <summary> + /// Selected will be triggered when the ContextPopupItem is Selected. + /// </summary> public event EventHandler Selected; internal void SendSelected() diff --git a/ElmSharp/ElmSharp/DateChangedEventArgs.cs b/ElmSharp/ElmSharp/DateChangedEventArgs.cs index c2f7842..25d622c 100644..100755 --- a/ElmSharp/ElmSharp/DateChangedEventArgs.cs +++ b/ElmSharp/ElmSharp/DateChangedEventArgs.cs @@ -18,12 +18,32 @@ using System; namespace ElmSharp { + /// <summary> + /// It inherits System.EventArgs. + /// The DateChanged event in Calendar and DateTimeChanged event in DateTimeSelector. + /// contain DateChangedEventArgs as a parameter. + /// </summary> public class DateChangedEventArgs : EventArgs { + /// <summary> + /// Gets the OldDate property of the given DateChangedEventArgs. + /// </summary> public DateTime OldDate { get; private set; } + /// <summary> + /// Gets the NewDate property of the given DateChangedEventArgs. + /// </summary> public DateTime NewDate { get; private set; } + /// <summary> + /// Creates and initializes a new instance of the DateChangedEventArgs class. + /// </summary> + /// <param name="oldDate"> + /// Old date when DateChanged event or DateTimeChanged event triggered + /// </param> + /// <param name="newDate"> + /// New date when DateChanged event or DateTimeChanged event triggered + /// </param> public DateChangedEventArgs(DateTime oldDate, DateTime newDate) { this.OldDate = oldDate; diff --git a/ElmSharp/ElmSharp/DateTimeSelector.cs b/ElmSharp/ElmSharp/DateTimeSelector.cs index 5aff93a..584c236 100644..100755 --- a/ElmSharp/ElmSharp/DateTimeSelector.cs +++ b/ElmSharp/ElmSharp/DateTimeSelector.cs @@ -18,6 +18,9 @@ using System; namespace ElmSharp { + /// <summary> + /// Enumeration of datetime field types for DateTimeSelector. + /// </summary> public enum DateTimeFieldType { Year, @@ -28,11 +31,22 @@ namespace ElmSharp AmPm } + /// <summary> + /// It inherits <see cref="Layout"/> + /// 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. + /// </summary> public class DateTimeSelector : Layout { SmartEvent _changed; DateTime _cacheDateTime; + /// <summary> + /// Creates and initializes a new instance of the DateTimeSelector class. + /// </summary> + /// <param name="parent">The parent is a given container which will be attached by DateTimeSelector + ///as a child.It's <see cref="EvasObject"/> type.</param> public DateTimeSelector(EvasObject parent) : base(parent) { _changed = new SmartEvent(this, this.RealHandle, "changed"); @@ -44,8 +58,17 @@ namespace ElmSharp }; } + /// <summary> + /// ItemSelected is raised when Datetime field value changed. + /// </summary> public event EventHandler<DateChangedEventArgs> DateTimeChanged; + /// <summary> + /// Gets or sets the datetime format. + /// </summary> + /// <remarks> + /// format is a combination of allowed LIBC date format specifiers like: "%b %d, %Y %I : %M %p". + /// </remarks> public string Format { get @@ -58,6 +81,9 @@ namespace ElmSharp } } + /// <summary> + /// Gets or sets the upper boundary of DateTime field. + /// </summary> public DateTime MaximumDateTime { get @@ -73,6 +99,9 @@ namespace ElmSharp } } + /// <summary> + /// Gets or sets the lower boundary of DateTime field. + /// </summary> public DateTime MinimumDateTime { get @@ -88,6 +117,9 @@ namespace ElmSharp } } + /// <summary> + /// Gets or sets the current value of DateTime field. + /// </summary> public DateTime DateTime { get @@ -104,16 +136,35 @@ namespace ElmSharp } } + /// <summary> + /// Gets whether a field can be visible. + /// </summary> + /// <param name="type">Enumeration <see cref="DateTimeFieldType"/></param> + /// <returns> + /// The field is visible or not. + /// Type is bool.If visible, return true. + /// </returns> public bool IsFieldVisible(DateTimeFieldType type) { return Interop.Elementary.elm_datetime_field_visible_get(RealHandle, (int)type); } + /// <summary> + /// Sets the field limits of a field. + /// </summary> + /// <param name="type">Enumeration <see cref="DateTimeFieldType"/></param> + /// <param name="minimum">minimum limit</param> + /// <param name="maximum">maximum limit</param> public void SetFieldLimit(DateTimeFieldType type, int minimum, int maximum) { Interop.Elementary.elm_datetime_field_limit_set(RealHandle, (int)type, minimum, maximum); } + /// <summary> + /// Gets whether a field can be visible. + /// </summary> + /// <param name="type">Enumeration <see cref="DateTimeFieldType"/></param> + /// <param name="visible">When set as true, the field type visible.</param> public void SetFieldVisible(DateTimeFieldType type, bool visible) { Interop.Elementary.elm_datetime_field_visible_set(RealHandle, (int)type, visible); diff --git a/ElmSharp/ElmSharp/DisplayedMonthChangedEventArgs.cs b/ElmSharp/ElmSharp/DisplayedMonthChangedEventArgs.cs index 85badc3..8407f6d 100644..100755 --- a/ElmSharp/ElmSharp/DisplayedMonthChangedEventArgs.cs +++ b/ElmSharp/ElmSharp/DisplayedMonthChangedEventArgs.cs @@ -18,12 +18,32 @@ using System; namespace ElmSharp { + /// <summary> + /// It inherits System.EventArgs. + /// The DisplayedMonthChangedEvent in Calendar contain + /// DisplayedMonthChangedEventArgs as a parameter. + /// </summary> public class DisplayedMonthChangedEventArgs : EventArgs { + /// <summary> + /// Gets the OldMonth property of the given DisplayedMonthChangedEventArgs. + /// </summary> public int OldMonth { get; private set; } + /// <summary> + /// Gets the NewMonth property of the given DisplayedMonthChangedEventArgs. + /// </summary> public int NewMonth { get; private set; } + /// <summary> + /// Creates and initializes a new instance of the DisplayedMonthChangedEventArgs class. + /// </summary> + /// <param name="oldMonth"> + /// old month of date when DisplayedMonthChangedEvent triggered. + /// </param> + /// <param name="newMonth"> + /// new month of date when DisplayedMonthChangedEvent triggered. + /// </param> public DisplayedMonthChangedEventArgs(int oldMonth, int newMonth) { this.OldMonth = oldMonth; |