The task will run in the different thread.
Change-Id: I70b3b50ddac0c01fc160edaada313c38efcab7e0
Signed-off-by: Sung-jae Park <nicesj@nicesj.com>
# Visual Studio 15
VisualStudioVersion = 15.0.26730.12
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TVMediaHub.Tizen", "TVMediaHub\TVMediaHub.Tizen\TVMediaHub.Tizen.csproj", "{2C968D00-4043-4202-9060-36C831AE6784}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TVMediaHub.Tizen", "TVMediaHub\TVMediaHub.Tizen\TVMediaHub.Tizen.csproj", "{2C968D00-4043-4202-9060-36C831AE6784}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
+ Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
+ Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2C968D00-4043-4202-9060-36C831AE6784}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2C968D00-4043-4202-9060-36C831AE6784}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2C968D00-4043-4202-9060-36C831AE6784}.Debug|x86.ActiveCfg = Debug|x86
+ {2C968D00-4043-4202-9060-36C831AE6784}.Debug|x86.Build.0 = Debug|x86
{2C968D00-4043-4202-9060-36C831AE6784}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2C968D00-4043-4202-9060-36C831AE6784}.Release|Any CPU.Build.0 = Release|Any CPU
+ {2C968D00-4043-4202-9060-36C831AE6784}.Release|x86.ActiveCfg = Release|x86
+ {2C968D00-4043-4202-9060-36C831AE6784}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
/// <param name="mediaInformationExList">A list of MediaInformationEx</param>
/// <param name="sortOption">The current sort option</param>
/// <returns>A list of group item</returns>
-#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously
private async Task<IEnumerable<GroupItem>> MakeGroupAsync(IEnumerable<MediaInformationEx> mediaInformationExList, SortOption sortOption)
-#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously
{
- DbgPort.D("MG Async");
- List<GroupItem> result = new List<GroupItem>();
- GroupItem lastGroupItem = null;
- GroupItem currentGroupItem = null;
-
- if (mediaInformationExList == null)
- {
- throw new System.ArgumentException("mediaInformationExList must not be null.");
- }
-
- foreach (MediaInformationEx mediaInformationEx in mediaInformationExList)
+ return await Task.Run(() =>
{
- var currentInformation = mediaInformationEx;
- var shortcutInfo = new MediaShortcutInfo(currentInformation);
+ DbgPort.D("MG Async");
+ List<GroupItem> result = new List<GroupItem>();
+ GroupItem lastGroupItem = null;
+ GroupItem currentGroupItem = null;
- // TODO : The catch implementation should be checked once again.
- try
+ if (mediaInformationExList == null)
{
- currentGroupItem = GetGroupItem(sortOption, currentGroupItem, mediaInformationEx);
- }
- catch (Exception e)
- {
- DbgPort.E(e.Message);
- return null;
+ throw new System.ArgumentException("mediaInformationExList must not be null.");
}
- if (lastGroupItem != currentGroupItem)
+ foreach (MediaInformationEx mediaInformationEx in mediaInformationExList)
{
- result.Add(currentGroupItem);
- lastGroupItem = currentGroupItem;
- }
+ var currentInformation = mediaInformationEx;
+ var shortcutInfo = new MediaShortcutInfo(currentInformation);
- if (currentGroupItem != null)
- {
- currentGroupItem.Contents.Add(shortcutInfo);
+ // TODO : The catch implementation should be checked once again.
+ try
+ {
+ currentGroupItem = GetGroupItem(sortOption, currentGroupItem, mediaInformationEx);
+ }
+ catch (Exception e)
+ {
+ DbgPort.E(e.Message);
+ return null;
+ }
+
+ if (lastGroupItem != currentGroupItem)
+ {
+ result.Add(currentGroupItem);
+ lastGroupItem = currentGroupItem;
+ }
+
+ if (currentGroupItem != null)
+ {
+ currentGroupItem.Contents.Add(shortcutInfo);
+ }
}
- }
- return result;
+ return result;
+ });
}
/// <summary>
<!-- Setting Tizen Extension Path -->
<PropertyGroup Label="Globals">
<TizenProjectExtensionsPath>$(MSBuildExtensionsPath)\Tizen\VisualStudio\</TizenProjectExtensionsPath>
+ <Platforms>AnyCPU;x86</Platforms>
</PropertyGroup>
<!-- Import Tizen property in Tizen.NET SDK -->
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>portable</DebugType>
</PropertyGroup>
+
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
+ <DebugType>portable</DebugType>
+ </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>None</DebugType>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x86'">
+ <DebugType>None</DebugType>
+ </PropertyGroup>
<PropertyGroup>
<NoWarn>$(NoWarn);NU1605</NoWarn>
<RelativeLayout xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TVMediaHub.Tizen.Views.ImageGroup"
- ItemsSource="{Binding Contents}">
+ ItemsSource="{Binding Contents}">
<Button x:Name="TitleFocusArea" Opacity ="0"
RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.085}"/>
{
if (ev.PropertyName.Equals("X"))
{
- galleryGroup.BottomFocusList.ForEach((item) =>
+ Console.WriteLine("Group X: {0} {1}", galleryGroup.X, galleryGroup);
+
+ if (galleryGroup.X > 0)
{
- var key = galleryGroup.X + item.Key;
- BottomButtonList.Add(new KeyValuePair<double, Button>(key, item.Value));
- });
+ galleryGroup.BottomFocusList.ForEach((item) =>
+ {
+ var key = galleryGroup.X + item.Key;
+ BottomButtonList.Add(new KeyValuePair<double, Button>(key, item.Value));
+ });
- SetFooterFocusChain(0);
+ SetFooterFocusChain(0);
+ }
}
};
var FocusableBoundFrom = scrollX;
var FocusableBoundTo = scrollX + SizeUtils.BaseScreenWidth - ItemWidth;
- var list = BottomButtonList.FindAll((pair) =>
- {
- return (pair.Key >= FocusableBoundFrom && pair.Key <= FocusableBoundTo);
- });
+ var list = BottomButtonList.FindAll((pair) => (pair.Key >= FocusableBoundFrom && pair.Key <= FocusableBoundTo));
+
+ string what = "The number of filtered objects is " + list?.Count + "(" + FocusableBoundFrom + ")" + "(" + FocusableBoundTo + ")";
+ Console.WriteLine(what);
for (var buttonIndex = 0; buttonIndex < list.Count; buttonIndex++)
{
{
string storageName = e.SelectedItem as string;
- //BottomButtonList.Clear();
+ // BottomButtonList.Clear();
ChangeSourceCommand?.Execute(storageName);
- //SetFooterFocusChain(ImageTabScrollView.ScrollX);
+ // FocusChain(ImageTabScrollView.ScrollX);
}
/// <summary>