Add comments for TVHome.ViewModels, TVHome.Views and Main
authorHyerim Kim <rimi.kim@samsung.com>
Wed, 29 Mar 2017 11:58:58 +0000 (20:58 +0900)
committerChulSeung Kim <charles0.kim@samsung.com>
Thu, 8 Jun 2017 09:34:52 +0000 (18:34 +0900)
Change-Id: I1a1542c2e9e0ff14eb3167cf9c622c974ef8e17c
Signed-off-by: Hyerim Kim <rimi.kim@samsung.com>
(cherry picked from commit b39a3b334f32c982fe77b278dee39e11c7bfffd6)

TVHome/TVHome.TizenTV/TVHome.TizenTV.cs
TVHome/TVHome/TVHome.cs
TVHome/TVHome/ViewModels/IHomeViewModel.cs [changed mode: 0644->0755]
TVHome/TVHome/ViewModels/MainPageViewModel.cs
TVHome/TVHome/Views/MainPage.xaml.cs
TVHome/TVHome/Views/MainPanel.xaml.cs
TVHome/TVHome/Views/Panel.cs
TVHome/TVHome/Views/SubPanel.xaml.cs
TVHome/TVHome/Views/SubThumbnailPanel.xaml.cs

index 04e4e55..86336ec 100755 (executable)
  * limitations under the License.
  */
 
-using System;
-using System.Threading;
+using Tizen.Applications;
 using LibTVRefCommonPortable.Utils;
 using LibTVRefCommonTizen.Ports;
-using Tizen.Applications;
-using ElmSharp;
 
 
 namespace TVHome.TizenTV
 {
+    /// <summary>
+    /// TV Home application main entry point
+    /// </summary>
     class Program : global::Xamarin.Forms.Platform.Tizen.FormsApplication
     {
+        /// <summary>
+        /// A interface for the  platform notification
+        /// </summary>
         IPlatformNotification notification;
+        /// <summary>
+        /// A port for handling Window APIs
+        /// </summary>
         WindowPort windowPort;
 
+        /// <summary>
+        /// Gets or set the application resource path
+        /// </summary>
         public static string AppResourcePath
         {
             get;
             private set;
         }
 
+        /// <summary>
+        /// Gets or set the application data path
+        /// </summary>
         public static string AppDataPath
         {
             get;
             private set;
         }
 
+        /// <summary>
+        /// A method will be called when application is created
+        /// </summary>
         protected override void OnCreate()
         {
             base.OnCreate();
@@ -69,6 +84,11 @@ namespace TVHome.TizenTV
             windowPort.SetKeyGrabExclusively(ElmSharp.EvasKeyEventArgs.PlatformHomeButtonName);
         }
 
+        /// <summary>
+        /// A method will be called when application receives KeyUp event
+        /// </summary>
+        /// <param name="sender">The source of the event</param>
+        /// <param name="e">A EvasKey event's argument</param>
         private void KeyUpListener(object sender, ElmSharp.EvasKeyEventArgs e)
         {
             DbgPort.D("Key Pressed :" + e.KeyName);
@@ -88,6 +108,9 @@ namespace TVHome.TizenTV
             }
         }
 
+        /// <summary>
+        /// A method will be called when application is terminated
+        /// </summary>
         protected override void OnTerminate()
         {
             base.OnTerminate();
@@ -98,6 +121,10 @@ namespace TVHome.TizenTV
             MainWindow.KeyUngrab(ElmSharp.EvasKeyEventArgs.PlatformMenuButtonName);
         }
 
+        /// <summary>
+        /// A method will be called when application receives app control
+        /// </summary>
+        /// <param name="e">AppControl event argument</param>
         protected override void OnAppControlReceived(AppControlReceivedEventArgs e)
         {
             if (AppControlPort.AppAddedNotifyOperation.CompareTo(e.ReceivedAppControl.Operation) == 0)
@@ -115,6 +142,10 @@ namespace TVHome.TizenTV
             }
         }
 
+        /// <summary>
+        /// The entry point for the application
+        /// </summary>
+        /// <param name="args">A list of command line arguments</param>
         static void Main(string[] args)
         {
             var app = new Program();
index a925b9b..0627e07 100755 (executable)
@@ -21,11 +21,17 @@ using Xamarin.Forms;
 
 namespace TVHome
 {
+    /// <summary>
+    /// A custom EventArgs with string field
+    /// </summary>
     public class TVHomeEventArgs : EventArgs
     {
         public string arg;
     }
 
+    /// <summary>
+    /// A TVHomeStatus type enumeration
+    /// </summary>
     public enum TVHomeStatus
     {
         OnStart,
@@ -33,61 +39,122 @@ namespace TVHome
         OnResume,
     }
 
+    /// <summary>
+    /// A class that represents TV Home application
+    /// </summary>
     public class App : Application, IPlatformNotification
     {
+        /// <summary>
+        /// A keyword for checking app status
+        /// </summary>
         public static readonly string AppStatus = "appstatus";
 
+        /// <summary>
+        /// A event handler for handling Home key pressed event
+        /// </summary>
         private static EventHandler<TVHomeEventArgs> HomeKeyListener;
+
+        /// <summary>
+        /// A event handler for handling Menu key pressed event
+        /// </summary>
         private static EventHandler<TVHomeEventArgs> MenuKeyListener;
+
+        /// <summary>
+        /// A event handler for handling application installed event
+        /// </summary>
         private static EventHandler<TVHomeEventArgs> AppInstalledListener;
+
+        /// <summary>
+        /// A event handler for handling application uninstalled event
+        /// </summary>
         private static EventHandler<TVHomeEventArgs> AppUninstalledListener;
+
+        /// <summary>
+        /// A event handler for handling application pinned event
+        /// </summary>
         private static EventHandler<TVHomeEventArgs> AppPinnedNotificationListener;
 
+        /// <summary>
+        /// A Constructor
+        /// Sets main page to MainPage instance
+        /// </summary>
         public App()
         {
             MainPage = new MainPage();
         }
 
+        /// <summary>
+        /// A method is called when the application starts
+        /// </summary>
         protected override void OnStart()
         {
             MessagingCenter.Send<App, TVHomeStatus>(this, "appstatus", TVHomeStatus.OnStart);
         }
 
+        /// <summary>
+        /// A method is called when the application enters the sleeping state
+        /// </summary>
         protected override void OnSleep()
         {
             MessagingCenter.Send<App, TVHomeStatus>(this, "appstatus", TVHomeStatus.OnSleep);
         }
 
+        /// <summary>
+        /// A method is called when the application resumes from a sleeping state
+        /// </summary>
         protected override void OnResume()
         {
             MessagingCenter.Send<App, TVHomeStatus>(this, "appstatus", TVHomeStatus.OnResume);
         }
 
+        /// <summary>
+        /// A method adds EventHandler to HomeKeyListener
+        /// </summary>
+        /// <param name="listener">The EventHandler for adding</param>
         public static void SetHomeKeyListener(EventHandler<TVHomeEventArgs> listener)
         {
             HomeKeyListener += listener;
         }
 
+        /// <summary>
+        /// A method adds EventHandler to MenuKeyListener
+        /// </summary>
+        /// <param name="listener">The EventHandler for adding</param>
         public static void SetMenuKeyListener(EventHandler<TVHomeEventArgs> listener)
         {
             MenuKeyListener += listener;
         }
 
+        /// <summary>
+        /// A method adds EventHandler to AppInstalledListener
+        /// </summary>
+        /// <param name="listener">The EventHandler for adding</param>
         public static void SetAppInstalledListener(EventHandler<TVHomeEventArgs> listener)
         {
             AppInstalledListener += listener;
         }
 
+        /// <summary>
+        /// A method adds EventHandler to AppUninstalledListener
+        /// </summary>
+        /// <param name="listener">The EventHandler for adding</param>
         public static void SetAppUninstalledListener(EventHandler<TVHomeEventArgs> listener)
         {
             AppUninstalledListener += listener;
         }
-        
+
+        /// <summary>
+        /// A method adds EventHandler to AppPinnedNotificationListener
+        /// </summary>
+        /// <param name="listener">The EventHandler for adding</param>
         public static void SetAppPinnedNotificationListener(EventHandler<TVHomeEventArgs> listener)
         {
             AppPinnedNotificationListener += listener;
         }
 
+        /// <summary>
+        /// A method for handling home key pressed event
+        /// </summary>
         public void OnHomeKeyPressed()
         {
             DebuggingUtils.Dbg("[[[ Home Key ]]] ");
@@ -97,6 +164,9 @@ namespace TVHome
             });
         }
 
+        /// <summary>
+        /// A method for handling menu key pressed event
+        /// </summary>
         public void OnMenuKeyPressed()
         {
             DebuggingUtils.Dbg("\" Menu Key \" ");
@@ -106,6 +176,10 @@ namespace TVHome
             });
         }
 
+        /// <summary>
+        /// A method for handling application installed event
+        /// </summary>
+        /// <param name="pkgID">A installed package ID</param>
         public void OnAppInstalled(string pkgID)
         {
             DebuggingUtils.Dbg("[[[ App Installed ]]] " + pkgID);
@@ -115,6 +189,10 @@ namespace TVHome
             });
         }
 
+        /// <summary>
+        /// A method for handling application uninstalled event
+        /// </summary>
+        /// <param name="pkgID">A uninstalled package ID</param>
         public void OnAppUninstalled(string pkgID)
         {
             DebuggingUtils.Dbg("[[[ App Uninstalled ]]] " + pkgID);
@@ -124,17 +202,24 @@ namespace TVHome
             });
         }
 
+        /// <summary>
+        /// A method for receiving a pin app App Control request
+        /// </summary>
         public void OnPinAppRequestReceived()
         {
 
         }
 
-        public void OnAppPinnedNotificationReceived(String AppID)
+        /// <summary>
+        /// A method for receiving application pinned noficiation and invoke pinned event
+        /// </summary>
+        /// <param name="appID">A pinned app ID</param>
+        public void OnAppPinnedNotificationReceived(String appID)
         {
-            DebuggingUtils.Dbg("[[[ App Pinned ]]] " + AppID);
+            DebuggingUtils.Dbg("[[[ App Pinned ]]] " + appID);
             AppPinnedNotificationListener.Invoke(this, new TVHomeEventArgs()
             {
-                arg = AppID,
+                arg = appID,
             });
         }
     }
old mode 100644 (file)
new mode 100755 (executable)
index f3e6528..1aee6f4
@@ -1,14 +1,37 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 
 namespace TVHome.ViewModels
 {
+    /// <summary>
+    /// A interface for TV Home MainPageViewModel
+    /// </summary>
     interface IHomeViewModel
     {
+        /// <summary>
+        /// A method for invoking PropertyChanged event
+        /// </summary>
+        /// <param name="name">The name of property</param>
         void OnPropertyChanged(string name);
+
+        /// <summary>
+        /// A method changes CurrentStatus according to parameter
+        /// </summary>
+        /// <param name="newStatus">The next status name</param>
+        /// <param name="isForceUpdate">A flag indicates whether CurrentStatus to be changed or not</param>
         void ChangeCurrentStatus(HomeStatus newStatus, bool isForceUpdate);
     }
 }
index e6a2cc1..5ee9ec1 100755 (executable)
@@ -24,6 +24,9 @@ using Xamarin.Forms;
 
 namespace TVHome.ViewModels
 {
+    /// <summary>
+    /// A HomeStatus type enumeration
+    /// </summary>
     public enum HomeStatus
     {
         Default = 0,
@@ -32,6 +35,10 @@ namespace TVHome.ViewModels
         UnPin,
         Move,
     };
+
+    /// <summary>
+    /// A HomeMenuItem type enumeration
+    /// </summary>
     public enum HomeMenuItem
     {
         Recent = 0,
@@ -40,25 +47,68 @@ namespace TVHome.ViewModels
         NotSelected,
     };
 
+    /// <summary>
+    /// A class for ViewModel of TV Home
+    /// </summary>
     public class MainPageViewModel : INotifyPropertyChanged, IHomeViewModel
     {
+        /// <summary>
+        /// Gets or set MainList for MainPanel
+        /// </summary>
         public IEnumerable<ShortcutInfo> MainList { get; set; }
+        /// <summary>
+        /// Gets or set RecentList for Recent SubPanel
+        /// </summary>
         public IEnumerable<ShortcutInfo> RecentList { get; set; }
+        /// <summary>
+        /// Gets or set AppList for Apps SubPanel
+        /// </summary>
         public IEnumerable<ShortcutInfo> AppList { get; set; }
+        /// <summary>
+        /// Gets or set SettingsList for Settings SubPanel
+        /// </summary>
         public IEnumerable<ShortcutInfo> SettingsList { get; set; }
 
+        /// <summary>
+        /// A command for executing when MainPanel is focused.
+        /// </summary>
         public Command MainPanelFocusedCommand { get; set; }
+        /// <summary>
+        /// A command for executing when SubPanel is focused.
+        /// </summary>
         public Command SubPanelFocusedCommand { get; set; }
+        /// <summary>
+        /// A command for changing the status to Move status
+        /// </summary>
         public Command SetMoveStatusCommand { get; set; }
+        /// <summary>
+        /// A command for changing the status to Unpin status
+        /// </summary>
         public Command SetUnpinStatusCommand { get; set; }
 
+        /// <summary>
+        /// Gets or set CurrentStatus of HomeStatus
+        /// </summary>
         public HomeStatus CurrentStatus { get; private set; }
+        /// <summary>
+        /// Gets or set SelectedMenuName of HomeMenuItem
+        /// </summary>
         public HomeMenuItem SelectedMenuName { get; private set; }
 
+        /// <summary>
+        /// A flag indicates whether "No recent info" in Recent SubPanel to be displayed or not
+        /// </summary>
         public bool IsShowNoRecentContents { get; set; }
 
+        /// <summary>
+        /// A event that is occurred when property of MainPageViewModel is changed
+        /// </summary>
         public event PropertyChangedEventHandler PropertyChanged;
 
+        /// <summary>
+        /// Constructor
+        /// Initialize MainPanel, SubPanel, Command and EventListeners
+        /// </summary>
         public MainPageViewModel()
         {
             // Init sequence
@@ -102,11 +152,17 @@ namespace TVHome.ViewModels
             });
         }
 
+        /// <summary>
+        /// A method for initializing HomeStatus to Default
+        /// </summary>
         private void InitStatus()
         {
             ChangeCurrentStatus(HomeStatus.Default, true);
         }
 
+        /// <summary>
+        /// A method for initializing commands
+        /// </summary>
         private void InitCommands()
         {
             MainPanelFocusedCommand = new Command<HomeMenuItem>((key) =>
@@ -132,6 +188,9 @@ namespace TVHome.ViewModels
             });
         }
 
+        /// <summary>
+        /// A method for makeing MainMenu items and display in MainPanel
+        /// </summary>
         private void MakeMainMenuItems()
         {
             string[] AppName = { "Recent", "Apps", "Settings" };
@@ -208,24 +267,38 @@ namespace TVHome.ViewModels
             OnPropertyChanged("MainList");
         }
 
+        /// <summary>
+        /// Gets default AppList for displaying items and updates the list to Apps SubPanel
+        /// </summary>
         private void SetDefaultAppList()
         {
             AppList = TVHomeImpl.GetInstance.AppShortcutControllerInstance.GetDefaultShortcuts();
             OnPropertyChanged("AppList");
         }
 
+        /// <summary>
+        /// Gets the AppList for displaying items and updates the list to Apps SubPanel
+        /// </summary>
+        /// <param name="sender">The source of event</param>
+        /// <param name="e">The event that is occurred pinned app file is changed</param>
         private async void UpdateAppList(object sender, EventArgs e)
         {
             AppList = await TVHomeImpl.GetInstance.AppShortcutControllerInstance.GetPinnedAppsWithDefaultShortcuts();
             OnPropertyChanged("AppList");
         }
 
+        /// <summary>
+        /// Gets the SettingsList for displaying items and updates the list to Settings SubPanel
+        /// </summary>
         private void MakeSettingsButtons()
         {
             SettingsList = TVHomeImpl.GetInstance.SettingShortcutControllerInstance.GetList();
             OnPropertyChanged("SettingsList");
         }
 
+        /// <summary>
+        /// Gets the RecentList for displaying items and updates the list to Recent SubPanel
+        /// </summary>
         private void MakeRecentButtons()
         {
             RecentList = TVHomeImpl.GetInstance.RecentShortcutControllerInstance.GetList();
@@ -242,6 +315,10 @@ namespace TVHome.ViewModels
             OnPropertyChanged("IsShowNoRecentContents");
         }
 
+        /// <summary>
+        /// A method for invoking PropertyChanged event
+        /// </summary>
+        /// <param name="name">The name of property</param>
         public void OnPropertyChanged(string name)
         {
             PropertyChangedEventHandler handler = PropertyChanged;
@@ -251,6 +328,11 @@ namespace TVHome.ViewModels
             }
         }
 
+        /// <summary>
+        /// A method for changing CurrentStatus according to parameter
+        /// </summary>
+        /// <param name="newStatus">The next status name</param>
+        /// <param name="isForceUpdate">A flag indicates whether CurrentStatus to be changed or not</param>
         public void ChangeCurrentStatus(HomeStatus newStatus, bool isForceUpdate = false)
         {
             if (isForceUpdate ||
@@ -318,6 +400,11 @@ namespace TVHome.ViewModels
             }
         }
 
+        /// <summary>
+        /// A method for changing selected HomeMenuItem according to parameter
+        /// </summary>
+        /// <param name="panelName">Selected menu name in MainPanel</param>
+        /// <param name="isForceUpdate">A flag indicates whether selected menu name to be changed or not</param>
         public void ChangeSelectedPanelName(HomeMenuItem panelName, bool isForceUpdate = false)
         {
             if (isForceUpdate ||
index 8c8887d..49eb657 100755 (executable)
  * limitations under the License.
  */
 
-using System;
 using System.Collections.Generic;
-using System.Diagnostics;
-using System.Windows.Input;
 using LibTVRefCommonPortable.DataModels;
-using LibTVRefCommonPortable.Models;
 using LibTVRefCommonPortable.Utils;
 using Xamarin.Forms;
 using TVHome.ViewModels;
-using System.Linq;
 
 namespace TVHome.Views
 {
     /// <summary>
-    /// Root Page of TV Home Application
+    /// A custom view for displaying main page of TV Home
     /// </summary>
     public partial class MainPage : ContentPage
     {
+        /// <summary>
+        /// Identifies the CurrentStatus bindable property
+        /// </summary>
         public static readonly BindableProperty CurrentStatusProperty = BindableProperty.Create("CurrentStatus", typeof(HomeStatus), typeof(MainPage), default(HomeStatus));
+
+        /// <summary>
+        /// Gets or sets current status of MainPage
+        /// </summary>
         public HomeStatus CurrentStatus
         {
             get { return (HomeStatus)GetValue(CurrentStatusProperty); }
             set { SetValue(CurrentStatusProperty, value); }
         }
 
+        /// <summary>
+        /// Identifies the SelectedMenuName bindable property
+        /// </summary>
         public static readonly BindableProperty SelectedMenuNameProperty = BindableProperty.Create("SelectedMenuName", typeof(HomeMenuItem), typeof(MainPage), default(HomeMenuItem));
+
+        /// <summary>
+        /// Gets or sets selected HomeMenuItem
+        /// </summary>
         public HomeMenuItem SelectedMenuName
         {
             get { return (HomeMenuItem)GetValue(SelectedMenuNameProperty); }
             set { SetValue(SelectedMenuNameProperty, value); }
         }
 
+        /// <summary>
+        /// A list of SubPanels
+        /// </summary>
         private Dictionary<HomeMenuItem, Panel> SubPanelDictionary;
 
+        /// <summary>
+        /// Iconifies the Home screen(Minimizes the Home screen)
+        /// </summary>
         private async void Iconified()
         {
 #pragma warning disable CS4014
@@ -58,6 +73,9 @@ namespace TVHome.Views
             DependencyService.Get<IWindowAPIs>().SetIconified(true);
         }
 
+        /// <summary>
+        /// Uniconifies the Home screen(Maximize the Home screen)
+        /// </summary>
         private async void Uniconified()
         {
 #pragma warning disable CS4014
@@ -68,6 +86,9 @@ namespace TVHome.Views
             DependencyService.Get<IWindowAPIs>().SetIconified(false);
         }
 
+        /// <summary>
+        /// Iconify/uniconify Home screen following current status
+        /// </summary>
         private void ToggleIconified()
         {
             if (DependencyService.Get<IWindowAPIs>().GetIconified() == true)
@@ -81,6 +102,12 @@ namespace TVHome.Views
             }
         }
 
+        /// <summary>
+        /// A constructor
+        /// Makes SubPanel list
+        /// Adds PropertyChanged event handler
+        /// Adds HomeKey and MenuKey event listener
+        /// </summary>
         public MainPage()
         {
             InitializeComponent();
@@ -127,6 +154,11 @@ namespace TVHome.Views
             });
         }
 
+        /// <summary>
+        /// This method is called when the properties of MainPage is changed
+        /// </summary>
+        /// <param name="sender">The source of event</param>
+        /// <param name="e">The event that is occurred when property is changed</param>
         private void MainPage_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
         {
             if (e.PropertyName.CompareTo("CurrentStatus") == 0)
@@ -139,6 +171,10 @@ namespace TVHome.Views
             }
         }
 
+        /// <summary>
+        /// A method sets current status according to parameter
+        /// </summary>
+        /// <param name="status">The next status name</param>
         private void SetCurrentStatus(HomeStatus status)
         {
             switch (status)
@@ -153,6 +189,10 @@ namespace TVHome.Views
             }
         }
 
+        /// <summary>
+        /// A method sets selected HomeMenuItem according to parameter
+        /// </summary>
+        /// <param name="panelName">Selected HomeMenuItem</param>
         private void SelectMenu(HomeMenuItem panelName)
         {
             foreach (var panelItem in SubPanelDictionary)
@@ -168,11 +208,19 @@ namespace TVHome.Views
             SubPanelDictionary[panelName].ShowPanel();
         }
 
+        /// <summary>
+        /// A method unpins selected item according to parameter
+        /// </summary>
+        /// <param name="appId">Selected item's app ID</param>
         private void UnpinAppShortcutInfo(string appId)
         {
             RemovePinnedApp(appId);
         }
 
+        /// <summary>
+        /// A method updates the pinned app list according to parameter
+        /// </summary>
+        /// <param name="PinnedApps">A new pinned apps list</param>
         private void UpdatePinnedApps(Dictionary<string, string> PinnedApps)
         {
             List<AppShortcutInfo> pinnedAppList = new List<AppShortcutInfo>();
@@ -187,6 +235,10 @@ namespace TVHome.Views
             TVHomeImpl.GetInstance.AppShortcutControllerInstance.UpdatePinnedApps(pinnedAppList);
         }
 
+        /// <summary>
+        /// A method removes specific pinned app according to parameter
+        /// </summary>
+        /// <param name="AppID">To be removed app's app ID</param>
         private async void RemovePinnedApp(string AppID)
         {
             Dictionary<string, string> PinnedApps = await TVHomeImpl.GetInstance.AppShortcutControllerInstance.GetPinnedAppsAppIDs();
@@ -197,6 +249,10 @@ namespace TVHome.Views
             }
         }
 
+        /// <summary>
+        /// A task for handling BackKey event
+        /// </summary>
+        /// <returns>Always returns true</returns>
         protected override bool OnBackButtonPressed()
         {
             ToggleIconified();
index 0619207..8ef8b4f 100755 (executable)
  * limitations under the License.
  */
 
-using System;
-using System.Collections.Generic;
 using System.ComponentModel;
-using System.Windows.Input;
 using TVHome.Controls;
 using LibTVRefCommonPortable.DataModels;
-using LibTVRefCommonPortable.Utils;
 using TVHome.ViewModels;
 using Xamarin.Forms;
 using System.Threading.Tasks;
@@ -28,16 +24,24 @@ using System.Threading.Tasks;
 namespace TVHome.Views
 {
     /// <summary>
-    /// Main Panel in Main Page
+    /// A MainPanel view in Main Page
     /// </summary>
     public partial class MainPanel : Panel
     {
+        /// <summary>
+        /// Constructor
+        /// </summary>
         public MainPanel()
         {
             InitializeComponent();
             PropertyChanged += OnItemsSourcePropertyChanged;
         }
 
+        /// <summary>
+        /// A event handler for handling property changed event
+        /// </summary>
+        /// <param name="sender">The source of the event</param>
+        /// <param name="e">The event that is occurred when property is changed</param>
         private void OnItemsSourcePropertyChanged(object sender, PropertyChangedEventArgs e)
         {
             if (e.PropertyName != "ItemsSource")
@@ -72,28 +76,43 @@ namespace TVHome.Views
             PanelButtonGrid.ForceLayout();
         }
 
+        /// <summary>
+        /// A method for initializing focus of MainPanel item
+        /// </summary>
         public void InitialFocusing()
         {
             var button = PanelButtonGrid.Children[1];
             button.FindByName<Button>("ButtonFocusArea").Focus();
         }
 
+        /// <summary>
+        /// A method for translating when panel is focused
+        /// </summary>
         public override async void FocusPanel()
         {
             await this.TranslateTo(0, 0, 300);
         }
 
+        /// <summary>
+        /// A method for scaling panel when panel is hided
+        /// </summary>
         public override async void HidePanel()
         {
             await this.ScaleTo(0, 0);
         }
 
+        /// <summary>
+        /// A method for translating when panel is selected
+        /// </summary>
         public async void SelectPanel()
         {
             await Task.Delay(300);
             await this.TranslateTo(0, -78, 300);
         }
 
+        /// <summary>
+        /// A method for scaling the panel when the panel is showed
+        /// </summary>
         public override async void ShowPanel()
         {
             await this.ScaleTo(1, 0);
index 4c14c90..a25b70d 100755 (executable)
  * limitations under the License.
  */
 
-using System;
 using System.Collections.Generic;
-using System.ComponentModel;
 using System.Windows.Input;
 using LibTVRefCommonPortable.DataModels;
 using Xamarin.Forms;
 
 namespace TVHome.Views
 {
+    /// <summary>
+    /// The Panel is a view for MainPanel and SubPanel of TV Home
+    /// </summary>
     public abstract class Panel : ContentView
     {
+        /// <summary>
+        /// Identifies the OnFocusedCommand bindable property
+        /// </summary>
         public static readonly BindableProperty OnFocusedCommandProperty = BindableProperty.Create("OnFocusedCommand", typeof(ICommand), typeof(MainPanel));
 
+        /// <summary>
+        /// A command is executed when panel is focused
+        /// </summary>
         public ICommand OnFocusedCommand
         {
             get { return (ICommand)GetValue(OnFocusedCommandProperty); }
             set { SetValue(OnFocusedCommandProperty, value); }
         }
 
+        /// <summary>
+        /// Identifies the OnUnpinCommand bindable property
+        /// </summary>
         public static readonly BindableProperty OnUnpinCommandProperty = BindableProperty.Create("OnUnpinCommand", typeof(ICommand), typeof(SubPanel));
 
+        /// <summary>
+        /// A command is executed when item is unpinned
+        /// </summary>
         public ICommand OnUnpinCommand
         {
             get { return (ICommand)GetValue(OnUnpinCommandProperty); }
             set { SetValue(OnUnpinCommandProperty, value); }
         }
 
+        /// <summary>
+        /// Identifies the ItemsSource bindable property
+        /// </summary>
         public static readonly BindableProperty ItemsSourceProperty = BindableProperty.Create("ItemsSource", typeof(IEnumerable<ShortcutInfo>), typeof(MainPanel));
 
+        /// <summary>
+        /// Gets or set ItemSource to display item
+        /// </summary>
         public IEnumerable<ShortcutInfo> ItemsSource
         {
             get { return (IEnumerable<ShortcutInfo>)GetValue(ItemsSourceProperty); }
             set { SetValue(ItemsSourceProperty, value); }
         }
 
+        /// <summary>
+        /// Identifies the ItemTemplate bindable property
+        /// </summary>
         public static readonly BindableProperty ItemTemplateProperty = BindableProperty.Create("ItemTemplate", typeof(DataTemplate), typeof(SubPanel));
 
+        /// <summary>
+        /// Gets or set DataTemplate to display item
+        /// </summary>
         public DataTemplate ItemTemplate
         {
             get { return (DataTemplate)GetValue(ItemTemplateProperty); }
             set { SetValue(ItemTemplateProperty, value); }
         }
 
+        /// <summary>
+        /// A flag indicates whether the panel is focused or not
+        /// </summary>
         public bool isFocused;
 
+        /// <summary>
+        /// A method for handling panel focused event
+        /// </summary>
         public abstract void FocusPanel();
+
+        /// <summary>
+        /// A method for handling to hide panel
+        /// </summary>
         public abstract void HidePanel();
+
+        /// <summary>
+        /// A method for handling to show panel
+        /// </summary>
         public abstract void ShowPanel();
     }
 }
index e33b6de..153fc6f 100755 (executable)
  * limitations under the License.
  */
 
-using System;
-using System.Collections.Generic;
-using System.Windows.Input;
 using System.ComponentModel;
 using TVHome.Controls;
 using LibTVRefCommonPortable.DataModels;
-using TVHome.ViewModels;
 using Xamarin.Forms;
-using LibTVRefCommonPortable.Utils;
 using System.Threading.Tasks;
 
 namespace TVHome.Views
@@ -32,7 +27,14 @@ namespace TVHome.Views
     /// </summary>
     public partial class SubPanel : Panel
     {
+        /// <summary>
+        /// A focused item in panel
+        /// </summary>
         private ShortcutInfo focusedItem;
+
+        /// <summary>
+        /// Constructor
+        /// </summary>
         public SubPanel()
         {
             InitializeComponent();
@@ -40,11 +42,20 @@ namespace TVHome.Views
             PropertyChanged += OnItemsSourcePropertyChanged;
         }
 
+        /// <summary>
+        /// A method provides focused item in panel
+        /// </summary>
+        /// <returns>A focused item</returns>
         public ShortcutInfo GetFocusedItem()
         {
             return focusedItem;
         }
 
+        /// <summary>
+        /// A event handler for handling property changed event
+        /// </summary>
+        /// <param name="sender">A source of event</param>
+        /// <param name="e">The event that is occurred when property is changed</param>
         private void OnItemsSourcePropertyChanged(object sender, PropertyChangedEventArgs e)
         {
             if (e.PropertyName != "ItemsSource")
@@ -97,6 +108,9 @@ namespace TVHome.Views
 
         }
 
+        /// <summary>
+        /// A method for hiding the panel
+        /// </summary>
         public override async void HidePanel()
         {
             isFocused = false;
@@ -112,6 +126,9 @@ namespace TVHome.Views
             await this.FadeTo(0, 0);
         }
 
+        /// <summary>
+        /// A method for showing the panel
+        /// </summary>
         public override async void ShowPanel()
         {
             isFocused = false;
@@ -127,6 +144,9 @@ namespace TVHome.Views
             await this.FadeTo(0.3, 300);
         }
 
+        /// <summary>
+        /// A method for handling panel focused event
+        /// </summary>
         public override async void FocusPanel()
         {
             if (isFocused)
index 62301a0..965402e 100755 (executable)
@@ -23,17 +23,26 @@ using System.Threading.Tasks;
 namespace TVHome.Views
 {
     /// <summary>
-    /// Sub Panel in Main Page
+    /// SubThumnailPanel in Main Page for Recent
     /// </summary>
     public partial class SubThumbnailPanel : Panel
     {
+        /// <summary>
+        /// Identifies the ShowNoContentsInfo bindable property
+        /// </summary>
         public static readonly BindableProperty ShowNoContentsInfoProperty = BindableProperty.Create("ShowNoContentsInfo", typeof(bool), typeof(SubThumbnailPanel), default(bool));
+        /// <summary>
+        /// A flag indicates whether displaying "no content info" is needed or not
+        /// </summary>
         public bool ShowNoContentsInfo
         {
             get { return (bool)GetValue(ShowNoContentsInfoProperty); }
             set { SetValue(ShowNoContentsInfoProperty, value); }
         }
 
+        /// <summary>
+        /// Constructor
+        /// </summary>
         public SubThumbnailPanel()
         {
             InitializeComponent();
@@ -41,6 +50,11 @@ namespace TVHome.Views
             PropertyChanged += OnItemsSourcePropertyChanged;
         }
 
+        /// <summary>
+        /// A event handler for handling property changed event
+        /// </summary>
+        /// <param name="sender">A source of event</param>
+        /// <param name="e">The event that is occurred when property is changed</param>
         private void OnItemsSourcePropertyChanged(object sender, PropertyChangedEventArgs e)
         {
             if (e.PropertyName == "ShowNoContentsInfo")
@@ -82,6 +96,9 @@ namespace TVHome.Views
             HidePanel();
         }
 
+        /// <summary>
+        /// A method for hiding the panel
+        /// </summary>
         public override async void HidePanel()
         {
             if (NoContentInfo.IsVisible)
@@ -107,6 +124,9 @@ namespace TVHome.Views
             }
         }
 
+        /// <summary>
+        /// A method for showing the panel
+        /// </summary>
         public override async void ShowPanel()
         {
             if (NoContentInfo.IsVisible)
@@ -129,6 +149,9 @@ namespace TVHome.Views
             }
         }
 
+        /// <summary>
+        /// A method for handling panel focused event
+        /// </summary>
         public override async void FocusPanel()
         {
             if (isFocused)