Check Code format(StyleCop), Svace
authorHeonjae Jang <heonjae.jang@samsung.com>
Tue, 16 May 2017 06:41:50 +0000 (15:41 +0900)
committerChulSeung Kim <charles0.kim@samsung.com>
Thu, 8 Jun 2017 09:34:56 +0000 (18:34 +0900)
Change-Id: I30867ff49b7e28653470a9661a5b1bb7d878e710
Signed-off-by: Heonjae Jang <heonjae.jang@samsung.com>
14 files changed:
LibTVRefCommonPortable/Models/ManagedApps.cs
LibTVRefCommonTizen/Ports/AppControlPort.cs
LibTVRefCommonTizen/Ports/MediaContentPort.cs
LibTVRefCommonTizen/Ports/PackageManagerPort.cs
TVApps/TVApps/Controls/AppItemCell.xaml.cs
TVApps/TVApps/TVApps.cs
TVApps/TVApps/Views/FooterNormalStatus.xaml.cs
TVApps/TVApps/Views/MainPage.xaml.cs
TVHome/TVHome.TizenTV/Sniper.cs
TVHome/TVHome.TizenTV/SniperInterOp.cs
TVHome/TVHome.TizenTV/res/screenshot.png
TVHome/TVHome/Views/MainPage.xaml.cs
TVHome/TVHome/Views/SubPanel.xaml.cs
TVHome/TVHome/Views/SubThumbnailPanel.xaml.cs

index 8d22771..2690a55 100644 (file)
@@ -97,7 +97,8 @@ namespace LibTVRefCommonPortable.Models
 
             // TODO : remove this, only for TDC
             if (appID.Contains("etflix") ||
-                  appID.StartsWith("org.volt"))
+                  appID.StartsWith("org.volt") ||
+                    appID.StartsWith("org.tizen.emanual"))
             {
                 return true;
             }
index e689253..96c9eb0 100644 (file)
@@ -55,7 +55,7 @@ namespace LibTVRefCommonTizen.Ports
         /// <summary>
         /// Sends the launch request
         /// </summary>
-        /// <param name="AppId"> The app ID to explicitly launch</param>
+        /// <param name="appId"> The app ID to explicitly launch</param>
         /// <param name="extraData">The extra data for the app control</param>
         /// <param name="fileUri">The file URI to be opened</param>
         public void SendLaunchRequest(string appId, IDictionary<string, string> extraData = null, string fileUri = null)
index ba77e8d..41de382 100644 (file)
@@ -40,7 +40,7 @@ namespace LibTVRefCommonTizen.Ports
             contentFilter.Offset = 0;
             contentFilter.Count = limitation;
 
-            IEnumerable<MediaInformation> mediaInformations = null;
+            IEnumerable<MediaInformation> mediaInformations = new List<MediaInformation>();
 
             try
             {
@@ -53,15 +53,15 @@ namespace LibTVRefCommonTizen.Ports
 
             foreach (var mediaInformation in mediaInformations)
             {
-                recentlyPlayedVideos.Add(new RecentlyPlayedMedia()
+                recentlyPlayedVideos.Add(
+                    new RecentlyPlayedMedia()
                     {
                         MediaId = mediaInformation.MediaId,
                         ThumbnailPath = mediaInformation.ThumbnailPath,
                         DisplayName = mediaInformation.DisplayName,
                         PlayedAt = mediaInformation.PlayedAt,
                         FilePath = mediaInformation.FilePath,
-                    }
-                );
+                    });
             }
 
             return recentlyPlayedVideos;
index bf77e2d..c1c14ba 100644 (file)
@@ -118,11 +118,18 @@ namespace LibTVRefCommonTizen.Ports
                 }
 
                 result = new string[3];
-                result[0] = (item.Label == null || item.Label.Length <= 0) ? "No Name" : item.Label;
+                var itemLabel = "No Name";
+
+                if (item.Label != null && item.Label.Length > 0)
+                {
+                    itemLabel = item.Label;
+                }
+
+                result[0] = itemLabel;
                 result[1] = item.Id;
                 result[2] = (System.IO.File.Exists(item.IconPath)) ? item.IconPath : "AppIcon.png";
 
-                pkgList.Add(item.Label, result);
+                pkgList.Add(itemLabel, result);
             }
 
             return pkgList;
index d7b8f75..caa3a10 100755 (executable)
@@ -166,6 +166,8 @@ namespace TVApps.Controls
         /// </summary>
         private int height144 = SizeUtils.GetHeightSize(144);
 
+        private int height271 = SizeUtils.GetHeightSize(271);
+
         private int height284 = SizeUtils.GetHeightSize(284);
 
         private int height300 = SizeUtils.GetHeightSize(300);
@@ -274,7 +276,7 @@ namespace TVApps.Controls
             //{
             //    ItemDim.FadeTo((IsDim) ? 0.5 : 0.0, 100);
             //}
-            else if(e.PropertyName.CompareTo("AppDescription") == 0)
+            else if (e.PropertyName.CompareTo("AppDescription") == 0)
             {
                 ButtonImage.Source = AppDescription.IconPath;
                 ButtonTitle.Text = AppDescription.Label;
@@ -299,7 +301,7 @@ namespace TVApps.Controls
         {
             ButtonImage.ScaleTo((isShow) ? 1 : 1.195, 167);
             ButtonImage.TranslateTo(0, (isShow) ? 0 : height100, 334);
-            TextArea.TranslateTo(0, (isShow) ? height300 : height300, 167);
+            TextArea.TranslateTo(0, (isShow) ? height271 : height300, 167);
             TextArea.FadeTo((isShow) ? 0.0 : 0.99, 50);
 
             if (isShow)
index 5025b15..95368db 100755 (executable)
@@ -79,7 +79,7 @@ namespace TVApps
                     SizeUtils.SetModelName(modelName);
                 }
             }
-            catch(Exception e)
+            catch (Exception e)
             {
                 DebuggingUtils.Err("Cant get model name!!!, " + e.Message);
             }
index 7258f50..26b0020 100755 (executable)
@@ -166,7 +166,7 @@ namespace TVApps.Views
 
             View anchor = sender as View;
 
-            popup.Show(anchor, anchor.Width/2, 0);
+            popup.Show(anchor, anchor.Width / 2, 0);
             isPopupShowing = true;
             ChangeBackKeyInfoCommand?.Execute(isPopupShowing);
         }
index 6f044fb..e00d494 100755 (executable)
@@ -336,16 +336,13 @@ namespace TVApps.Views
         {
             switch (status)
             {
-                case AppsStatus.Default:
-                    SetFocusChainingUpAndDownForDefaultMode();
-                    break;
                 case AppsStatus.Pin:
                     SetFocusChainingUpAndDownForPinMode();
                     break;
                 case AppsStatus.Delete:
                     SetFocusChainingUpAndDownForDeleteMode();
                     break;
-                case AppsStatus.LongPress:
+                default:
                     SetFocusChainingUpAndDownForDefaultMode();
                     break;
             }
@@ -374,6 +371,7 @@ namespace TVApps.Views
                     {
                         AppList.InitializeFocus();
                     }
+
                     break;
                 case AppsStatus.Pin:
                     FooterNormal.IsVisible = false;
index 697ad7f..0c277f6 100644 (file)
@@ -182,7 +182,7 @@ namespace CoreApp
 
             try
             {
-                InterOp.sniper_init(nativeWindow, callbacks, storagePath, imageWidth, imageHeight);
+                InterOp.Sniper_init(nativeWindow, callbacks, storagePath, imageWidth, imageHeight);
             }
             catch (DllNotFoundException e)
             {
@@ -196,7 +196,7 @@ namespace CoreApp
         {
             try
             {
-                InterOp.sniper_fini();
+                InterOp.Sniper_fini();
             }
             catch (DllNotFoundException e)
             {
@@ -210,7 +210,7 @@ namespace CoreApp
         {
             try
             {
-                InterOp.sniper_request_update(instanceId);
+                InterOp.Sniper_request_update(instanceId);
             }
             catch (DllNotFoundException e)
             {
index ed27a86..1f88d25 100644 (file)
@@ -3,6 +3,9 @@ using System.Runtime.InteropServices;
 
 namespace CoreApp
 {
+    /// <summary>
+    /// TODO : Comment this
+    /// </summary>
     internal static partial class InterOp
     {
         [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
@@ -22,13 +25,13 @@ namespace CoreApp
         }
 
         [DllImport("sniper", CharSet = CharSet.Ansi)]
-        internal static extern int sniper_init(IntPtr win, SniperCallback callbacks, string path, int w, int h);
+        internal static extern int Sniper_init(IntPtr win, SniperCallback callbacks, string path, int w, int h);
 
         [DllImport("sniper", CharSet = CharSet.Ansi)]
-        internal static extern int sniper_request_update(string instanceId);
+        internal static extern int Sniper_request_update(string instanceId);
 
         [DllImport("sniper", CharSet = CharSet.Ansi)]
-        internal static extern int sniper_fini();
+        internal static extern int Sniper_fini();
     }
 }
 
index 9e20c1d..40e57db 100755 (executable)
Binary files a/TVHome/TVHome.TizenTV/res/screenshot.png and b/TVHome/TVHome.TizenTV/res/screenshot.png differ
index 8541d7f..17d35e1 100755 (executable)
@@ -70,7 +70,7 @@ namespace TVHome.Views
             SubPanelDictionary[SelectedMenuName]?.ForceHidePanel();
 #pragma warning disable CS4014
             SubPanelDictionary[SelectedMenuName]?.TranslateTo(0.0, SizeUtils.GetHeightSize(100), 150);
-            SubPanelDictionary[SelectedMenuName]?.FadeTo(0,150);
+            SubPanelDictionary[SelectedMenuName]?.FadeTo(0, 150);
             DimmedBgImage.FadeTo(0.0, 150);
             PageMainPanel.TranslateTo(0.0, 0.0, 150);
 #pragma warning restore CS4014
@@ -86,7 +86,7 @@ namespace TVHome.Views
 #pragma warning disable CS4014
             SubPanelDictionary[SelectedMenuName]?.TranslateTo(0.0, 0.0, 150);
             SubPanelDictionary[SelectedMenuName]?.FadeTo(1.0, 150);
-            DimmedBgImage.FadeTo(0.5, 150);
+            DimmedBgImage.FadeTo(1, 150);
             PageMainPanel.TranslateTo(0.0, 0.0, 150);
 #pragma warning restore CS4014
             await PageMainPanel.ScaleTo(1.0, 150);
@@ -259,10 +259,11 @@ namespace TVHome.Views
 
             for (var i = 0; i < recentSubPanelButtons.Count; i++)
             {
-                if(i != 0)
+                if (i != 0)
                 {
                     recentSubPanelButtons[i].FindByName<Button>("ButtonFocusArea").On<Tizen>().SetNextFocusLeftView(recentSubPanelButtons[i - 1].FindByName<Button>("ButtonFocusArea"));
                 }
+
                 if (i != recentSubPanelButtons.Count - 1)
                 {
                     recentSubPanelButtons[i].FindByName<Button>("ButtonFocusArea").On<Tizen>().SetNextFocusRightView(recentSubPanelButtons[i + 1].FindByName<Button>("ButtonFocusArea"));
@@ -288,6 +289,7 @@ namespace TVHome.Views
                 {
                     appsSubPanelButtons[i].FindByName<Button>("ButtonFocusArea").On<Tizen>().SetNextFocusLeftView(appsSubPanelButtons[i - 1].FindByName<Button>("ButtonFocusArea"));
                 }
+
                 if (i != appsSubPanelButtons.Count - 1)
                 {
                     appsSubPanelButtons[i].FindByName<Button>("ButtonFocusArea").On<Tizen>().SetNextFocusRightView(appsSubPanelButtons[i + 1].FindByName<Button>("ButtonFocusArea"));
index d3ae466..af98020 100755 (executable)
@@ -183,8 +183,10 @@ namespace TVHome.Views
                 button.OnClickedCommand = new Command(() =>
                 {
                     item.DoAction();
-                    if(!item.StateDescriptions["default"].Label.Equals("Add pin"))
+                    if (!item.StateDescriptions["default"].Label.Equals("Add pin"))
+                    {
                         OnItemClickEventHandler?.Invoke();
+                    }
                 });
                 button.OnUnpinCommand = new Command(() =>
                 {
@@ -235,6 +237,7 @@ namespace TVHome.Views
         /// A method is called when apps subpanel is changed to move mode and change item's IsEnabled property.
         /// </summary>
         /// <param name="selectedBtn">A selected button view to move</param>
+        /// <param name="isEnabled">TODO : Comment this</param>
         private void ChangeIsEnabledProperty(View selectedBtn, bool isEnabled)
         {
             foreach (var item in PanelButtonStack.Children)
@@ -364,6 +367,7 @@ namespace TVHome.Views
         /// A method for moving the selected item to right
         /// </summary>
         /// <param name="index">A index of item to be moved</param>
+        /// <param name="button">TODO : Comment this</param>
         private void MoveItemToRight(int index, PanelButton button)
         {
             var btn = button as SubPanelButton;
@@ -395,7 +399,7 @@ namespace TVHome.Views
             animation.Add(0.5, 1, nextScaleUp);
             animation.Add(0, 1, nextTranslate);
 
-            animation.Commit(this, "MoveRightAnimation", 16, 334, null, (v, c)=> btn.rightMoving = false);
+            animation.Commit(this, "MoveRightAnimation", 16, 334, null, (v, c) => btn.rightMoving = false);
 
             if (SizeUtils.GetWidthSize((int)(originItemView.X + translateX + 216)) - SizeUtils.GetWidthSize((int)PanelScrollView.ScrollX) > SizeUtils.GetWidthSize(1920))
             {
@@ -410,6 +414,7 @@ namespace TVHome.Views
         /// A method for moving the selected item to left
         /// </summary>
         /// <param name="index">A index of item to be moved</param>
+        /// <param name="button">TODO : Comment this</param>
         private void MoveItemToLeft(int index, PanelButton button)
         {
             var btn = button as SubPanelButton;
@@ -442,7 +447,7 @@ namespace TVHome.Views
             animation.Add(0.5, 1, prevScaleUp);
             animation.Add(0, 1, prevTranslate);
 
-            animation.Commit(this, "MoveLeftAnimation", 16, 334, null, (v,c)=> btn.leftMoving = false);
+            animation.Commit(this, "MoveLeftAnimation", 16, 334, null, (v, c) => btn.leftMoving = false);
 
             if (SizeUtils.GetWidthSize((int)(originItemView.X + translateX)) - SizeUtils.GetWidthSize((int)PanelScrollView.ScrollX) < 0)
             {
@@ -459,6 +464,7 @@ namespace TVHome.Views
             {
                 item.FindByName<Image>("ButtonDimmedImage").Opacity = 0.99;
             }
+
             TranslationY = selectTransitionHeight;
             Opacity = 1;
         }
index 7a06aea..f951f35 100755 (executable)
@@ -241,6 +241,7 @@ namespace TVHome.Views
             {
                 item.FindByName<Xamarin.Forms.Image>("ThumnailDimLayer").Opacity = 0;
             }
+
             isFocused = true;
             var button = PanelButtonStack.Children[0];
             button.FindByName<Button>("ButtonFocusArea").Focus();
@@ -258,6 +259,7 @@ namespace TVHome.Views
                 item.IsEnabled = true;
                 item.FindByName<Xamarin.Forms.Image>("ThumnailDimLayer").Opacity = 1;
             }
+
             this.TranslationY = selectTransitionHeight;
             Opacity = 1;
         }