Remove Picker,DatePicker,TimePicker (#130)
author윤정현/Common Platform Lab(SR)/Staff Engineer/삼성전자 <jh0506.yun@samsung.com>
Thu, 9 Jan 2020 05:42:39 +0000 (14:42 +0900)
committer유리나/Common Platform Lab(SR)/Staff Engineer/삼성전자 <rina6350.you@samsung.com>
Thu, 9 Jan 2020 05:42:39 +0000 (14:42 +0900)
16 files changed:
Xamarin.Forms/Xamarin.Forms.Core/DatePicker.cs [deleted file]
Xamarin.Forms/Xamarin.Forms.Core/Picker.cs [deleted file]
Xamarin.Forms/Xamarin.Forms.Core/TimePicker.cs [deleted file]
Xamarin.Forms/Xamarin.Forms.Platform.Tizen/Forms.cs
Xamarin.Forms/Xamarin.Forms.Platform.Tizen/Native/DateChangedEventArgs.cs [deleted file]
Xamarin.Forms/Xamarin.Forms.Platform.Tizen/Native/DateTimePicker.cs [deleted file]
Xamarin.Forms/Xamarin.Forms.Platform.Tizen/Native/DateTimePickerDialog.cs [deleted file]
Xamarin.Forms/Xamarin.Forms.Platform.Tizen/Native/IDateTimeDialog.cs [deleted file]
Xamarin.Forms/Xamarin.Forms.Platform.Tizen/Native/Watch/WatchDataTimePickerDialog.cs [deleted file]
Xamarin.Forms/Xamarin.Forms.Platform.Tizen/Native/Watch/WatchDateTimePicker.cs [deleted file]
Xamarin.Forms/Xamarin.Forms.Platform.Tizen/Properties/AssemblyInfo.cs
Xamarin.Forms/Xamarin.Forms.Platform.Tizen/Renderers/DatePickerRenderer.cs [deleted file]
Xamarin.Forms/Xamarin.Forms.Platform.Tizen/Renderers/PickerRenderer.cs [deleted file]
Xamarin.Forms/Xamarin.Forms.Platform.Tizen/Renderers/TimePickerRenderer.cs [deleted file]
Xamarin.Forms/Xamarin.Forms.Platform.Tizen/StaticRegistrar.cs
Xamarin.Forms/Xamarin.Forms.Platform/Xamarin.Forms.Platform.cs

diff --git a/Xamarin.Forms/Xamarin.Forms.Core/DatePicker.cs b/Xamarin.Forms/Xamarin.Forms.Core/DatePicker.cs
deleted file mode 100644 (file)
index 1c352db..0000000
+++ /dev/null
@@ -1,173 +0,0 @@
-using System;
-using Xamarin.Forms.Internals;
-using Xamarin.Forms.Platform;
-
-namespace Xamarin.Forms
-{
-       [RenderWith(typeof(_DatePickerRenderer))]
-       public class DatePicker : View, IFontElement, ITextElement, IElementConfiguration<DatePicker>
-       {
-               public static readonly BindableProperty FormatProperty = BindableProperty.Create(nameof(Format), typeof(string), typeof(DatePicker), "d");
-
-               public static readonly BindableProperty DateProperty = BindableProperty.Create(nameof(Date), typeof(DateTime), typeof(DatePicker), default(DateTime), BindingMode.TwoWay,
-                       coerceValue: CoerceDate,
-                       propertyChanged: DatePropertyChanged,
-                       defaultValueCreator: (bindable) => DateTime.Today);
-
-               public static readonly BindableProperty MinimumDateProperty = BindableProperty.Create(nameof(MinimumDate), typeof(DateTime), typeof(DatePicker), new DateTime(1900, 1, 1),
-                       validateValue: ValidateMinimumDate, coerceValue: CoerceMinimumDate);
-
-               public static readonly BindableProperty MaximumDateProperty = BindableProperty.Create(nameof(MaximumDate), typeof(DateTime), typeof(DatePicker), new DateTime(2100, 12, 31),
-                       validateValue: ValidateMaximumDate, coerceValue: CoerceMaximumDate);
-
-               public static readonly BindableProperty TextColorProperty = TextElement.TextColorProperty;
-
-               public static readonly BindableProperty FontFamilyProperty = FontElement.FontFamilyProperty;
-
-               public static readonly BindableProperty FontSizeProperty = FontElement.FontSizeProperty;
-
-               public static readonly BindableProperty FontAttributesProperty = FontElement.FontAttributesProperty;
-
-               readonly Lazy<PlatformConfigurationRegistry<DatePicker>> _platformConfigurationRegistry;
-
-               public DatePicker()
-               {
-                       _platformConfigurationRegistry = new Lazy<PlatformConfigurationRegistry<DatePicker>>(() => new PlatformConfigurationRegistry<DatePicker>(this));
-               }
-
-               public DateTime Date
-               {
-                       get { return (DateTime)GetValue(DateProperty); }
-                       set { SetValue(DateProperty, value); }
-               }
-
-               public string Format
-               {
-                       get { return (string)GetValue(FormatProperty); }
-                       set { SetValue(FormatProperty, value); }
-               }
-
-               public DateTime MaximumDate
-               {
-                       get { return (DateTime)GetValue(MaximumDateProperty); }
-                       set { SetValue(MaximumDateProperty, value); }
-               }
-
-               public DateTime MinimumDate
-               {
-                       get { return (DateTime)GetValue(MinimumDateProperty); }
-                       set { SetValue(MinimumDateProperty, value); }
-               }
-
-               public Color TextColor
-               {
-                       get { return (Color)GetValue(TextElement.TextColorProperty); }
-                       set { SetValue(TextElement.TextColorProperty, value); }
-               }
-
-               public double CharacterSpacing { get; set; }
-
-               public FontAttributes FontAttributes
-               {
-                       get { return (FontAttributes)GetValue(FontAttributesProperty); }
-                       set { SetValue(FontAttributesProperty, value); }
-               }
-
-               public string FontFamily
-               {
-                       get { return (string)GetValue(FontFamilyProperty); }
-                       set { SetValue(FontFamilyProperty, value); }
-               }
-
-               [TypeConverter(typeof(FontSizeConverter))]
-               public double FontSize
-               {
-                       get { return (double)GetValue(FontSizeProperty); }
-                       set { SetValue(FontSizeProperty, value); }
-               }
-
-               void IFontElement.OnFontFamilyChanged(string oldValue, string newValue) =>
-                       InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged);
-
-               void IFontElement.OnFontSizeChanged(double oldValue, double newValue) =>
-                       InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged);
-
-               void IFontElement.OnFontChanged(Font oldValue, Font newValue) =>
-                       InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged);
-
-               double IFontElement.FontSizeDefaultValueCreator() =>
-                       Device.GetNamedSize(NamedSize.Default, (DatePicker)this);
-
-               void IFontElement.OnFontAttributesChanged(FontAttributes oldValue, FontAttributes newValue) =>
-                       InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged);
-
-               public event EventHandler<DateChangedEventArgs> DateSelected;
-
-               static object CoerceDate(BindableObject bindable, object value)
-               {
-                       var picker = (DatePicker)bindable;
-                       DateTime dateValue = ((DateTime)value).Date;
-
-                       if (dateValue > picker.MaximumDate)
-                               dateValue = picker.MaximumDate;
-
-                       if (dateValue < picker.MinimumDate)
-                               dateValue = picker.MinimumDate;
-
-                       return dateValue;
-               }
-
-               static object CoerceMaximumDate(BindableObject bindable, object value)
-               {
-                       DateTime dateValue = ((DateTime)value).Date;
-                       var picker = (DatePicker)bindable;
-                       if (picker.Date > dateValue)
-                               picker.Date = dateValue;
-
-                       return dateValue;
-               }
-
-               static object CoerceMinimumDate(BindableObject bindable, object value)
-               {
-                       DateTime dateValue = ((DateTime)value).Date;
-                       var picker = (DatePicker)bindable;
-                       if (picker.Date < dateValue)
-                               picker.Date = dateValue;
-
-                       return dateValue;
-               }
-
-               static void DatePropertyChanged(BindableObject bindable, object oldValue, object newValue)
-               {
-                       var datePicker = (DatePicker)bindable;
-                       EventHandler<DateChangedEventArgs> selected = datePicker.DateSelected;
-
-                       if (selected != null)
-                               selected(datePicker, new DateChangedEventArgs((DateTime)oldValue, (DateTime)newValue));
-               }
-
-               static bool ValidateMaximumDate(BindableObject bindable, object value)
-               {
-                       return ((DateTime)value).Date >= ((DatePicker)bindable).MinimumDate.Date;
-               }
-
-               static bool ValidateMinimumDate(BindableObject bindable, object value)
-               {
-                       return ((DateTime)value).Date <= ((DatePicker)bindable).MaximumDate.Date;
-               }
-
-               public IPlatformElementConfiguration<T, DatePicker> On<T>() where T : IConfigPlatform
-               {
-                       return _platformConfigurationRegistry.Value.On<T>();
-               }
-
-               void ITextElement.OnTextColorPropertyChanged(Color oldValue, Color newValue)
-               {
-               }
-
-               void ITextElement.OnCharacterSpacingPropertyChanged(double oldValue, double newValue)
-               {
-               }
-
-       }
-}
\ No newline at end of file
diff --git a/Xamarin.Forms/Xamarin.Forms.Core/Picker.cs b/Xamarin.Forms/Xamarin.Forms.Core/Picker.cs
deleted file mode 100644 (file)
index b0f6415..0000000
+++ /dev/null
@@ -1,291 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Collections.Specialized;
-using System.ComponentModel;
-using System.Runtime.CompilerServices;
-using Xamarin.Forms.Internals;
-using Xamarin.Forms.Platform;
-
-namespace Xamarin.Forms
-{
-       [RenderWith(typeof(_PickerRenderer))]
-       public class Picker : View, IFontElement, ITextElement, IElementConfiguration<Picker>
-       {
-               public static readonly BindableProperty TextColorProperty = TextElement.TextColorProperty;
-
-               public static readonly BindableProperty TitleProperty =
-                       BindableProperty.Create(nameof(Title), typeof(string), typeof(Picker), default(string));
-
-               public static readonly BindableProperty TitleColorProperty =
-                       BindableProperty.Create(nameof(TitleColor), typeof(Color), typeof(Picker), default(Color));
-
-               public static readonly BindableProperty SelectedIndexProperty =
-                       BindableProperty.Create(nameof(SelectedIndex), typeof(int), typeof(Picker), -1, BindingMode.TwoWay,
-                                                                       propertyChanged: OnSelectedIndexChanged, coerceValue: CoerceSelectedIndex);
-
-               public static readonly BindableProperty ItemsSourceProperty =
-                       BindableProperty.Create(nameof(ItemsSource), typeof(IList), typeof(Picker), default(IList),
-                                                                       propertyChanged: OnItemsSourceChanged);
-
-               public static readonly BindableProperty SelectedItemProperty =
-                       BindableProperty.Create(nameof(SelectedItem), typeof(object), typeof(Picker), null, BindingMode.TwoWay,
-                                                                       propertyChanged: OnSelectedItemChanged);
-
-               public static readonly BindableProperty FontFamilyProperty = FontElement.FontFamilyProperty;
-
-               public static readonly BindableProperty FontSizeProperty = FontElement.FontSizeProperty;
-
-               public static readonly BindableProperty FontAttributesProperty = FontElement.FontAttributesProperty;
-               
-               readonly Lazy<PlatformConfigurationRegistry<Picker>> _platformConfigurationRegistry;
-
-               public Picker()
-               {
-                       ((INotifyCollectionChanged)Items).CollectionChanged += OnItemsCollectionChanged;
-                       _platformConfigurationRegistry = new Lazy<PlatformConfigurationRegistry<Picker>>(() => new PlatformConfigurationRegistry<Picker>(this));
-               }
-               public FontAttributes FontAttributes
-               {
-                       get { return (FontAttributes)GetValue(FontAttributesProperty); }
-                       set { SetValue(FontAttributesProperty, value); }
-               }
-
-               public string FontFamily
-               {
-                       get { return (string)GetValue(FontFamilyProperty); }
-                       set { SetValue(FontFamilyProperty, value); }
-               }
-
-               [TypeConverter(typeof(FontSizeConverter))]
-               public double FontSize
-               {
-                       get { return (double)GetValue(FontSizeProperty); }
-                       set { SetValue(FontSizeProperty, value); }
-               }
-
-               void IFontElement.OnFontFamilyChanged(string oldValue, string newValue) =>
-                       InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged);
-
-               void IFontElement.OnFontSizeChanged(double oldValue, double newValue) =>
-                       InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged);
-
-               void IFontElement.OnFontChanged(Font oldValue, Font newValue) =>
-                       InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged);
-
-               double IFontElement.FontSizeDefaultValueCreator() =>
-                       Device.GetNamedSize(NamedSize.Default, (Picker)this);
-
-               void IFontElement.OnFontAttributesChanged(FontAttributes oldValue, FontAttributes newValue) =>
-                       InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged);
-
-               public IList<string> Items { get; } = new LockableObservableListWrapper();
-
-               public IList ItemsSource
-               {
-                       get { return (IList)GetValue(ItemsSourceProperty); }
-                       set { SetValue(ItemsSourceProperty, value); }
-               }
-
-               public int SelectedIndex
-               {
-                       get { return (int)GetValue(SelectedIndexProperty); }
-                       set { SetValue(SelectedIndexProperty, value); }
-               }
-
-               public object SelectedItem
-               {
-                       get { return GetValue(SelectedItemProperty); }
-                       set { SetValue(SelectedItemProperty, value); }
-               }
-
-               public Color TextColor
-               {
-                       get { return (Color)GetValue(TextElement.TextColorProperty); }
-                       set { SetValue(TextElement.TextColorProperty, value); }
-               }
-
-               public double CharacterSpacing
-               {
-                       get { return (double)GetValue(TextElement.CharacterSpacingProperty); }
-                       set { SetValue(TextElement.CharacterSpacingProperty, value); }
-               }
-
-               public string Title
-               {
-                       get { return (string)GetValue(TitleProperty); }
-                       set { SetValue(TitleProperty, value); }
-               }
-
-               public Color TitleColor
-               {
-                       get { return (Color)GetValue(TitleColorProperty); }
-                       set { SetValue(TitleColorProperty, value); }
-               }
-
-               BindingBase _itemDisplayBinding;
-               public BindingBase ItemDisplayBinding {
-                       get { return _itemDisplayBinding; }
-                       set {
-                               if (_itemDisplayBinding == value)
-                                       return;
-
-                               OnPropertyChanging();
-                               var oldValue = value;
-                               _itemDisplayBinding = value;
-                               OnItemDisplayBindingChanged(oldValue, _itemDisplayBinding);
-                               OnPropertyChanged();
-                       }
-               }
-
-               public event EventHandler SelectedIndexChanged;
-
-               static readonly BindableProperty s_displayProperty =
-                       BindableProperty.Create("Display", typeof(string), typeof(Picker), default(string));
-
-               string GetDisplayMember(object item)
-               {
-                       if (ItemDisplayBinding == null)
-                               return item.ToString();
-
-                       ItemDisplayBinding.Apply(item, this, s_displayProperty);
-                       ItemDisplayBinding.Unapply();
-                       return (string)GetValue(s_displayProperty);
-               }
-
-               static object CoerceSelectedIndex(BindableObject bindable, object value)
-               {
-                       var picker = (Picker)bindable;
-                       return picker.Items == null ? -1 : ((int)value).Clamp(-1, picker.Items.Count - 1);
-               }
-
-               void OnItemDisplayBindingChanged(BindingBase oldValue, BindingBase newValue)
-               {
-                       ResetItems();
-               }
-
-               void OnItemsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
-               {
-                       var oldIndex = SelectedIndex;
-                       var newIndex = SelectedIndex = SelectedIndex.Clamp(-1, Items.Count - 1);
-                       // If the index has not changed, still need to change the selected item
-                       if (newIndex == oldIndex)
-                               UpdateSelectedItem(newIndex);
-               }
-
-               static void OnItemsSourceChanged(BindableObject bindable, object oldValue, object newValue)
-               {
-                       ((Picker)bindable).OnItemsSourceChanged((IList)oldValue, (IList)newValue);
-               }
-
-               void OnItemsSourceChanged(IList oldValue, IList newValue)
-               { 
-                       var oldObservable = oldValue as INotifyCollectionChanged;
-                       if (oldObservable != null)
-                               oldObservable.CollectionChanged -= CollectionChanged;
-
-                       var newObservable = newValue as INotifyCollectionChanged;
-                       if (newObservable != null) {
-                               newObservable.CollectionChanged += CollectionChanged;
-                       }
-
-                       if (newValue != null) {
-                               ((LockableObservableListWrapper)Items).IsLocked = true;
-                               ResetItems();
-                       } else {
-                               ((LockableObservableListWrapper)Items).InternalClear();
-                               ((LockableObservableListWrapper)Items).IsLocked = false;
-                       }
-               }
-
-               void CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
-               {
-                       switch (e.Action) {
-                       case NotifyCollectionChangedAction.Add:
-                               AddItems(e);
-                               break;
-                       case NotifyCollectionChangedAction.Remove:
-                               RemoveItems(e);
-                               break;
-                       default: //Move, Replace, Reset
-                               ResetItems();
-                               break;
-                       }
-               }
-               void AddItems(NotifyCollectionChangedEventArgs e)
-               {
-                       int index = e.NewStartingIndex < 0 ? Items.Count : e.NewStartingIndex;
-                       foreach (object newItem in e.NewItems)
-                               ((LockableObservableListWrapper)Items).InternalInsert(index++, GetDisplayMember(newItem));
-               }
-
-               void RemoveItems(NotifyCollectionChangedEventArgs e)
-               {
-                       int index = e.OldStartingIndex < Items.Count ? e.OldStartingIndex : Items.Count;
-                       foreach (object _ in e.OldItems)
-                               ((LockableObservableListWrapper)Items).InternalRemoveAt(index--);
-               }
-
-               void ResetItems()
-               {
-                       if (ItemsSource == null)
-                               return;
-                       ((LockableObservableListWrapper)Items).InternalClear();
-                       foreach (object item in ItemsSource)
-                               ((LockableObservableListWrapper)Items).InternalAdd(GetDisplayMember(item));
-                       UpdateSelectedItem(SelectedIndex);
-               }
-
-               static void OnSelectedIndexChanged(object bindable, object oldValue, object newValue)
-               {
-                       var picker = (Picker)bindable;
-                       picker.UpdateSelectedItem(picker.SelectedIndex);
-                       picker.SelectedIndexChanged?.Invoke(bindable, EventArgs.Empty);
-               }
-
-               static void OnSelectedItemChanged(BindableObject bindable, object oldValue, object newValue)
-               {
-                       var picker = (Picker)bindable;
-                       picker.UpdateSelectedIndex(newValue);
-               }
-
-               void UpdateSelectedIndex(object selectedItem)
-               {
-                       if (ItemsSource != null) {
-                               SelectedIndex = ItemsSource.IndexOf(selectedItem);
-                               return;
-                       }
-                       SelectedIndex = Items.IndexOf(selectedItem);
-               }
-
-               void UpdateSelectedItem(int index)
-               {
-                       if (index == -1) {
-                               SelectedItem = null;
-                               return;
-                       }
-
-                       if (ItemsSource != null) {
-                               SelectedItem = ItemsSource [index];
-                               return;
-                       }
-
-                       SelectedItem = Items [index];
-               }
-
-               public IPlatformElementConfiguration<T, Picker> On<T>() where T : IConfigPlatform
-               {
-                       return _platformConfigurationRegistry.Value.On<T>();
-               }
-
-               void ITextElement.OnTextColorPropertyChanged(Color oldValue, Color newValue)
-               {
-               }
-
-               void ITextElement.OnCharacterSpacingPropertyChanged(double oldValue, double newValue)
-               {
-               }
-
-       }
-}
\ No newline at end of file
diff --git a/Xamarin.Forms/Xamarin.Forms.Core/TimePicker.cs b/Xamarin.Forms/Xamarin.Forms.Core/TimePicker.cs
deleted file mode 100644 (file)
index 90a0d17..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-using System;
-using Xamarin.Forms.Internals;
-using Xamarin.Forms.Platform;
-
-namespace Xamarin.Forms
-{
-       [RenderWith(typeof(_TimePickerRenderer))]
-       public class TimePicker : View, IFontElement, ITextElement, IElementConfiguration<TimePicker>
-       {
-               public static readonly BindableProperty FormatProperty = BindableProperty.Create(nameof(Format), typeof(string), typeof(TimePicker), "t");
-
-               public static readonly BindableProperty TextColorProperty = TextElement.TextColorProperty;
-
-               public static readonly BindableProperty TimeProperty = BindableProperty.Create(nameof(Time), typeof(TimeSpan), typeof(TimePicker), new TimeSpan(0), BindingMode.TwoWay, (bindable, value) =>
-               {
-                       var time = (TimeSpan)value;
-                       return time.TotalHours < 24 && time.TotalMilliseconds >= 0;
-               });
-
-               public static readonly BindableProperty FontFamilyProperty = FontElement.FontFamilyProperty;
-
-               public static readonly BindableProperty FontSizeProperty = FontElement.FontSizeProperty;
-
-               public static readonly BindableProperty FontAttributesProperty = FontElement.FontAttributesProperty;
-
-               readonly Lazy<PlatformConfigurationRegistry<TimePicker>> _platformConfigurationRegistry;
-
-               public TimePicker()
-               {
-                       _platformConfigurationRegistry = new Lazy<PlatformConfigurationRegistry<TimePicker>>(() => new PlatformConfigurationRegistry<TimePicker>(this));
-               }
-
-               public string Format
-               {
-                       get { return (string)GetValue(FormatProperty); }
-                       set { SetValue(FormatProperty, value); }
-               }
-
-               public Color TextColor
-               {
-                       get { return (Color)GetValue(TextElement.TextColorProperty); }
-                       set { SetValue(TextElement.TextColorProperty, value); }
-               }
-
-               public double CharacterSpacing { get; set; }
-
-               public TimeSpan Time
-               {
-                       get { return (TimeSpan)GetValue(TimeProperty); }
-                       set { SetValue(TimeProperty, value); }
-               }
-
-               public FontAttributes FontAttributes
-               {
-                       get { return (FontAttributes)GetValue(FontAttributesProperty); }
-                       set { SetValue(FontAttributesProperty, value); }
-               }
-
-               public string FontFamily
-               {
-                       get { return (string)GetValue(FontFamilyProperty); }
-                       set { SetValue(FontFamilyProperty, value); }
-               }
-
-               [TypeConverter(typeof(FontSizeConverter))]
-               public double FontSize
-               {
-                       get { return (double)GetValue(FontSizeProperty); }
-                       set { SetValue(FontSizeProperty, value); }
-               }
-
-               void IFontElement.OnFontFamilyChanged(string oldValue, string newValue) =>
-                       InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged);
-
-               void IFontElement.OnFontSizeChanged(double oldValue, double newValue) =>
-                       InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged);
-
-               void IFontElement.OnFontChanged(Font oldValue, Font newValue) =>
-                       InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged);
-
-               double IFontElement.FontSizeDefaultValueCreator() =>
-                       Device.GetNamedSize(NamedSize.Default, (TimePicker)this);
-
-               void IFontElement.OnFontAttributesChanged(FontAttributes oldValue, FontAttributes newValue) =>
-                       InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged);
-
-               public IPlatformElementConfiguration<T, TimePicker> On<T>() where T : IConfigPlatform
-               {
-                       return _platformConfigurationRegistry.Value.On<T>();
-               }
-
-               void ITextElement.OnTextColorPropertyChanged(Color oldValue, Color newValue)
-               {
-               }
-
-               void ITextElement.OnCharacterSpacingPropertyChanged(double oldValue, double newValue)
-               {
-               }
-
-       }
-}
\ No newline at end of file
index 141e5cf..d6dac3d 100644 (file)
@@ -701,8 +701,6 @@ namespace Xamarin.Forms
                                typeof(Slider),
                                typeof(Stepper),
                                typeof(Switch),
-                               typeof(DatePicker),
-                               typeof(TimePicker),
                                typeof(Entry),
                                typeof(Editor),
                                typeof(ActivityIndicator),
@@ -710,7 +708,6 @@ namespace Xamarin.Forms
                                typeof(CarouselView),
                                typeof(CollectionView),
                                typeof(ListView),
-                               typeof(Picker),
                                typeof(TableView),
                                typeof(TextCell),
                                typeof(ImageCell),
diff --git a/Xamarin.Forms/Xamarin.Forms.Platform.Tizen/Native/DateChangedEventArgs.cs b/Xamarin.Forms/Xamarin.Forms.Platform.Tizen/Native/DateChangedEventArgs.cs
deleted file mode 100644 (file)
index 6144a7d..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-using System;
-
-namespace Xamarin.Forms.Platform.Tizen.Native
-{
-       /// <summary>
-       /// Event arguments for <see cref="DatePicker.DateChanged"/> event.
-       /// </summary>
-       public class DateChangedEventArgs : EventArgs
-       {
-               /// <summary>
-               /// The date that the user entered.
-               /// </summary>
-               public DateTime NewDate { get; }
-
-               /// <summary>
-               /// Creates a new <see cref="DateChangedEventArgs"/> object that represents a change from <paramref name="oldDate"/> to <paramref name="newDate"/>.
-               /// </summary>
-               /// <param name="oldDate">Old date of <see cref="DatePicker"/>.</param>
-               /// <param name="newDate">Current date of <see cref="DatePicker"/>.</param>
-               public DateChangedEventArgs(DateTime newDate)
-               {
-                       NewDate = newDate;
-               }
-       }
-}
diff --git a/Xamarin.Forms/Xamarin.Forms.Platform.Tizen/Native/DateTimePicker.cs b/Xamarin.Forms/Xamarin.Forms.Platform.Tizen/Native/DateTimePicker.cs
deleted file mode 100644 (file)
index c6c17ff..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-using System;
-using ElmSharp;
-
-namespace Xamarin.Forms.Platform.Tizen.Native
-{
-       public enum DateTimePickerMode
-       {
-               Date,
-               Time
-       }
-
-       public class DateTimePicker : DateTimeSelector
-       {
-               const string TimeFormat = "%d/%b/%Y %I:%M %p";
-               const string TimeLayoutStyle = "time_layout";
-
-               const string DateFormat = "%d/%b/%Y";
-               const string DateLayoutStyle = "date_layout";
-
-               DateTimePickerMode _mode = DateTimePickerMode.Date;
-
-               public DateTimePicker(EvasObject parent) : base(parent)
-               {
-                       UpdateMode();
-               }
-
-               protected DateTimePicker() : base()
-               {
-               }
-
-               public DateTimePickerMode Mode
-               {
-                       get { return _mode; }
-                       set
-                       {
-                               if (_mode != value)
-                               {
-                                       _mode = value;
-                                       UpdateMode();
-                               }
-                       }
-               }
-
-               public TimeSpan Time
-               {
-                       get
-                       {
-                               return DateTime.TimeOfDay;
-                       }
-                       set
-                       {
-                               DateTime -= DateTime.TimeOfDay;
-                               DateTime += value;
-                       }
-               }
-
-               protected virtual void UpdateMode()
-               {
-                       if (Mode == DateTimePickerMode.Date)
-                       {
-                               Style = DateLayoutStyle;
-                               Format = DateFormat;
-                       }
-                       else
-                       {
-                               Style = TimeLayoutStyle;
-                               Format = TimeFormat;
-                       }
-               }
-       }
-}
diff --git a/Xamarin.Forms/Xamarin.Forms.Platform.Tizen/Native/DateTimePickerDialog.cs b/Xamarin.Forms/Xamarin.Forms.Platform.Tizen/Native/DateTimePickerDialog.cs
deleted file mode 100644 (file)
index befeed9..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-using System;
-using ElmSharp;
-using EButton = ElmSharp.Button;
-
-namespace Xamarin.Forms.Platform.Tizen.Native
-{
-       public class DateTimePickerDialog : Dialog, IDateTimeDialog
-       {
-               EvasObject _parent;
-               /// <summary>
-               /// Creates a dialog window.
-               /// </summary>
-               public DateTimePickerDialog(EvasObject parent) : base(parent)
-               {
-                       _parent = parent;
-                       Initialize();
-               }
-
-               public DateTimePicker Picker { get; protected set; }
-
-               /// <summary>
-               /// Occurs when the date of this dialog has changed.
-               /// </summary>
-               public event EventHandler<DateChangedEventArgs> DateTimeChanged;
-
-               protected virtual DateTimePicker CreatePicker(EvasObject parent)
-               {
-                       return new DateTimePicker(parent);
-               }
-
-               void Initialize()
-               {
-                       Picker = CreatePicker(_parent);
-                       Picker.Show();
-                       Content = Picker;
-
-                       //TODO need to add internationalization support
-                       PositiveButton = new EButton(_parent) { Text = "Set" };
-                       PositiveButton.Clicked += (s, e) =>
-                       {
-                               Confirm();
-                       };
-
-                       //TODO need to add internationalization support
-                       NegativeButton = new EButton(_parent) { Text = "Cancel" };
-                       NegativeButton.Clicked += (s, e) =>
-                       {
-                               Hide();
-                       };
-                       BackButtonPressed += (object s, EventArgs e) =>
-                       {
-                               Hide();
-                       };
-
-                       // TODO This is Tizen TV Limitation.
-                       // UX is defined and the focus move processing is complete, it should be removed(After Tizen 5.0)
-                       if (Device.Idiom == TargetIdiom.TV)
-                       {
-                               KeyDown += (s, e) =>
-                               {
-                                       if (e.KeyName == "Return")
-                                       {
-                                               if (Picker != null && Picker.IsFocused)
-                                               {
-                                                       Confirm();
-                                                       e.Flags |= EvasEventFlag.OnHold;
-                                               }
-                                       }
-                               };
-                       }
-               }
-
-               void Confirm()
-               {
-                       DateTimeChanged?.Invoke(this, new DateChangedEventArgs(Picker.DateTime));
-                       Hide();
-               }
-       }
-}
diff --git a/Xamarin.Forms/Xamarin.Forms.Platform.Tizen/Native/IDateTimeDialog.cs b/Xamarin.Forms/Xamarin.Forms.Platform.Tizen/Native/IDateTimeDialog.cs
deleted file mode 100644 (file)
index 0281f2b..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using ElmSharp;
-
-namespace Xamarin.Forms.Platform.Tizen.Native
-{
-       public interface IDateTimeDialog
-       {
-               string Title { get; set; }
-               DateTimePicker Picker { get; }
-               event EventHandler<DateChangedEventArgs> DateTimeChanged;
-               void Show();
-               void Hide();
-               void Unrealize();
-       }
-}
diff --git a/Xamarin.Forms/Xamarin.Forms.Platform.Tizen/Native/Watch/WatchDataTimePickerDialog.cs b/Xamarin.Forms/Xamarin.Forms.Platform.Tizen/Native/Watch/WatchDataTimePickerDialog.cs
deleted file mode 100644 (file)
index cc4dc42..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-using System;
-using ElmSharp;
-using ElmSharp.Wearable;
-using ELayout = ElmSharp.Layout;
-using EButton = ElmSharp.Button;
-
-namespace Xamarin.Forms.Platform.Tizen.Native.Watch
-{
-       public class WatchDataTimePickerDialog : Popup, IDateTimeDialog
-       {
-               ELayout _surfaceLayout;
-               ELayout _datetimeLayout;
-               CircleSurface _surface;
-               EButton _doneButton;
-               Box _container;
-               string _title;
-
-               public WatchDataTimePickerDialog(EvasObject parent) : base(parent)
-               {
-                       AlignmentX = -1;
-                       AlignmentY = -1;
-                       WeightX = 1.0;
-                       WeightY = 1.0;
-                       Style = "circle";
-
-                       _container = new Box(parent) { AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1 };
-                       _container.BackgroundColor = ElmSharp.Color.Blue;
-                       _container.SetLayoutCallback(OnContainerLayout);
-
-                       _datetimeLayout = new ELayout(parent);
-                       _surfaceLayout = new ELayout(parent);
-
-                       _container.PackEnd(_datetimeLayout);
-                       _container.PackEnd(_surfaceLayout);
-
-                       _datetimeLayout.SetTheme("layout", "circle", "datetime");
-                       _surface = new CircleSurface(_surfaceLayout);
-
-                       WatchPicker = new WatchDateTimePicker(parent, _surface);
-                       WatchPicker.Show();
-                       _datetimeLayout.SetContent(WatchPicker);
-
-                       _doneButton = new Button(parent)
-                       {
-                               Text = "Set",
-                               Style = "bottom",
-                       };
-                       _datetimeLayout.SetPartContent("elm.swallow.btn", _doneButton);
-                       _doneButton.Clicked += OnDoneClicked;
-
-                       ((IRotaryActionWidget)WatchPicker.CircleSelector).Activate();
-
-                       _datetimeLayout.Show();
-                       _surfaceLayout.Show();
-                       _container.Show();
-
-                       SetContent(_container);
-                       BackButtonPressed += OnBackButtonPressed;
-               }
-
-               public string Title
-               {
-                       get => _title;
-                       set
-                       {
-                               _title = value;
-                               _datetimeLayout.SetPartText("elm.text", _title);
-                       }
-               }
-
-               public DateTimePicker Picker => WatchPicker;
-               protected WatchDateTimePicker WatchPicker { get; }
-
-               public event EventHandler<DateChangedEventArgs> DateTimeChanged;
-
-               void OnContainerLayout()
-               {
-                       _surfaceLayout.Geometry = _container.Geometry;
-                       _datetimeLayout.Geometry = _container.Geometry;
-               }
-
-               void OnDoneClicked(object sender, EventArgs e)
-               {
-                       System.Console.WriteLine("Done clicked");
-                       System.Console.WriteLine("Picker.DateTime - {0} ", Picker.DateTime);
-                       DateTimeChanged?.Invoke(this, new DateChangedEventArgs(Picker.DateTime));
-                       Hide();
-               }
-
-               void OnBackButtonPressed(object sender, EventArgs e)
-               {
-                       Hide();
-               }
-       }
-}
diff --git a/Xamarin.Forms/Xamarin.Forms.Platform.Tizen/Native/Watch/WatchDateTimePicker.cs b/Xamarin.Forms/Xamarin.Forms.Platform.Tizen/Native/Watch/WatchDateTimePicker.cs
deleted file mode 100644 (file)
index aa9f989..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-using System;
-using ElmSharp;
-using ElmSharp.Wearable;
-
-namespace Xamarin.Forms.Platform.Tizen.Native.Watch
-{
-       public class WatchDateTimePicker : DateTimePicker
-       {
-               readonly CircleSurface _surface;
-               public WatchDateTimePicker(EvasObject parent, CircleSurface surface) : base()
-               {
-                       _surface = surface;
-                       Realize(parent);
-                       UpdateMode();
-               }
-
-               public CircleDateTimeSelector CircleSelector { get; private set; }
-
-               protected override void UpdateMode()
-               {
-                       if (Mode == DateTimePickerMode.Date)
-                       {
-                               Style = "datepicker/circle";
-                       }
-                       else
-                       {
-                               Style = "timepicker/circle";
-                       }
-               }
-
-               protected override IntPtr CreateHandle(EvasObject parent)
-               {
-                       CircleSelector = new CircleDateTimeSelector(parent, _surface);
-                       if (CircleSelector.RealHandle != CircleSelector.Handle)
-                       {
-                               RealHandle = CircleSelector.RealHandle;
-                       }
-                       return CircleSelector.Handle;
-               }
-       }
-}
index 558ff4b..390c509 100644 (file)
@@ -18,11 +18,8 @@ using Xamarin.Forms.Platform.Tizen;
 [assembly: ExportRenderer(typeof(Button), typeof(ButtonRenderer))]
 [assembly: ExportRenderer(typeof(Image), typeof(ImageRenderer))]
 [assembly: ExportRenderer(typeof(Slider), typeof(SliderRenderer))]
-[assembly: ExportRenderer(typeof(Picker), typeof(PickerRenderer))]
 [assembly: ExportRenderer(typeof(Frame), typeof(FrameRenderer))]
 [assembly: ExportRenderer(typeof(Stepper), typeof(StepperRenderer))]
-[assembly: ExportRenderer(typeof(DatePicker), typeof(DatePickerRenderer))]
-[assembly: ExportRenderer(typeof(TimePicker), typeof(TimePickerRenderer))]
 [assembly: ExportRenderer(typeof(ProgressBar), typeof(ProgressBarRenderer))]
 [assembly: ExportRenderer(typeof(Switch), typeof(SwitchRenderer))]
 [assembly: ExportRenderer(typeof(ListView), typeof(ListViewRenderer))]
diff --git a/Xamarin.Forms/Xamarin.Forms.Platform.Tizen/Renderers/DatePickerRenderer.cs b/Xamarin.Forms/Xamarin.Forms.Platform.Tizen/Renderers/DatePickerRenderer.cs
deleted file mode 100644 (file)
index b374c6d..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-using System;
-using Xamarin.Forms.Platform.Tizen.Native;
-using WatchDataTimePickerDialog = Xamarin.Forms.Platform.Tizen.Native.Watch.WatchDataTimePickerDialog;
-
-namespace Xamarin.Forms.Platform.Tizen
-{
-       public class DatePickerRenderer : ViewRenderer<DatePicker, EditfieldEntry>
-       {
-               //TODO need to add internationalization support
-               const string DialogTitle = "Choose Date";
-               Lazy<IDateTimeDialog> _lazyDialog;
-
-               public DatePickerRenderer()
-               {
-                       RegisterPropertyHandler(DatePicker.DateProperty, UpdateDate);
-                       RegisterPropertyHandler(DatePicker.FormatProperty, UpdateDate);
-                       RegisterPropertyHandler(DatePicker.TextColorProperty, UpdateTextColor);
-                       RegisterPropertyHandler(DatePicker.FontAttributesProperty, UpdateFontAttributes);
-                       RegisterPropertyHandler(DatePicker.FontFamilyProperty, UpdateFontFamily);
-                       RegisterPropertyHandler(DatePicker.FontSizeProperty, UpdateFontSize);
-               }
-
-               protected virtual IDateTimeDialog CreateDialog()
-               {
-                       if (Device.Idiom == TargetIdiom.Watch)
-                       {
-                               return new WatchDataTimePickerDialog(Forms.NativeParent);
-                       }
-                       else
-                       {
-                               return new DateTimePickerDialog(Forms.NativeParent);
-                       }
-               }
-
-               protected override void OnElementChanged(ElementChangedEventArgs<DatePicker> e)
-               {
-                       if (Control == null)
-                       {
-                               var entry = new Native.EditfieldEntry(Forms.NativeParent)
-                               {
-                                       IsSingleLine = true,
-                                       HorizontalTextAlignment = Native.TextAlignment.Center,
-                                       InputPanelShowByOnDemand = true,
-                               };
-                               entry.SetVerticalTextAlignment("elm.text", 0.5);
-                               entry.TextBlockFocused += OnTextBlockFocused;
-                               SetNativeControl(entry);
-
-                               _lazyDialog = new Lazy<IDateTimeDialog>(() =>
-                               {
-                                       var dialog = CreateDialog();
-                                       dialog.Title = DialogTitle;
-                                       dialog.DateTimeChanged += OnDateTimeChanged;
-                                       return dialog;
-                               });
-                       }
-                       base.OnElementChanged(e);
-               }
-
-               protected override Size MinimumSize()
-               {
-                       return Control.Measure(Control.MinimumWidth, Control.MinimumHeight).ToDP();
-               }
-
-               protected override void Dispose(bool disposing)
-               {
-                       if (disposing)
-                       {
-                               if (Control != null)
-                               {
-                                       Control.TextBlockFocused -= OnTextBlockFocused;
-                               }
-                               if (_lazyDialog.IsValueCreated)
-                               {
-                                       _lazyDialog.Value.DateTimeChanged -= OnDateTimeChanged;
-                                       _lazyDialog.Value.Unrealize();
-                               }
-                       }
-                       base.Dispose(disposing);
-               }
-
-               void OnTextBlockFocused(object sender, EventArgs e)
-               {
-                       // For EFL Entry, the event will occur even if it is currently disabled.
-                       // If the problem is resolved, no conditional statement is required.
-                       if (Element.IsEnabled)
-                       {
-                               var dialog = _lazyDialog.Value;
-                               dialog.Picker.DateTime = Element.Date;
-                               dialog.Picker.MaximumDateTime = Element.MaximumDate;
-                               dialog.Picker.MinimumDateTime = Element.MinimumDate;
-                               // You need to call Show() after ui thread occupation because of EFL problem.
-                               // Otherwise, the content of the popup will not receive focus.
-                               Device.BeginInvokeOnMainThread(() => dialog.Show());
-                       }
-               }
-
-               void OnDateTimeChanged(object sender, Native.DateChangedEventArgs dcea)
-               {
-                       Element.Date = dcea.NewDate;
-                       Control.Text = dcea.NewDate.ToString(Element.Format);
-               }
-
-               void UpdateDate()
-               {
-                       Control.Text = Element.Date.ToString(Element.Format);
-               }
-
-               void UpdateTextColor()
-               {
-                       Control.TextColor = Element.TextColor.ToNative();
-               }
-
-               void UpdateFontSize()
-               {
-                       Control.FontSize = Element.FontSize;
-               }
-
-               void UpdateFontFamily()
-               {
-                       Control.FontFamily = Element.FontFamily;
-               }
-
-               void UpdateFontAttributes()
-               {
-                       Control.FontAttributes = Element.FontAttributes;
-               }
-       }
-}
diff --git a/Xamarin.Forms/Xamarin.Forms.Platform.Tizen/Renderers/PickerRenderer.cs b/Xamarin.Forms/Xamarin.Forms.Platform.Tizen/Renderers/PickerRenderer.cs
deleted file mode 100644 (file)
index abfc0c2..0000000
+++ /dev/null
@@ -1,185 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Xamarin.Forms.Platform.Tizen.Native;
-using Xamarin.Forms.Platform.Tizen.Native.Watch;
-using ElmSharp;
-
-namespace Xamarin.Forms.Platform.Tizen
-{
-       public class PickerRenderer : ViewRenderer<Picker, EditfieldEntry>
-       {
-               List _list;
-               Dialog _dialog;
-               Dictionary<ListItem, int> _itemToItemNumber = new Dictionary<ListItem, int>();
-
-               public PickerRenderer()
-               {
-                       RegisterPropertyHandler(Picker.SelectedIndexProperty, UpdateSelectedIndex);
-                       RegisterPropertyHandler(Picker.TextColorProperty, UpdateTextColor);
-                       RegisterPropertyHandler(Picker.FontSizeProperty, UpdateFontSize);
-                       RegisterPropertyHandler(Picker.FontFamilyProperty, UpdateFontFamily);
-                       RegisterPropertyHandler(Picker.FontAttributesProperty, UpdateFontAttributes);
-                       RegisterPropertyHandler(Picker.TitleProperty, UpdateTitle);
-                       RegisterPropertyHandler(Picker.TitleColorProperty, UpdateTitleColor);
-               }
-
-               protected override void Dispose(bool disposing)
-               {
-                       if (disposing)
-                       {
-                               if (Control != null)
-                               {
-                                       Control.TextBlockFocused -= OnTextBlockFocused;
-                                       if (Device.Idiom == TargetIdiom.TV)
-                                       {
-                                               Control.LayoutFocused -= OnLayoutFocused;
-                                               Control.LayoutUnfocused -= OnLayoutUnfocused;
-                                       }
-                                       CleanView();
-                               }
-                       }
-                       base.Dispose(disposing);
-               }
-
-               protected override void OnElementChanged(ElementChangedEventArgs<Picker> e)
-               {
-                       if (Control == null)
-                       {
-                               var entry = new EditfieldEntry(Forms.NativeParent)
-                               {
-                                       IsSingleLine = true,
-                                       InputPanelShowByOnDemand = true,
-                               };
-                               entry.SetVerticalTextAlignment("elm.text", 0.5);
-                               entry.HorizontalTextAlignment = Native.TextAlignment.Center;
-                               entry.TextBlockFocused += OnTextBlockFocused;
-
-                               if (Device.Idiom == TargetIdiom.TV)
-                               {
-                                       entry.LayoutFocused += OnLayoutFocused;
-                                       entry.LayoutUnfocused += OnLayoutUnfocused;
-                               }
-
-                               SetNativeControl(entry);
-                       }
-                       base.OnElementChanged(e);
-               }
-
-               void UpdateSelectedIndex()
-               {
-                       Control.Text = (Element.SelectedIndex == -1 || Element.Items == null ?
-                               "" : Element.Items[Element.SelectedIndex]);
-               }
-
-               void UpdateTextColor()
-               {
-                       Control.TextColor = Element.TextColor.ToNative();
-               }
-
-               void UpdateFontSize()
-               {
-                       Control.FontSize = Element.FontSize;
-               }
-
-               void UpdateFontFamily()
-               {
-                       Control.FontFamily = Element.FontFamily;
-               }
-
-               void UpdateFontAttributes()
-               {
-                       Control.FontAttributes = Element.FontAttributes;
-               }
-
-               void UpdateTitle()
-               {
-                       Control.Placeholder = Element.Title;
-               }
-
-               void UpdateTitleColor()
-               {
-                       Control.PlaceholderColor = Element.TitleColor.ToNative();
-               }
-
-               void OnLayoutFocused(object sender, EventArgs e)
-               {
-                       Control.FontSize = Control.FontSize * 1.5;
-               }
-
-               void OnLayoutUnfocused(object sender, EventArgs e)
-               {
-                       Control.FontSize = Control.FontSize / 1.5;
-               }
-
-               void OnTextBlockFocused(object sender, EventArgs e)
-               {
-                       // For EFL Entry, the event will occur even if it is currently disabled.
-                       // If the problem is resolved, no conditional statement is required.
-                       if (Element.IsEnabled)
-                       {
-                               int i = 0;
-                               if (Device.Idiom == TargetIdiom.Watch)
-                               {
-                                       _dialog = new WatchDialog(Forms.NativeParent, false);
-                               }
-                               else
-                               {
-                                       _dialog = new Dialog(Forms.NativeParent);
-                               }
-                               _dialog.AlignmentX = -1;
-                               _dialog.AlignmentY = -1;
-                               _dialog.Title = Element.Title;
-                               _dialog.TitleColor = Element.TitleColor.ToNative();
-                               _dialog.Dismissed += OnDialogDismissed;
-                               _dialog.BackButtonPressed += (object senders, EventArgs es) =>
-                               {
-                                       _dialog.Dismiss();
-                               };
-
-                               _list = new List(_dialog);
-                               foreach (var s in Element.Items)
-                               {
-                                       ListItem item = _list.Append(s);
-                                       _itemToItemNumber[item] = i;
-                                       i++;
-                               }
-                               _list.ItemSelected += OnItemSelected;
-                               _dialog.Content = _list;
-
-                               // You need to call Show() after ui thread occupation because of EFL problem.
-                               // Otherwise, the content of the popup will not receive focus.
-                               Device.BeginInvokeOnMainThread(() =>
-                               {
-                                       _dialog.Show();
-                                       _list.Show();
-                               });
-                       }
-               }
-
-               void OnItemSelected(object senderObject, EventArgs ev)
-               {
-                       Element.SetValueFromRenderer(Picker.SelectedIndexProperty, _itemToItemNumber[(senderObject as List).SelectedItem]);
-                       _dialog.Dismiss();
-               }
-
-               void OnDialogDismissed(object sender, EventArgs e)
-               {
-                       CleanView();
-               }
-
-               void CleanView()
-               {
-                       if (null != _list)
-                       {
-                               _list.Unrealize();
-                               _itemToItemNumber.Clear();
-                               _list = null;
-                       }
-                       if (null != _dialog)
-                       {
-                               _dialog.Unrealize();
-                               _dialog = null;
-                       }
-               }
-       }
-}
diff --git a/Xamarin.Forms/Xamarin.Forms.Platform.Tizen/Renderers/TimePickerRenderer.cs b/Xamarin.Forms/Xamarin.Forms.Platform.Tizen/Renderers/TimePickerRenderer.cs
deleted file mode 100644 (file)
index 35c91d2..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-using System;
-using System.Globalization;
-using Xamarin.Forms.Platform.Tizen.Native;
-using WatchDataTimePickerDialog = Xamarin.Forms.Platform.Tizen.Native.Watch.WatchDataTimePickerDialog;
-
-namespace Xamarin.Forms.Platform.Tizen
-{
-       public class TimePickerRenderer : ViewRenderer<TimePicker, EditfieldEntry>
-       {
-               //TODO need to add internationalization support
-               const string DialogTitle = "Choose Time";
-               static readonly string s_defaultFormat = CultureInfo.CurrentCulture.DateTimeFormat.ShortTimePattern;
-
-               TimeSpan _time = DateTime.Now.TimeOfDay;
-               Lazy<IDateTimeDialog> _lazyDialog;
-
-               public TimePickerRenderer()
-               {
-                       RegisterPropertyHandler(TimePicker.FormatProperty, UpdateFormat);
-                       RegisterPropertyHandler(TimePicker.TimeProperty, UpdateTime);
-                       RegisterPropertyHandler(TimePicker.TextColorProperty, UpdateTextColor);
-                       RegisterPropertyHandler(TimePicker.FontAttributesProperty, UpdateFontAttributes);
-                       RegisterPropertyHandler(TimePicker.FontFamilyProperty, UpdateFontFamily);
-                       RegisterPropertyHandler(TimePicker.FontSizeProperty, UpdateFontSize);
-               }
-
-               protected virtual IDateTimeDialog CreateDialog()
-               {
-                       if (Device.Idiom == TargetIdiom.Watch)
-                       {
-                               return new WatchDataTimePickerDialog(Forms.NativeParent);
-                       }
-                       else
-                       {
-                               return new DateTimePickerDialog(Forms.NativeParent);
-                       }
-               }
-
-               protected override void OnElementChanged(ElementChangedEventArgs<TimePicker> e)
-               {
-                       if (Control == null)
-                       {
-                               var entry = new Native.EditfieldEntry(Forms.NativeParent)
-                               {
-                                       IsSingleLine = true,
-                                       HorizontalTextAlignment = Native.TextAlignment.Center,
-                                       InputPanelShowByOnDemand = true,
-                               };
-                               entry.SetVerticalTextAlignment("elm.text", 0.5);
-                               entry.TextBlockFocused += OnTextBlockFocused;
-                               SetNativeControl(entry);
-
-                               _lazyDialog = new Lazy<IDateTimeDialog>(() => {
-                                       var dialog = CreateDialog();
-                                       dialog.Picker.Mode = DateTimePickerMode.Time;
-                                       dialog.Title = DialogTitle;
-                                       dialog.DateTimeChanged += OnDialogTimeChanged;
-                                       return dialog;
-                               });
-                       }
-                       base.OnElementChanged(e);
-               }
-
-               protected override void Dispose(bool disposing)
-               {
-                       if (disposing)
-                       {
-                               if (Control != null)
-                               {
-                                       Control.TextBlockFocused -= OnTextBlockFocused;
-                               }
-                               if (_lazyDialog.IsValueCreated)
-                               {
-                                       _lazyDialog.Value.DateTimeChanged -= OnDialogTimeChanged;
-                                       _lazyDialog.Value.Unrealize();
-                               }
-                       }
-
-                       base.Dispose(disposing);
-               }
-
-               protected override Size MinimumSize()
-               {
-                       return Control.Measure(Control.MinimumWidth, Control.MinimumHeight).ToDP();
-               }
-
-               void OnTextBlockFocused(object o, EventArgs e)
-               {
-                       // For EFL Entry, the event will occur even if it is currently disabled.
-                       // If the problem is resolved, no conditional statement is required.
-                       if (Element.IsEnabled)
-                       {
-                               var dialog = _lazyDialog.Value;
-                               dialog.Picker.Time = Element.Time;
-                               // You need to call Show() after ui thread occupation because of EFL problem.
-                               // Otherwise, the content of the popup will not receive focus.
-                               Device.BeginInvokeOnMainThread(() => dialog.Show());
-                       }
-               }
-
-               void OnDialogTimeChanged(object sender, Native.DateChangedEventArgs dcea)
-               {
-                       Element.SetValueFromRenderer(TimePicker.TimeProperty, dcea.NewDate.TimeOfDay);
-                       UpdateTime();
-               }
-
-               void UpdateFormat()
-               {
-                       UpdateTimeAndFormat();
-               }
-
-               void UpdateTextColor()
-               {
-                       Control.TextColor = Element.TextColor.ToNative();
-               }
-
-               void UpdateTime()
-               {
-                       _time = Element.Time;
-                       UpdateTimeAndFormat();
-               }
-
-               void UpdateFontSize()
-               {
-                       Control.FontSize = Element.FontSize;
-               }
-
-               void UpdateFontFamily()
-               {
-                       Control.FontFamily = Element.FontFamily;
-               }
-
-               void UpdateFontAttributes()
-               {
-                       Control.FontAttributes = Element.FontAttributes;
-               }
-
-               void UpdateTimeAndFormat()
-               {
-                       // Xamarin using DateTime formatting (https://developer.xamarin.com/api/property/Xamarin.Forms.TimePicker.Format/)
-                       Control.Text = new DateTime(_time.Ticks).ToString(Element.Format ?? s_defaultFormat);
-               }
-       }
-}
index 0cc53a1..79c9960 100644 (file)
@@ -78,11 +78,8 @@ namespace Xamarin.Forms.Platform.Tizen
                        Registered.Register(typeof(Button), () => new ButtonRenderer());
                        Registered.Register(typeof(Image), () => new ImageRenderer());
                        Registered.Register(typeof(Slider), () => new SliderRenderer());
-                       Registered.Register(typeof(Picker), () => new PickerRenderer());
                        Registered.Register(typeof(Frame), () => new FrameRenderer());
                        Registered.Register(typeof(Stepper), () => new StepperRenderer());
-                       Registered.Register(typeof(DatePicker), () => new DatePickerRenderer());
-                       Registered.Register(typeof(TimePicker), () => new TimePickerRenderer());
                        Registered.Register(typeof(ProgressBar), () => new ProgressBarRenderer());
                        Registered.Register(typeof(Switch), () => new SwitchRenderer());
                        Registered.Register(typeof(ListView), () => new ListViewRenderer());
index cb0e42c..d393f96 100644 (file)
        {
        }
 
-       internal class _DatePickerRenderer
-       {
-       }
-
-       internal class _TimePickerRenderer
-       {
-       }
-
-       internal class _PickerRenderer
-       {
-       }
-
        internal class _StepperRenderer
        {
        }