}
[XmlIgnore]
- private bool isFocused { get; set; }
+ private bool isFocused;
[XmlIgnore]
public bool IsFocused
{
Label = "Settings",
IconPath = "ic_tizen_home_menu_settings_selected.png",
- Action = new AppControlAction() {
+ Action = new AppControlAction()
+ {
AppID = "org.tizen.settings"
},
}
internal delegate bool EcoreEventHanlderCallback(IntPtr data, int type, IntPtr ei);
[DllImport("libelementary.so.1", EntryPoint = "elm_win_keygrab_set", CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr elm_win_keygrab_set(IntPtr obj, string key, ulong modifiers, ulong not_modifiers, int proirity, int grab_mode);
+ internal static extern IntPtr Elm_win_keygrab_set(IntPtr obj, string key, ulong modifiers, ulong not_modifiers, int proirity, int grab_mode);
[DllImport("libelementary.so.1", EntryPoint = "elm_win_iconified_set", CallingConvention = CallingConvention.Cdecl)]
- internal static extern void elm_win_iconified_set(IntPtr obj, bool iconified);
+ internal static extern void Elm_win_iconified_set(IntPtr obj, bool iconified);
[DllImport("libelementary.so.1", EntryPoint = "elm_win_iconified_get", CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool elm_win_iconified_get(IntPtr obj);
+ internal static extern bool Elm_win_iconified_get(IntPtr obj);
}
public static void SetKeyGrabExclusively(IntPtr window, string key)
{
DebuggingPort.D("Grab Key Event for :" + key);
- Elm.elm_win_keygrab_set(window, key, 0, 0, 0, 1024);
+ Elm.Elm_win_keygrab_set(window, key, 0, 0, 0, 1024);
}
public static void SetIconified(IntPtr window, bool iconified)
{
DebuggingPort.D("Iconified :" + iconified);
- Elm.elm_win_iconified_set(window, iconified);
+ Elm.Elm_win_iconified_set(window, iconified);
}
public static bool GetIconified(IntPtr window)
{
- return Elm.elm_win_iconified_get(window);
+ return Elm.Elm_win_iconified_get(window);
}
}
}
get;
private set;
}
+
private void CallbackForKeyGrab(Object state)
{
MainWindow.KeyGrab(ElmSharp.EvasKeyEventArgs.PlatformMenuButtonName, true);
}
else if (e.PropertyName.CompareTo("IsShowOptions") == 0)
{
- changeDefaultIconSize();
+ ChangeDefaultIconSize();
if (IsShowOptions)
{
}
}
- public void changeDefaultIconSize()
+ public void ChangeDefaultIconSize()
{
ButtonImage.ScaleTo(1.0, 50);
ButtonImage.TranslateTo(0.0, 0.0, 100);
public void ShowOptionMenu()
{
- changeDefaultIconSize();
+ ChangeDefaultIconSize();
ButtonImage.TranslateTo(0, -90, 100);
TextArea.TranslateTo(0, -90, 100);
public void HideOptionMenu()
{
- changeDefaultIconSize();
+ ChangeDefaultIconSize();
ButtonImage.TranslateTo(0, 0, 100);
TextArea.TranslateTo(0, 0, 100);
AppCount = AppCount + 1;
}
//}
-
- InitializeFocus();
}
private async void ScrollToIndex(int index)
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\LibTVRefCommonPortable\LibTVRefCommonPortable.csproj">
- <Project>{67F9D3A8-F71E-4428-913F-C37AE82CDB24}</Project>
- <Name>LibTVRefCommonPortable</Name>
- </ProjectReference>
- </ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Views\FooterDeleteStatus.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\LibTVRefCommonPortable\LibTVRefCommonPortable.csproj">
+ <Project>{67f9d3a8-f71e-4428-913f-c37ae82cdb24}</Project>
+ <Name>LibTVRefCommonPortable</Name>
+ </ProjectReference>
+ </ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
<Import Project="..\..\packages\Xamarin.Forms.2.3.3.193\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets" Condition="Exists('..\..\packages\Xamarin.Forms.2.3.3.193\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
{
item.IsDim = true;
}
+
break;
case AppsStatus.Delete:
item.IsChecked = false;
x:Class="TVApps.Views.MainPage"
BackgroundColor="#000000"
CurrentStatus="{Binding CurrentStatus}">
- <ContentPage.BindingContext>
- <ViewModels:MainPageViewModel />
- </ContentPage.BindingContext>
+ <ContentPage.BindingContext>
+ <ViewModels:MainPageViewModel />
+ </ContentPage.BindingContext>
- <ContentPage.Resources>
- <ResourceDictionary>
- <Style x:Key="titleText" TargetType="Label" >
- <Setter Property="FontSize" Value="187" />
- <Setter Property="TextColor" Value="#FFFFFF" />
- <Setter Property="FontFamily" Value="Breeze Sans Regular" />
- </Style>
- <Style x:Key="backKeyInfoText" TargetType="Label" >
- <Setter Property="FontSize" Value="62" />
- <Setter Property="TextColor" Value="#99FFFFFF" />
- <Setter Property="FontFamily" Value="Breeze Sans Regular" />
- </Style>
- <Style x:Key="buttonTextNormal" TargetType="Label" >
- <Setter Property="FontSize" Value="62" />
- <Setter Property="TextColor" Value="#F7F7F7" />
- <Setter Property="FontFamily" Value="Breeze Sans Regular" />
- </Style>
- <Style x:Key="buttonTextPressed" TargetType="Label" >
- <Setter Property="FontSize" Value="62" />
- <Setter Property="TextColor" Value="#F7F7F708" />
- <Setter Property="FontFamily" Value="Breeze Sans Regular" />
- </Style>
- <Style x:Key="pinnedText" TargetType="Label" >
- <Setter Property="FontSize" Value="50" />
- <Setter Property="TextColor" Value="#F7F7F7" />
- <Setter Property="FontFamily" Value="Breeze Sans Regular" />
- </Style>
+ <ContentPage.Resources>
+ <ResourceDictionary>
+ <Style x:Key="titleText" TargetType="Label" >
+ <Setter Property="FontSize" Value="187" />
+ <Setter Property="TextColor" Value="#FFFFFF" />
+ <Setter Property="FontFamily" Value="Breeze Sans Regular" />
+ </Style>
+ <Style x:Key="backKeyInfoText" TargetType="Label" >
+ <Setter Property="FontSize" Value="62" />
+ <Setter Property="TextColor" Value="#99FFFFFF" />
+ <Setter Property="FontFamily" Value="Breeze Sans Regular" />
+ </Style>
+ <Style x:Key="buttonTextNormal" TargetType="Label" >
+ <Setter Property="FontSize" Value="62" />
+ <Setter Property="TextColor" Value="#F7F7F7" />
+ <Setter Property="FontFamily" Value="Breeze Sans Regular" />
+ </Style>
+ <Style x:Key="buttonTextPressed" TargetType="Label" >
+ <Setter Property="FontSize" Value="62" />
+ <Setter Property="TextColor" Value="#F7F7F708" />
+ <Setter Property="FontFamily" Value="Breeze Sans Regular" />
+ </Style>
+ <Style x:Key="pinnedText" TargetType="Label" >
+ <Setter Property="FontSize" Value="50" />
+ <Setter Property="TextColor" Value="#F7F7F7" />
+ <Setter Property="FontFamily" Value="Breeze Sans Regular" />
+ </Style>
- <Style x:Key="button" TargetType="Button">
- <Setter Property="BorderColor" Value="#FFFFFF"/>
- <Setter Property="HeightRequest" Value="40"/>
- <Setter Property="BorderWidth" Value="2" />
- <Setter Property="HorizontalOptions" Value="Center"/>
- <Setter Property="BackgroundColor" Value="Transparent"/>
- </Style>
- </ResourceDictionary>
- </ContentPage.Resources>
+ <Style x:Key="button" TargetType="Button">
+ <Setter Property="BorderColor" Value="#FFFFFF"/>
+ <Setter Property="HeightRequest" Value="40"/>
+ <Setter Property="BorderWidth" Value="2" />
+ <Setter Property="HorizontalOptions" Value="Center"/>
+ <Setter Property="BackgroundColor" Value="Transparent"/>
+ </Style>
+ </ResourceDictionary>
+ </ContentPage.Resources>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="95*" />
- <RowDefinition Height="329*" />
- <RowDefinition Height="52*" />
- <RowDefinition Height="64*" />
- </Grid.RowDefinitions>
- <Grid.RowSpacing>0</Grid.RowSpacing>
- <Grid.ColumnSpacing>0</Grid.ColumnSpacing>
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="95*" />
+ <RowDefinition Height="329*" />
+ <RowDefinition Height="52*" />
+ <RowDefinition Height="64*" />
+ </Grid.RowDefinitions>
+ <Grid.RowSpacing>0</Grid.RowSpacing>
+ <Grid.ColumnSpacing>0</Grid.ColumnSpacing>
- <Label Grid.Row="0"
- Style="{StaticResource titleText}"
- HorizontalTextAlignment="Center"
- VerticalOptions="CenterAndExpand"
- HorizontalOptions="CenterAndExpand"
- Text="APPS" />
+ <Label Grid.Row="0"
+ Style="{StaticResource titleText}"
+ HorizontalTextAlignment="Center"
+ VerticalOptions="CenterAndExpand"
+ HorizontalOptions="CenterAndExpand"
+ Text="APPS" />
- <Grid Grid.Row="0">
- <Grid.RowDefinitions>
- <RowDefinition Height="37*" />
- <RowDefinition Height="34*" />
- <RowDefinition Height="29*" />
- </Grid.RowDefinitions>
+ <Grid Grid.Row="0">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="37*" />
+ <RowDefinition Height="34*" />
+ <RowDefinition Height="29*" />
+ </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="891*" />
- <ColumnDefinition Width="58*" />
- <ColumnDefinition Width="50*" />
- </Grid.ColumnDefinitions>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="891*" />
+ <ColumnDefinition Width="58*" />
+ <ColumnDefinition Width="50*" />
+ </Grid.ColumnDefinitions>
- <!-- TODO: This StackLayout is temporary code for Long Press test -->
- <Button Grid.Row="0" Grid.Column="1"
- Style="{StaticResource button}"
- Command="{Binding SetLongPressCommand}"
- CommandParameter="org.tizen.example.TVHome.TizenTV"
- VerticalOptions="FillAndExpand"
- HorizontalOptions="FillAndExpand"/>
- <Button Grid.Row="2" Grid.Column="1"
- Style="{StaticResource button}"
- Command="{Binding UnSetLongPressCommand}"
- VerticalOptions="FillAndExpand"
- HorizontalOptions="FillAndExpand"/>
+ <!-- TODO: This StackLayout is temporary code for Long Press test -->
+ <Button Grid.Row="0" Grid.Column="1"
+ Style="{StaticResource button}"
+ Command="{Binding SetLongPressCommand}"
+ CommandParameter="org.tizen.example.TVHome.TizenTV"
+ VerticalOptions="FillAndExpand"
+ HorizontalOptions="FillAndExpand"/>
+ <Button Grid.Row="2" Grid.Column="1"
+ Style="{StaticResource button}"
+ Command="{Binding UnSetLongPressCommand}"
+ VerticalOptions="FillAndExpand"
+ HorizontalOptions="FillAndExpand"/>
- <StackLayout Grid.Row="1" Grid.Column="1"
- Grid.ColumnSpan="2"
- VerticalOptions="FillAndExpand"
- HorizontalOptions="StartAndExpand"
- Orientation="Horizontal">
- <Image Source="ic_tizen_apps_additional_back.png"
- WidthRequest="40"
- HeightRequest="40"
- VerticalOptions="Center"/>
- <Label x:Name="BackKeyInfo"
- Style="{StaticResource backKeyInfoText}"
- Margin="6, 0, 0, 0"
- VerticalOptions="Center"
- HorizontalOptions="End"
- HorizontalTextAlignment="Start" />
- </StackLayout>
- </Grid>
+ <StackLayout Grid.Row="1" Grid.Column="1"
+ Grid.ColumnSpan="2"
+ VerticalOptions="FillAndExpand"
+ HorizontalOptions="StartAndExpand"
+ Orientation="Horizontal">
+ <Image Source="ic_tizen_apps_additional_back.png"
+ WidthRequest="40"
+ HeightRequest="40"
+ VerticalOptions="Center"/>
+ <Label x:Name="BackKeyInfo"
+ Style="{StaticResource backKeyInfoText}"
+ Margin="6, 0, 0, 0"
+ VerticalOptions="Center"
+ HorizontalOptions="End"
+ HorizontalTextAlignment="Start" />
+ </StackLayout>
+ </Grid>
+
+ <Controls:AppListView x:Name="AppList"
+ Grid.Row="1"
+ ItemsSource="{Binding InstalledAppList}">
+ <Controls:AppListView.ItemTemplate>
+ <DataTemplate>
+ <Controls:AppItemCell/>
+ </DataTemplate>
+ </Controls:AppListView.ItemTemplate>
+ </Controls:AppListView>
- <Controls:AppListView x:Name="AppList"
- Grid.Row="1"
- ItemsSource="{Binding InstalledAppList}">
- <Controls:AppListView.ItemTemplate>
- <DataTemplate>
- <Controls:AppItemCell/>
- </DataTemplate>
- </Controls:AppListView.ItemTemplate>
- </Controls:AppListView>
+ <Views:FooterNormalStatus Grid.Row="3"
+ x:Name="FooterNormal"
+ IsVisible="true" />
- <Views:FooterNormalStatus Grid.Row="3"
- x:Name="FooterNormal"
- IsVisible="true" />
+ <Views:FooterPinStatus Grid.Row="3"
+ x:Name="FooterPin"
+ IsVisible="false" />
- <Views:FooterPinStatus Grid.Row="3"
- x:Name="FooterPin"
- IsVisible="false" />
+ <Views:FooterDeleteStatus Grid.Row="3"
+ x:Name="FooterDelete"
+ IsVisible="false" />
- <Views:FooterDeleteStatus Grid.Row="3"
- x:Name="FooterDelete"
- IsVisible="false" />
- </Grid>
+ <BoxView x:Name="PageDimBox"
+ Color="Black"
+ Grid.Row="0"
+ Grid.RowSpan="4"
+ Grid.Column="0"
+ Opacity="0.99"/>
+ </Grid>
</ContentPage>
\ No newline at end of file
namespace TVApps.Views
{
/// <summary>
- /// hahaha
+ /// Root Page of TV Apps Application
/// </summary>
public partial class MainPage : ContentPage
{
set { SetValue(CurrentStatusProperty, value); }
}
+ private async void PlayHideAnimation()
+ {
+ // TODO : Apps Out Animation.
+ }
+
+ private async void PlayShowAnimation()
+ {
+ await AppList.TranslateTo(0, 12, 0);
+ AppList.TranslateTo(0, 0, 667);
+ await PageDimBox.FadeTo(0.0, 667);
+ PageDimBox.IsVisible = false;
+ await Task.Delay(1);
+ AppList.InitializeFocus();
+ }
+
public MainPage()
{
InitializeComponent();
PropertyChanged += MainPage_PropertyChanged;
SetCurrntStatus(AppsStatus.Default);
+ PlayShowAnimation();
// TODO: This code is temporary for menu option test
App.SetMenuKeyListener((e, arg) =>
set { SetValue(StatusProperty, value); }
}
+ private Animation SelectedAnimation;
+ private Animation[] SelectedAnimationFrames;
+
public MainPanelButton()
{
InitializeComponent();
PropertyChanged += MainPanelButton_PropertyChanged;
}
- private async void MainPanelButton_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
+ private void SetSelecetedAnimation()
+ {
+ SelectedAnimation = new Animation();
+ SelectedAnimationFrames = new Animation[10];
+ SelectedAnimationFrames[0] = new Animation((v) =>
+ {
+ ButtonBlurImage.Opacity = 0.99;
+ });
+
+ for (int i = 1; i <= 8; i++)
+ {
+ var index = i;
+ SelectedAnimationFrames[i] = new Animation((v) =>
+ {
+ DebuggingUtils.Dbg("" + index);
+ ButtonBlurImage.Source = "home_icon_bg_0" + index + ".png";
+ });
+ }
+
+ SelectedAnimationFrames[9] = new Animation((v) =>
+ {
+ ButtonBlurImage.Opacity = 0;
+ ButtonBgImage.Opacity = 0;
+ ButtonTitle.Opacity = 0;
+ ButtonBlurImage.Source = "home_icon_bg_01.png";
+ });
+
+ SelectedAnimation.Add(0.000, 0.001, SelectedAnimationFrames[0]);
+ SelectedAnimation.Add(0.111, 0.112, SelectedAnimationFrames[1]);
+ SelectedAnimation.Add(0.222, 0.223, SelectedAnimationFrames[2]);
+ SelectedAnimation.Add(0.333, 0.334, SelectedAnimationFrames[3]);
+ SelectedAnimation.Add(0.444, 0.445, SelectedAnimationFrames[4]);
+ SelectedAnimation.Add(0.555, 0.556, SelectedAnimationFrames[5]);
+ SelectedAnimation.Add(0.666, 0.667, SelectedAnimationFrames[6]);
+ SelectedAnimation.Add(0.777, 0.778, SelectedAnimationFrames[7]);
+ SelectedAnimation.Add(0.888, 0.889, SelectedAnimationFrames[8]);
+ SelectedAnimation.Add(0.999, 1.000, SelectedAnimationFrames[9]);
+ }
+
+ private void MainPanelButton_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
if (e.PropertyName.CompareTo("Status") == 0)
{
switch (Status)
{
case "selected":
- await ButtonBlurImage.FadeTo(0.99, 1);
- uint delay = 10;
- ButtonBlurImage.Source = "home_icon_bg_01.png";
- await ButtonBgImage.FadeTo(0.875, delay);
-
- ButtonBlurImage.Source = "home_icon_bg_02.png";
- await ButtonBgImage.FadeTo(0.750, delay);
-
- ButtonBlurImage.Source = "home_icon_bg_03.png";
- await ButtonBgImage.FadeTo(0.625, delay);
-
- ButtonBlurImage.Source = "home_icon_bg_04.png";
- await ButtonBgImage.FadeTo(0.500, delay);
-
- ButtonBlurImage.Source = "home_icon_bg_05.png";
- await ButtonBgImage.FadeTo(0.375, delay);
-
- ButtonBlurImage.Source = "home_icon_bg_06.png";
- await ButtonBgImage.FadeTo(0.250, delay);
-
- ButtonBlurImage.Source = "home_icon_bg_07.png";
- await ButtonBgImage.FadeTo(0.125, delay);
-
- ButtonBlurImage.Source = "home_icon_bg_08.png";
- await ButtonBgImage.FadeTo(0.125, delay);
- ButtonBgImage.FadeTo(0.0, 1);
- ButtonTitle.FadeTo(0.0, 1);
- await ButtonBlurImage.FadeTo(0.0, 1);
- ButtonBlurImage.Source = "home_icon_bg_01.png";
+ SetSelecetedAnimation();
+ SelectedAnimation.Commit(ButtonBlurImage, "SelectedAnimation", 16, 300);
break;
case "focused":
ButtonTitle.FadeTo(0.8, 100);
ButtonBgImage.FadeTo(0.99, 100);
ButtonBgImage.ScaleTo(1.0, 100);
ButtonBlurImage.ScaleTo(1.0, 100);
- await View.FadeTo(0.6, 100);
+ View.FadeTo(0.6, 100);
break;
default:
ButtonTitle.FadeTo(0, 100);
ButtonBgImage.FadeTo(0, 100);
ButtonBgImage.ScaleTo(0.01, 100);
ButtonBlurImage.ScaleTo(0.01, 100);
- await View.FadeTo(0.3, 100);
+ View.FadeTo(0.3, 100);
break;
}
#pragma warning restore CS4014
<SubType>Designer</SubType>\r
</EmbeddedResource>\r
</ItemGroup>\r
- <ItemGroup>\r
- <ProjectReference Include="..\..\LibTVRefCommonPortable\LibTVRefCommonPortable.csproj">\r
- <Project>{67f9d3a8-f71e-4428-913f-c37ae82cdb24}</Project>\r
- <Name>LibTVRefCommonPortable</Name>\r
- </ProjectReference>\r
- </ItemGroup>\r
<ItemGroup>\r
<EmbeddedResource Include="Controls\SubPanelReservedButton.xaml">\r
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>\r
<SubType>Designer</SubType>\r
</EmbeddedResource>\r
</ItemGroup>\r
+ <ItemGroup>\r
+ <ProjectReference Include="..\..\LibTVRefCommonPortable\LibTVRefCommonPortable.csproj">\r
+ <Project>{67f9d3a8-f71e-4428-913f-c37ae82cdb24}</Project>\r
+ <Name>LibTVRefCommonPortable</Name>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />\r
<Import Project="..\..\packages\Xamarin.Forms.2.3.3.193\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets" Condition="Exists('..\..\packages\Xamarin.Forms.2.3.3.193\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets')" />\r
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">\r
public HomeStatus CurrentStatus { get; private set; }
public HomeMenuItem SelectedMenuName { get; private set; }
- public bool IsShowNoRecentContents { get; set;}
+ public bool IsShowNoRecentContents { get; set; }
public event PropertyChangedEventHandler PropertyChanged;
{
IsShowNoRecentContents = true;
}
+
OnPropertyChanged("IsShowNoRecentContents");
}
namespace TVHome.Views
{
/// <summary>
- /// Root Page of Application
+ /// Root Page of TV Home Application
/// </summary>
public partial class MainPage : ContentPage
{
{
PlayHideAnimation();
}
+
Iconified = !Iconified;
});
HomeMenuItem ItemName = menuIndex;
button.OnFocusedCommand = new Command(() =>
{
- PanelButtonGrid.RaiseChild(button.View);
FocusPanel();
OnFocusedCommand.Execute(ItemName);
});
index++;
menuIndex++;
}
+
PanelButtonGrid.ForceLayout();
}
get { return (bool)GetValue(ShowNoContentsInfoProperty); }
set { SetValue(ShowNoContentsInfoProperty, value); }
}
+
public SubThumbnailPanel()
{
InitializeComponent();