From: Geunsun, Lee Date: Thu, 23 Mar 2017 09:41:06 +0000 (+0900) Subject: Implement app option menu logic X-Git-Tag: submit/tizen/20170808.015446~166 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2918f39f160af3135232a23ce4b00f0c50c64d4f;p=profile%2Ftv%2Fapps%2Fdotnet%2Fhome.git Implement app option menu logic Change-Id: I05082b66b5e9e109966f1dcfcc29c3301545d894 --- diff --git a/LibTVRefCommonPortable/DataModels/AppShortcutInfo.cs b/LibTVRefCommonPortable/DataModels/AppShortcutInfo.cs index 2e369c2..1caaf85 100644 --- a/LibTVRefCommonPortable/DataModels/AppShortcutInfo.cs +++ b/LibTVRefCommonPortable/DataModels/AppShortcutInfo.cs @@ -14,8 +14,10 @@ * limitations under the License. */ +using LibTVRefCommonPortable.Utils; using System; using System.Xml.Serialization; +using Xamarin.Forms; namespace LibTVRefCommonPortable.DataModels { @@ -23,6 +25,9 @@ namespace LibTVRefCommonPortable.DataModels { public string AppID { get; set; } + [XmlIgnore] + public string Status { get; set; } + [XmlIgnore] private bool isChecked; @@ -68,27 +73,6 @@ namespace LibTVRefCommonPortable.DataModels [XmlIgnore] public bool IsRemovable { get; set; } - [XmlIgnore] - private bool isVisible = true; - - [XmlIgnore] - public bool IsVisible - { - get - { - return isVisible; - } - - set - { - if (isVisible != value) - { - isVisible = value; - OnPropertyChanged("IsVisible"); - } - } - } - [XmlIgnore] private bool isFocused; @@ -158,6 +142,25 @@ namespace LibTVRefCommonPortable.DataModels [XmlIgnore] public DateTime LastUsed { get; set; } + [XmlIgnore] + public Command OptionMenuPinToggleCommand { get; set; } + + [XmlIgnore] + public Command OptionMenuDeleteCommand { get; set; } + + public AppShortcutInfo() + { + OptionMenuPinToggleCommand = new Command(() => + { + MessagingCenter.Send(this, "OptionMenuPinToggle", AppID); + }); + + OptionMenuDeleteCommand = new Command(() => + { + MessagingCenter.Send(this, "OptionMenuDelete", AppID); + }); + } + public override void UpdateState() { SetCurrentState("default"); diff --git a/TVApps/TVApps/Controls/AppItemCell.xaml b/TVApps/TVApps/Controls/AppItemCell.xaml index a5fd78d..14ab44e 100755 --- a/TVApps/TVApps/Controls/AppItemCell.xaml +++ b/TVApps/TVApps/Controls/AppItemCell.xaml @@ -2,6 +2,7 @@ + @@ -10,7 +11,6 @@ RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.6833}" RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.2923}" RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.1583}" - IsVisible="{Binding IsVisible}" Source="{Binding CurrentStateDescription.IconPath}" /> - - - - - - 0 -