From: Hyerim Kim Date: Thu, 30 Mar 2017 04:57:17 +0000 (+0900) Subject: TVHome - Apps Move X-Git-Tag: submit/tizen/20170808.015446~127 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d33d2612b1ea419c5d4379aa543a2c09acf1cc53;p=profile%2Ftv%2Fapps%2Fdotnet%2Fhome.git TVHome - Apps Move Change-Id: I639c69dedd626c348ad7c00af031dac314a61d24 Signed-off-by: Hyerim Kim (cherry picked from commit 97d0a1943a3873935b3646dbaea65eb4ee7d4348) --- diff --git a/TVHome/TVHome/Controls/MainPanelButton.xaml.cs b/TVHome/TVHome/Controls/MainPanelButton.xaml.cs index 1942141..32e899f 100755 --- a/TVHome/TVHome/Controls/MainPanelButton.xaml.cs +++ b/TVHome/TVHome/Controls/MainPanelButton.xaml.cs @@ -29,6 +29,9 @@ namespace TVHome.Controls /// public static readonly BindableProperty StatusProperty = BindableProperty.Create("Status", typeof(string), typeof(PanelButton), default(string)); + /// + /// Gets or sets status of Main Panel + /// public string Status { get { return (string)GetValue(StatusProperty); } @@ -125,5 +128,22 @@ namespace TVHome.Controls OnClickedCommand.Execute(""); } } + + /// + /// A method for handling the button when button is changed to move mode + /// + /// A flag indicates whether the button is move mode or not + public override void ChangeMoveMode(bool isMoveMode) + { + + } + + /// + /// A method for changing the button's LayoutOptions according to parameter + /// + /// A flag indicates whether the SubPanel is MoveMode or not + public override void ChangeLayoutOptions(bool isMoveMode) + { + } } } diff --git a/TVHome/TVHome/Controls/PanelButton.cs b/TVHome/TVHome/Controls/PanelButton.cs index 4f1b236..56eaa9a 100755 --- a/TVHome/TVHome/Controls/PanelButton.cs +++ b/TVHome/TVHome/Controls/PanelButton.cs @@ -26,6 +26,7 @@ namespace TVHome.Controls /// public abstract class PanelButton : ViewCell { + public bool isMoveMode; /// /// A Command will be executed the button is focused. /// @@ -36,6 +37,16 @@ namespace TVHome.Controls /// public ICommand OnClickedCommand { get; set; } + /// + /// A Command will be executed the button is moved. + /// + public ICommand OnMoveCommand { get; set; } + + /// + /// A Command will be executed the button is unpinned. + /// + public ICommand OnUnpinCommand { get; set; } + /// /// Handles Button Focused event /// @@ -56,5 +67,17 @@ namespace TVHome.Controls /// The source of the event /// The event that is occurred when button is clicked public abstract void OnClicked(object sender, EventArgs e); + + /// + /// A method for handling the button when button is changed to move mode + /// + /// A flag indicates whether the button is move mode or not + public abstract void ChangeMoveMode(bool isMoveMode); + + /// + /// A method for changing the button's LayoutOptions according to parameter + /// + /// A flag indicates whether the SubPanel is MoveMode or not + public abstract void ChangeLayoutOptions(bool isMoveMode); } } diff --git a/TVHome/TVHome/Controls/SubPanelAllAppsButton.xaml.cs b/TVHome/TVHome/Controls/SubPanelAllAppsButton.xaml.cs index 0abfe31..22575b6 100755 --- a/TVHome/TVHome/Controls/SubPanelAllAppsButton.xaml.cs +++ b/TVHome/TVHome/Controls/SubPanelAllAppsButton.xaml.cs @@ -68,6 +68,11 @@ namespace TVHome.Controls await ButtonBgImage.ScaleTo(1.3, 300); } + /// + /// Handles Button Unfocused event + /// + /// The source of the event + /// The event that is occurred when button is unfocused public override async void OnUnfocused(object sender, FocusEventArgs e) { #pragma warning disable CS4014 @@ -77,5 +82,32 @@ namespace TVHome.Controls #pragma warning restore CS4014 await ButtonBgImage.ScaleTo(1, 300); } + + /// + /// A method for handling the button when button is changed to move mode + /// + /// A flag indicates whether the button is move mode or not + public override void ChangeMoveMode(bool isMoveMode) + { + + } + + /// + /// A method for changing the button's LayoutOptions according to parameter + /// + /// A flag indicates whether the SubPanel is MoveMode or not + public override void ChangeLayoutOptions(bool isMoveMode) + { + if (isMoveMode) + { + View.VerticalOptions = LayoutOptions.End; + } + else + { + View.VerticalOptions = LayoutOptions.Start; + } + + View.TranslateTo(0, 0, 0); + } } } diff --git a/TVHome/TVHome/Controls/SubPanelButton.xaml b/TVHome/TVHome/Controls/SubPanelButton.xaml index 2ca9626..b41d065 100755 --- a/TVHome/TVHome/Controls/SubPanelButton.xaml +++ b/TVHome/TVHome/Controls/SubPanelButton.xaml @@ -39,5 +39,33 @@ Unfocused="OnUnfocused" Clicked="OnClicked" Opacity="0" /> + + +