From: Hyerim Kim Date: Wed, 29 Mar 2017 05:55:59 +0000 (+0900) Subject: Add comments for TVHome.Controls X-Git-Tag: submit/tizen/20170808.015446~140 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2d16ca30af9bef75bc18e343fd54217cd4405091;p=profile%2Ftv%2Fapps%2Fdotnet%2Fhome.git Add comments for TVHome.Controls Change-Id: I5c035310dd93f88f7d0cf49f6a46f9be4c34f2a5 Signed-off-by: Hyerim Kim --- diff --git a/TVHome/TVHome/Controls/MainPanelButton.xaml.cs b/TVHome/TVHome/Controls/MainPanelButton.xaml.cs index 1069aaf..1942141 100755 --- a/TVHome/TVHome/Controls/MainPanelButton.xaml.cs +++ b/TVHome/TVHome/Controls/MainPanelButton.xaml.cs @@ -24,6 +24,9 @@ namespace TVHome.Controls /// public partial class MainPanelButton : PanelButton { + /// + /// The property for checking button's status + /// public static readonly BindableProperty StatusProperty = BindableProperty.Create("Status", typeof(string), typeof(PanelButton), default(string)); public string Status @@ -32,12 +35,21 @@ namespace TVHome.Controls set { SetValue(StatusProperty, value); } } + /// + /// The constructor of this class + /// public MainPanelButton() { InitializeComponent(); PropertyChanged += MainPanelButton_PropertyChanged; } + /// + /// Handles MainPanelButton Property Changed event + /// Runs animation according to property change of MainPanelButton + /// + /// The source of the event + /// The event that is occurred when property of MainPanelButton is changed private void MainPanelButton_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) { if (e.PropertyName.CompareTo("Status") == 0) @@ -79,6 +91,11 @@ namespace TVHome.Controls } } + /// + /// Handles Button Focused event + /// + /// The source of the event + /// The event that is occurred when button is focused public override void OnFocused(object sender, FocusEventArgs e) { if (OnFocusedCommand != null) @@ -87,10 +104,20 @@ namespace TVHome.Controls } } + /// + /// Handles Button Unfocused event + /// + /// The source of the event + /// The event that is occurred when button is unfocused public override void OnUnfocused(object sender, FocusEventArgs e) { } + /// + /// Handles Button Clicked event + /// + /// The source of the event + /// The event that is occurred when button is clicked public override void OnClicked(object sender, EventArgs e) { if (OnClickedCommand != null) diff --git a/TVHome/TVHome/Controls/PanelButton.cs b/TVHome/TVHome/Controls/PanelButton.cs old mode 100644 new mode 100755 index 78fe1fc..4f1b236 --- a/TVHome/TVHome/Controls/PanelButton.cs +++ b/TVHome/TVHome/Controls/PanelButton.cs @@ -20,17 +20,41 @@ using Xamarin.Forms; namespace TVHome.Controls { + /// + /// TVHome has two panels, MainPanel and SubPanel. The panels have several panel buttons. + /// The class for handling panel button's events + /// public abstract class PanelButton : ViewCell { - + /// + /// A Command will be executed the button is focused. + /// public ICommand OnFocusedCommand { get; set; } + /// + /// A Command will be executed the button is clicked. + /// public ICommand OnClickedCommand { get; set; } + /// + /// Handles Button Focused event + /// + /// The source of the event + /// The event that is occurred when button is focused public abstract void OnFocused(object sender, FocusEventArgs e); + /// + /// Handles Button Unfocused event + /// + /// The source of the event + /// The event that is occurred when button is unfocused public abstract void OnUnfocused(object sender, FocusEventArgs e); + /// + /// Handles Button Clicked event + /// + /// The source of the event + /// The event that is occurred when button is clicked public abstract void OnClicked(object sender, EventArgs e); } } diff --git a/TVHome/TVHome/Controls/SubPanelAllAppsButton.xaml.cs b/TVHome/TVHome/Controls/SubPanelAllAppsButton.xaml.cs index 244f20b..67473e0 100755 --- a/TVHome/TVHome/Controls/SubPanelAllAppsButton.xaml.cs +++ b/TVHome/TVHome/Controls/SubPanelAllAppsButton.xaml.cs @@ -15,23 +15,29 @@ */ using System; - using LibTVRefCommonPortable.Utils; - using Xamarin.Forms; namespace TVHome.Controls { /// - /// haha + /// Custom Control for Button in Sub Panel /// public partial class SubPanelAllAppsButton : PanelButton { + /// + /// Constructor + /// public SubPanelAllAppsButton() { InitializeComponent(); } + /// + /// Handles Button Clicked event + /// + /// The source of the event + /// The event that is occurred when button is clicked public override async void OnClicked(object sender, EventArgs e) { if (OnClickedCommand != null) @@ -42,6 +48,11 @@ namespace TVHome.Controls await View.FadeTo(0.99, 300); } + /// + /// Handles Button Focused event + /// + /// The source of the event + /// The event that is occurred when button is focused public override async void OnFocused(object sender, FocusEventArgs e) { if (OnFocusedCommand != null) diff --git a/TVHome/TVHome/Controls/SubPanelButton.xaml.cs b/TVHome/TVHome/Controls/SubPanelButton.xaml.cs index 5093a59..436a8bc 100755 --- a/TVHome/TVHome/Controls/SubPanelButton.xaml.cs +++ b/TVHome/TVHome/Controls/SubPanelButton.xaml.cs @@ -26,11 +26,19 @@ namespace TVHome.Controls /// public partial class SubPanelButton : PanelButton { + /// + /// Constructor + /// public SubPanelButton() { InitializeComponent(); } + /// + /// Handles Button Clicked event + /// + /// The source of the event + /// The event that is occurred when button is clicked public override async void OnClicked(object sender, EventArgs e) { if (OnClickedCommand != null) @@ -41,6 +49,11 @@ namespace TVHome.Controls await View.FadeTo(0.99, 300); } + /// + /// Handles Button Focused event + /// + /// The source of the event + /// The event that is occurred when button is focused public override async void OnFocused(object sender, FocusEventArgs e) { if (OnFocusedCommand != null) @@ -55,6 +68,11 @@ namespace TVHome.Controls await ButtonImage.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 diff --git a/TVHome/TVHome/Controls/SubPanelReservedButton.xaml.cs b/TVHome/TVHome/Controls/SubPanelReservedButton.xaml.cs index 1f403ea..663c510 100755 --- a/TVHome/TVHome/Controls/SubPanelReservedButton.xaml.cs +++ b/TVHome/TVHome/Controls/SubPanelReservedButton.xaml.cs @@ -26,11 +26,19 @@ namespace TVHome.Controls /// public partial class SubPanelReservedButton : PanelButton { + /// + /// Constructor + /// public SubPanelReservedButton() { InitializeComponent(); } + /// + /// Handles Button Clicked event + /// + /// The source of the event + /// The event that is occurred when button is clicked public override async void OnClicked(object sender, EventArgs e) { if (OnClickedCommand != null) @@ -41,6 +49,11 @@ namespace TVHome.Controls await View.FadeTo(0.99, 300); } + /// + /// Handles Button Focused event + /// + /// The source of the event + /// The event that is occurred when button is focused public override async void OnFocused(object sender, FocusEventArgs e) { if (OnFocusedCommand != null) @@ -56,6 +69,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 diff --git a/TVHome/TVHome/Controls/SubPanelThumbnailButton.xaml.cs b/TVHome/TVHome/Controls/SubPanelThumbnailButton.xaml.cs old mode 100644 new mode 100755 index e8e220a..1666906 --- a/TVHome/TVHome/Controls/SubPanelThumbnailButton.xaml.cs +++ b/TVHome/TVHome/Controls/SubPanelThumbnailButton.xaml.cs @@ -23,6 +23,9 @@ namespace TVHome.Controls /// public partial class SubPanelThumbnailButton : PanelButton { + /// + /// Constructor + /// public SubPanelThumbnailButton() { InitializeComponent(); @@ -32,6 +35,11 @@ namespace TVHome.Controls { } + /// + /// Handles Button Clicked event + /// + /// The source of the event + /// The event that is occurred when button is clicked public override async void OnClicked(object sender, EventArgs e) { if (OnClickedCommand != null) @@ -42,6 +50,11 @@ namespace TVHome.Controls await View.FadeTo(0.9, 300); } + /// + /// Handles Button Focused event + /// + /// The source of the event + /// The event that is occurred when button is focused public override async void OnFocused(object sender, FocusEventArgs e) { if (OnFocusedCommand != null) @@ -69,6 +82,11 @@ namespace TVHome.Controls await View.ScaleTo(1.11, 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) { // Height, Width 확장 Animiation