namespace ElmSharp
{
+ /// <summary>
+ /// Enumeration for the datetime field types for DateTimeSelector.
+ /// </summary>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public enum DateTimeFieldType
{
+ /// <summary>
+ /// Indicates the Year field.
+ /// </summary>
Year,
+ /// <summary>
+ /// Indicates the Month field.
+ /// </summary>
Month,
+ /// <summary>
+ /// Indicates the Date field.
+ /// </summary>
Date,
+ /// <summary>
+ /// Indicates the Hour field.
+ /// </summary>
Hour,
+ /// <summary>
+ /// Indicates the Minute field.
+ /// </summary>
Minute,
+ /// <summary>
+ /// Indicates the AM/PM field.
+ /// </summary>
AmPm
}
+ /// <summary>
+ /// It inherits <see cref="Layout"/>.
+ /// The DateTimeSelector is a widget to display and input the date & time values.
+ /// This widget displays the date and time as per the system's locale settings
+ /// (Date includes Day, Month & Year) along with the defined separators and time including hour, minute & AM/PM fields. Separator for the AM/PM field is ignored.
+ /// </summary>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
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 the DateTimeSelector
+ /// as a child. It's <see cref="EvasObject"/> type.</param>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public DateTimeSelector(EvasObject parent) : base(parent)
{
- _changed = new SmartEvent(this, this.RealHandle, "changed");
- _changed.On += (s, e) =>
- {
- DateTime newDateTime = DateTime;
- DateTimeChanged?.Invoke(this, new DateChangedEventArgs(_cacheDateTime, newDateTime));
- DateTime = newDateTime;
- };
}
+ /// <summary>
+ /// Creates and initializes a new instance of the DateTimeSelector class.
+ /// </summary>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
+ protected DateTimeSelector() : base()
+ {
+ }
+
+ /// <summary>
+ /// ItemSelected is raised when the DateTime field value is changed.
+ /// </summary>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public event EventHandler<DateChangedEventArgs> DateTimeChanged;
+ /// <summary>
+ /// Gets or sets the datetime format.
+ /// </summary>
+ /// <remarks>
+ /// Format is a combination of the allowed LIBC date format specifiers like: "%b %d, %Y %I : %M %p".
+ /// </remarks>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public string Format
{
get
}
}
+ /// <summary>
+ /// Gets or sets the upper boundary of the DateTime field.
+ /// </summary>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public DateTime MaximumDateTime
{
get
}
}
+ /// <summary>
+ /// Gets or sets the lower boundary of the DateTime field.
+ /// </summary>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public DateTime MinimumDateTime
{
get
}
}
+ /// <summary>
+ /// Gets or sets the current value of the DateTime field.
+ /// </summary>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public DateTime DateTime
{
get
}
}
+ /// <summary>
+ /// Gets whether a field can be visible.
+ /// </summary>
+ /// <param name="type">Enumeration for <see cref="DateTimeFieldType"/>.</param>
+ /// <returns>
+ /// The field is visible or not.
+ /// Type is bool. If visible, return true.
+ /// </returns>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
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 for <see cref="DateTimeFieldType"/>.</param>
+ /// <param name="minimum">The minimum limit.</param>
+ /// <param name="maximum">The maximum limit.</param>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
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 for <see cref="DateTimeFieldType"/>.</param>
+ /// <param name="visible">When set as true, the field type is visible.</param>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
public void SetFieldVisible(DateTimeFieldType type, bool visible)
{
Interop.Elementary.elm_datetime_field_visible_set(RealHandle, (int)type, visible);
}
+ /// <summary>
+ /// The callback of the Realized event.
+ /// </summary>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
+ protected override void OnRealized()
+ {
+ base.OnRealized();
+ _changed = new SmartEvent(this, this.RealHandle, "changed");
+ _changed.On += (s, e) =>
+ {
+ DateTime newDateTime = DateTime;
+ DateTimeChanged?.Invoke(this, new DateChangedEventArgs(_cacheDateTime, newDateTime));
+ DateTime = newDateTime;
+ };
+ }
+
+ /// <summary>
+ /// Creates a widget handle.
+ /// </summary>
+ /// <param name="parent">Parent EvasObject.</param>
+ /// <returns>Handle IntPtr.</returns>
+ /// <since_tizen> preview </since_tizen>
+ [Obsolete("This has been deprecated in API12")]
protected override IntPtr CreateHandle(EvasObject parent)
{
IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);