diff options
author | Heonjae Jang <heonjae.jang@samsung.com> | 2017-05-16 15:41:50 +0900 |
---|---|---|
committer | ChulSeung Kim <charles0.kim@samsung.com> | 2017-06-08 18:34:56 +0900 |
commit | 340d7dd87d65c3408a8ad832d609d650940459fa (patch) | |
tree | 2bd0c2144c1daf90311422f2aa9f2a432145b587 /TVHome | |
parent | 08c0b81d7dd0121e35a35013b772fd4c81940de4 (diff) | |
download | home-340d7dd87d65c3408a8ad832d609d650940459fa.tar.gz home-340d7dd87d65c3408a8ad832d609d650940459fa.tar.bz2 home-340d7dd87d65c3408a8ad832d609d650940459fa.zip |
Check Code format(StyleCop), Svace
Change-Id: I30867ff49b7e28653470a9661a5b1bb7d878e710
Signed-off-by: Heonjae Jang <heonjae.jang@samsung.com>
Diffstat (limited to 'TVHome')
-rw-r--r-- | TVHome/TVHome.TizenTV/Sniper.cs | 6 | ||||
-rw-r--r-- | TVHome/TVHome.TizenTV/SniperInterOp.cs | 9 | ||||
-rwxr-xr-x | TVHome/TVHome.TizenTV/res/screenshot.png | bin | 4757 -> 71981 bytes | |||
-rwxr-xr-x | TVHome/TVHome/Views/MainPage.xaml.cs | 8 | ||||
-rwxr-xr-x | TVHome/TVHome/Views/SubPanel.xaml.cs | 12 | ||||
-rwxr-xr-x | TVHome/TVHome/Views/SubThumbnailPanel.xaml.cs | 2 |
6 files changed, 25 insertions, 12 deletions
diff --git a/TVHome/TVHome.TizenTV/Sniper.cs b/TVHome/TVHome.TizenTV/Sniper.cs index 697ad7f..0c277f6 100644 --- a/TVHome/TVHome.TizenTV/Sniper.cs +++ b/TVHome/TVHome.TizenTV/Sniper.cs @@ -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) { diff --git a/TVHome/TVHome.TizenTV/SniperInterOp.cs b/TVHome/TVHome.TizenTV/SniperInterOp.cs index ed27a86..1f88d25 100644 --- a/TVHome/TVHome.TizenTV/SniperInterOp.cs +++ b/TVHome/TVHome.TizenTV/SniperInterOp.cs @@ -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(); } } diff --git a/TVHome/TVHome.TizenTV/res/screenshot.png b/TVHome/TVHome.TizenTV/res/screenshot.png Binary files differindex 9e20c1d..40e57db 100755 --- a/TVHome/TVHome.TizenTV/res/screenshot.png +++ b/TVHome/TVHome.TizenTV/res/screenshot.png diff --git a/TVHome/TVHome/Views/MainPage.xaml.cs b/TVHome/TVHome/Views/MainPage.xaml.cs index 8541d7f..17d35e1 100755 --- a/TVHome/TVHome/Views/MainPage.xaml.cs +++ b/TVHome/TVHome/Views/MainPage.xaml.cs @@ -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")); diff --git a/TVHome/TVHome/Views/SubPanel.xaml.cs b/TVHome/TVHome/Views/SubPanel.xaml.cs index d3ae466..af98020 100755 --- a/TVHome/TVHome/Views/SubPanel.xaml.cs +++ b/TVHome/TVHome/Views/SubPanel.xaml.cs @@ -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; } diff --git a/TVHome/TVHome/Views/SubThumbnailPanel.xaml.cs b/TVHome/TVHome/Views/SubThumbnailPanel.xaml.cs index 7a06aea..f951f35 100755 --- a/TVHome/TVHome/Views/SubThumbnailPanel.xaml.cs +++ b/TVHome/TVHome/Views/SubThumbnailPanel.xaml.cs @@ -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; } |