/// <summary>
/// The media content information
/// </summary>
- public MediaInformation MediaContentInformation;
+ public MediaInfo MediaContentInformation;
/// <summary>
/// An attribute of the availability of this media content
{
try
{
- ContentDatabase.Connect();
- ContentDatabase.ContentUpdated += ContentDatabaseContentUpdated;
+ MediaDatabase.MediaInfoUpdated += MediaDatabaseMediaUpdated;
}
catch (Exception e)
{
/// </summary>
/// <param name="sender">The source of the event</param>
/// <param name="e">A ContentUpdatedEvent arguments</param>
- private void ContentDatabaseContentUpdated(object sender, ContentUpdatedEventArgs e)
+ private void MediaDatabaseMediaUpdated(object sender, MediaInfoUpdatedEventArgs e)
{
- if (e.UpdateType == MediaContentDBUpdateType.Update)
+ if (e.OperationType == OperationType.Update)
{
MediaHubImpl.GetInstance.StorageProviderInstance.CheckStorage();
ContentUpdateFinished?.Invoke(this, null);
break;
case SortOption.Date:
- if (lastGroupItem == null || lastGroupItem.Title != GetDateString(mediaInformationEx.MediaContentInformation.TimeLine))
+ if (lastGroupItem == null || lastGroupItem.Title != GetDateString(mediaInformationEx.MediaContentInformation.Timeline.DateTime))
{
newGroupFlag = true;
- newTitle = GetDateString(mediaInformationEx.MediaContentInformation.TimeLine);
+ newTitle = GetDateString(mediaInformationEx.MediaContentInformation.Timeline.DateTime);
}
break;
break;
case SortOption.Album:
- if (lastGroupItem == null || lastGroupItem.Title != (mediaInformationEx.MediaContentInformation as AudioInformation)?.Album)
+ if (lastGroupItem == null || lastGroupItem.Title != (mediaInformationEx.MediaContentInformation as AudioInfo)?.Album)
{
newGroupFlag = true;
- newTitle = (mediaInformationEx.MediaContentInformation as AudioInformation)?.Album.ToString();
+ newTitle = (mediaInformationEx.MediaContentInformation as AudioInfo)?.Album.ToString();
}
break;
case SortOption.Artist:
- if (lastGroupItem == null || lastGroupItem.Title != (mediaInformationEx.MediaContentInformation as AudioInformation)?.Artist)
+ if (lastGroupItem == null || lastGroupItem.Title != (mediaInformationEx.MediaContentInformation as AudioInfo)?.Artist)
{
newGroupFlag = true;
- newTitle = (mediaInformationEx.MediaContentInformation as AudioInformation)?.Artist.ToString();
+ newTitle = (mediaInformationEx.MediaContentInformation as AudioInfo)?.Artist.ToString();
}
break;
public IEnumerable<MediaInformationEx> ReadWithoutGroup(SortOption sortOption, string storageId = null, int offset = -1, int count = -1)
{
// Makes Content Filter by arguments
- var contentFilter = new ContentFilter();
+ var selectArguments = new SelectArguments();
switch (sortOption)
{
case SortOption.Title:
- contentFilter.OrderKey = "MEDIA_DISPLAY_NAME";
+ selectArguments.SortOrder = "MEDIA_DISPLAY_NAME";
break;
case SortOption.Date:
- contentFilter.OrderKey = "MEDIA_RECORDED_DATE";
+ selectArguments.SortOrder = "MEDIA_RECORDED_DATE";
break;
case SortOption.Genre:
- contentFilter.OrderKey = "MEDIA_GENRE";
+ selectArguments.SortOrder = "MEDIA_GENRE";
break;
case SortOption.Type:
- contentFilter.OrderKey = "MEDIA_TYPE";
+ selectArguments.SortOrder = "MEDIA_TYPE";
break;
case SortOption.Album:
- contentFilter.OrderKey = "MEDIA_ALBUM";
+ selectArguments.SortOrder = "MEDIA_ALBUM";
break;
case SortOption.Artist:
- contentFilter.OrderKey = "MEDIA_ARTIST";
+ selectArguments.SortOrder = "MEDIA_ARTIST";
break;
default:
throw new System.ArgumentException("Invalid sorting option.");
if (offset >= 0)
{
- contentFilter.Offset = offset;
+ selectArguments.StartRowIndex = offset;
}
if (count >= 0)
{
- contentFilter.Count = count;
+ selectArguments.TotalRowCount = count;
}
if (storageId != null)
{
- contentFilter.StorageId = storageId;
+ selectArguments.StorageId = storageId;
}
- contentFilter.Condition = GetConditionStringForSelection();
-
+ selectArguments.FilterExpression = GetConditionStringForSelection();
// Executes the 'select' query
- IEnumerable<MediaInformation> mediaInformationList;
+ List<MediaInfo> mediaInformationList = new List<MediaInfo>();
List<MediaInformationEx> mediaInformationExList = new List<MediaInformationEx>();
try
{
- mediaInformationList = ContentManager.Database.SelectAll<MediaInformation>(contentFilter);
- foreach (MediaInformation mediaInformation in mediaInformationList)
+ var reader = MediaHubImpl.GetInstance.MediaInfoCommand.SelectMedia(selectArguments);
+
+ while (reader.Read())
+ {
+ mediaInformationList.Add(reader.Current);
+ }
+
+ foreach (MediaInfo mediaInformation in mediaInformationList)
{
var mediaInformationEx = new MediaInformationEx();
{
try
{
- string path = await info.Information.MediaContentInformation.CreateThumbnailAsync();
+ string path = await MediaHubImpl.GetInstance.MediaInfoCommand.CreateThumbnailAsync(info.Information.MediaContentInformation.Id);
}
catch (Exception e)
{
#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously
{
// Makes Content Filter by arguments
- var contentFilter = new ContentFilter();
+ var selectArguments = new SelectArguments();
switch (sortOption)
{
case SortOption.Title:
- contentFilter.OrderKey = "MEDIA_DISPLAY_NAME";
+ selectArguments.SortOrder = "MEDIA_DISPLAY_NAME";
break;
case SortOption.Date:
- contentFilter.OrderKey = "MEDIA_RECORDED_DATE";
+ selectArguments.SortOrder = "MEDIA_RECORDED_DATE";
break;
case SortOption.Genre:
- contentFilter.OrderKey = "MEDIA_GENRE";
+ selectArguments.SortOrder = "MEDIA_GENRE";
break;
case SortOption.Type:
- contentFilter.OrderKey = "MEDIA_TYPE";
+ selectArguments.SortOrder = "MEDIA_TYPE";
break;
case SortOption.Album:
- contentFilter.OrderKey = "MEDIA_ALBUM";
+ selectArguments.SortOrder = "MEDIA_ALBUM";
break;
case SortOption.Artist:
- contentFilter.OrderKey = "MEDIA_ARTIST";
+ selectArguments.SortOrder = "MEDIA_ARTIST";
break;
default:
throw new System.ArgumentException("Invalid sorting option.");
if (offset >= 0)
{
- contentFilter.Offset = offset;
+ selectArguments.StartRowIndex = offset;
}
if (count >= 0)
{
- contentFilter.Count = count;
+ selectArguments.TotalRowCount = count;
}
if (storageId != null)
{
- contentFilter.StorageId = storageId;
+ selectArguments.StorageId = storageId;
}
- contentFilter.Condition = GetConditionStringForSelection();
+ selectArguments.FilterExpression = GetConditionStringForSelection();
// Executes the 'select' query
+ List<MediaInfo> mediaInformationList = new List<MediaInfo>();
List<MediaInformationEx> mediaInformationExList = new List<MediaInformationEx>();
try
{
- IEnumerable<MediaInformation> mediaInformationList = ContentManager.Database.SelectAll<MediaInformation>(contentFilter);
- foreach (MediaInformation mediaInformation in mediaInformationList)
+ var reader = MediaHubImpl.GetInstance.MediaInfoCommand.SelectMedia(selectArguments);
+
+ while (reader.Read())
+ {
+ mediaInformationList.Add(reader.Current);
+ }
+
+
+ foreach (MediaInfo mediaInformation in mediaInformationList)
{
var mediaInformationEx = new MediaInformationEx();
public MediaInformationEx Read(String mediaID)
{
var mediaInformationEx = new MediaInformationEx();
- mediaInformationEx.MediaContentInformation = ContentManager.Database.Select(mediaID);
+ mediaInformationEx.MediaContentInformation = MediaHubImpl.GetInstance.MediaInfoCommand.SelectMedia(mediaID);
return mediaInformationEx;
}
{
try
{
- ContentManager.Database.Delete(media.MediaContentInformation);
+ MediaHubImpl.GetInstance.MediaInfoCommand.Delete(media.MediaContentInformation.Id);
}
catch (Exception exception)
{
{
try
{
- ContentManager.Database.Update(media.MediaContentInformation);
+ // @TODO : CHECK POINT 170824
+ //MediaHubImpl.GetInstance.MediaInfoCommand.Update(media.MediaContentInformation.Id);
}
catch (Exception exception)
{
/// <param name="mediaContent">A media content to be checked the availability</param>
protected override void CheckUnavailableContent(MediaInformationEx mediaContent)
{
- if (mediaContent.MediaContentInformation.FilePath != null)
+ if (mediaContent.MediaContentInformation.Path != null)
{
// Check 1 : The size of the image file must be less than 4MB.
- var fileInfo = new FileInfo(mediaContent.MediaContentInformation.FilePath);
+ var fileInfo = new FileInfo(mediaContent.MediaContentInformation.Path);
if (fileInfo?.Length > 8 * 1024 * 1024)
{
*/
+using Tizen.Content.MediaContent;
+
namespace TVMediaHub.Tizen.Models
{
/// <summary>
}
}
+ private MediaDatabase mediaDatabase ;
+
+ public MediaDatabase MediaDatabase
+ {
+ get
+ {
+ if (mediaDatabase == null)
+ {
+ mediaDatabase = new MediaDatabase();
+ mediaDatabase.Connect();
+ }
+ return mediaDatabase;
+ }
+ }
+
+ private static MediaInfoCommand mediaInfoCommand;
+
+ public MediaInfoCommand MediaInfoCommand
+ {
+ get
+ {
+ if (mediaInfoCommand == null)
+ {
+ mediaInfoCommand = new MediaInfoCommand(MediaDatabase);
+ }
+ return mediaInfoCommand;
+ }
+ }
+
+ private static StorageCommand storageCommand;
+
+ public StorageCommand StorageCommand
+ {
+ get
+ {
+ if (storageCommand == null)
+ {
+ storageCommand = new StorageCommand(MediaDatabase);
+ }
+ return storageCommand;
+ }
+ }
+
/// <summary>
/// A constructor
/// </summary>
{
if (Information.MediaContentInformation.ThumbnailPath == null)
{
- return Information.MediaContentInformation.FilePath + ".tn";
+ return Information.MediaContentInformation.Path + ".tn";
}
else
{
}
/// 2. Play the current music
- StartPlayerAsync((currentMusic.MediaContentInformation as AudioInformation).FilePath);
+ StartPlayerAsync((currentMusic.MediaContentInformation as AudioInfo).Path);
/// 3. Update the information of the current music
MusicPlayerInfoListener?.Invoke(this, new MusicPlayerInfoEventArgs()
{
- Title = (currentMusic.MediaContentInformation as AudioInformation).Title,
- Artist = (currentMusic.MediaContentInformation as AudioInformation).Artist,
- AlbumCover = ((currentMusic.MediaContentInformation as AudioInformation).ThumbnailPath.Length != 0) ? (currentMusic.MediaContentInformation as AudioInformation).ThumbnailPath : "img_media_no_contents.png",
- AlbumName = (currentMusic.MediaContentInformation as AudioInformation).Album
+ Title = (currentMusic.MediaContentInformation as AudioInfo).Title,
+ Artist = (currentMusic.MediaContentInformation as AudioInfo).Artist,
+ AlbumCover = ((currentMusic.MediaContentInformation as AudioInfo).ThumbnailPath.Length != 0) ? (currentMusic.MediaContentInformation as AudioInfo).ThumbnailPath : "img_media_no_contents.png",
+ AlbumName = (currentMusic.MediaContentInformation as AudioInfo).Album
});
/// 4. Update the progressbar of the current music
MusicPlayerProgressListener?.Invoke(this, new MusicPlayerProgressEventArgs()
{
- Progress = (playerInstance.State == PlayerState.Idle || playerInstance.State == PlayerState.Preparing) ? 0 : Convert.ToDouble(playerInstance.GetPlayPosition()) / (currentMusic.MediaContentInformation as AudioInformation).Duration,
+ Progress = (playerInstance.State == PlayerState.Idle || playerInstance.State == PlayerState.Preparing) ? 0 : Convert.ToDouble(playerInstance.GetPlayPosition()) / (currentMusic.MediaContentInformation as AudioInfo).Duration,
});
MusicPlayerStateChanged?.Invoke(this, new MusicPlayerStateEventArgs()
{
MusicPlayerProgressListener?.Invoke(this, new MusicPlayerProgressEventArgs()
{
- Progress = (playerInstance.State == PlayerState.Idle || playerInstance.State == PlayerState.Preparing) ? 0 : Convert.ToDouble(playerInstance.GetPlayPosition()) / (currentMusic.MediaContentInformation as AudioInformation).Duration,
+ Progress = (playerInstance.State == PlayerState.Idle || playerInstance.State == PlayerState.Preparing) ? 0 : Convert.ToDouble(playerInstance.GetPlayPosition()) / (currentMusic.MediaContentInformation as AudioInfo).Duration,
});
}, null, Timeout.Infinite, Timeout.Infinite);
}
/// <summary>
/// A list of external storage
/// </summary>
- private IEnumerable<Storage> storageList = new List<Storage>();
+ private List<Storage> storageList = new List<Storage>();
/// <summary>
/// A dictionary list of storage name and storage id
/// </summary>
public void CheckStorage()
{
- storageList = ContentManager.Database.SelectAll<Storage>(null);
+ var reader = MediaHubImpl.GetInstance.StorageCommand.Select();
+
+ while (reader.Read())
+ {
+ storageList.Add(reader.Current);
+ }
+
if (storageList.Count() < storageTable.Count)
{
CheckRemoveStorage();
{
foreach (var item in storageTable)
{
- Storage storage = ContentManager.Database.Select<Storage>(item.Key);
+ Storage storage = MediaHubImpl.GetInstance.StorageCommand.Select(item.Key);
if (storage == null)
{
/// <returns>A recently played video information</returns>
public MediaInformationEx GetRecentlyPlayedVideo()
{
- var contentFilter = new ContentFilter();
- contentFilter.OrderKey = "MEDIA_LAST_PLAYED_TIME";
- contentFilter.Order = ContentOrder.Desc;
- contentFilter.Condition = GetConditionStringForSelection();
+ var selectArguments = new SelectArguments();
+ selectArguments.SortOrder = "MEDIA_LAST_PLAYED_TIME";
+ selectArguments.FilterExpression = GetConditionStringForSelection();
+ List<MediaInfo> mediaInformationList = new List<MediaInfo>();
MediaInformationEx recentlyPlayedVideo = new MediaInformationEx();
- IEnumerable<MediaInformation> mediaInformationList = null;
try
{
- mediaInformationList = ContentManager.Database.SelectAll<MediaInformation>(contentFilter);
+ var reader = MediaHubImpl.GetInstance.MediaInfoCommand.SelectMedia(selectArguments);
+
+ while (reader.Read())
+ {
+ mediaInformationList.Add(reader.Current);
+ }
}
catch (Exception exception)
{
/// <param name="videoContent">A played media file</param>
public void SetPlayedAt(MediaInformationEx videoContent)
{
- videoContent.MediaContentInformation.PlayedAt = DateTime.UtcNow;
- DbgPort.D("PlayedAt : " + videoContent.MediaContentInformation.PlayedAt.ToString());
- ContentManager.Database.Update(videoContent.MediaContentInformation);
+ // @TODO : CHECK POINT 170824
+ // videoContent.MediaContentInformation. = DateTime.UtcNow;
+ // DbgPort.D("PlayedAt : " + videoContent.MediaContentInformation.PlayedAt.ToString());
+ //.Database.Update(videoContent.MediaContentInformation);
}
public override void SetContentUpdatedEventListener(EventHandler listener)
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>TVMediaHub.Tizen</RootNamespace>
- <AssemblyName>xamediahub</AssemblyName>
+ <AssemblyName>TVMediaHub.Tizen</AssemblyName>
<FileAlignment>512</FileAlignment>
<DefaultLanguage>en-US</DefaultLanguage>
</PropertyGroup>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
-</Project>
+</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup Condition="'$(NuGetPackageRoot)' == ''">
- <NuGetPackageRoot>$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
+ <PropertyGroup>
+ <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
- <ImportGroup>
- <Import Project="$(NuGetPackageRoot)\Xamarin.Forms\2.3.5-r233-004\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets" Condition="Exists('$(NuGetPackageRoot)\Xamarin.Forms\2.3.5-r233-004\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets')" />
+ <ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
+ <Import Project="$(NuGetPackageRoot)xamarin.forms\2.4.0-r266-001\build\netstandard1.0\Xamarin.Forms.targets" Condition="Exists('$(NuGetPackageRoot)xamarin.forms\2.4.0-r266-001\build\netstandard1.0\Xamarin.Forms.targets')" />
</ImportGroup>
</Project>
\ No newline at end of file
"preserveCompilationContext": true
},
"dependencies": {
- "ElmSharp": "1.2.2",
"Microsoft.NETCore.App": "1.1.2",
- "Tizen.Applications": "1.5.8",
- "Tizen.Content.MediaContent": "1.0.20",
- "Tizen.Multimedia": "1.2.0",
- "Tizen.Multimedia.MediaPlayer": "1.0.2",
- "Tizen.Xamarin.Forms.Extension": "2.3.5-v00015",
+ "Tizen.NET": "4.0.0-preview1-00115",
+ "Tizen.Xamarin.Forms.Extension": "2.4.0-v00002",
"Xamarin.Forms": "2.4.0-r266-001",
- "Xamarin.Forms.Platform.Tizen": "2.3.5-r256-001"
+ "Xamarin.Forms.Platform.Tizen": "2.4.0-r266-005"
},
"runtimes": {
"win": {},
{
try
{
- File.Delete(info.MediaContentInformation.FilePath);
+ File.Delete(info.MediaContentInformation.Path);
}
catch (Exception exception)
{
{
for (int i = 0; i < imagePlayList.Count; i++)
{
- if (imagePlayList[i].FilePath.Equals(info.MediaContentInformation.FilePath))
+ if (imagePlayList[i].FilePath.Equals(info.MediaContentInformation.Path))
{
DisplayingImageIndex = i;
return;
ImageViewerInfomation ivInfo = new ImageViewerInfomation();
ivInfo.Title = info.MediaContentInformation.Title;
- ivInfo.Date = info.MediaContentInformation.ModifiedAt.ToString("ddd. d MMMM");
- ivInfo.FilePath = info.MediaContentInformation.FilePath;
+ ivInfo.Date = info.MediaContentInformation.DateModified.ToString("ddd. d MMMM");
+ ivInfo.FilePath = info.MediaContentInformation.Path;
ivInfo.ThumbnailPath = info.MediaContentInformation.ThumbnailPath;
ivInfo.SavedRotation = 0;
{
try
{
- File.Delete(info.MediaContentInformation.FilePath);
+ File.Delete(info.MediaContentInformation.Path);
}
catch (Exception exception)
{
{
try
{
- File.Delete(info.MediaContentInformation.FilePath);
+ File.Delete(info.MediaContentInformation.Path);
}
catch (Exception exception)
{
/// <summary>
/// Bounds for ImageArea(Image Container) when item is unfocused
/// </summary>
- private Rectangle ImageAreaNormalBounds;
+ private Xamarin.Forms.Rectangle ImageAreaNormalBounds;
/// <summary>
/// Bounds for ImageArea(Image Container) when item is focused
/// </summary>
- private Rectangle ImageAreaFocusedBounds;
+ private Xamarin.Forms.Rectangle ImageAreaFocusedBounds;
/// <summary>
/// Bounds for Content Image when item is unfocused
/// </summary>
- private Rectangle ImageBounds;
+ private Xamarin.Forms.Rectangle ImageBounds;
/// <summary>
/// Bounds for Content Image when item is focused
/// </summary>
- private Rectangle ImageFocusedBounds;
+ private Xamarin.Forms.Rectangle ImageFocusedBounds;
/// <summary>
/// Bounds for Shadow Image when item is unfocused
/// </summary>
- private Rectangle ShadowNormalBounds;
+ private Xamarin.Forms.Rectangle ShadowNormalBounds;
/// <summary>
/// Bounds for Shadow Image when item is focused
/// </summary>
- private Rectangle ShadowFocusedBounds;
+ private Xamarin.Forms.Rectangle ShadowFocusedBounds;
/// <summary>
/// An EventHandler for focus event of the item
WidthRequest = h332;
HeightRequest = h332;
- ImageBounds = new Rectangle(-w76, -h76, w332, h332);
- ImageFocusedBounds = new Rectangle(-w64, -h64, w332, h332);
+ ImageBounds = new Xamarin.Forms.Rectangle(-w76, -h76, w332, h332);
+ ImageFocusedBounds = new Xamarin.Forms.Rectangle(-w64, -h64, w332, h332);
- ImageAreaNormalBounds = new Rectangle(w76, h76, SizeUtils.GetWidthSize(180), SizeUtils.GetHeightSize(180));
- ImageAreaFocusedBounds = new Rectangle(w64, h64, SizeUtils.GetWidthSize(204), SizeUtils.GetHeightSize(204));
+ ImageAreaNormalBounds = new Xamarin.Forms.Rectangle(w76, h76, SizeUtils.GetWidthSize(180), SizeUtils.GetHeightSize(180));
+ ImageAreaFocusedBounds = new Xamarin.Forms.Rectangle(w64, h64, SizeUtils.GetWidthSize(204), SizeUtils.GetHeightSize(204));
- ShadowNormalBounds = new Rectangle(SizeUtils.GetWidthSize(12), SizeUtils.GetWidthSize(12), SizeUtils.GetWidthSize(308), SizeUtils.GetHeightSize(308));
- ShadowFocusedBounds = new Rectangle(0, 0, w332, h332);
+ ShadowNormalBounds = new Xamarin.Forms.Rectangle(SizeUtils.GetWidthSize(12), SizeUtils.GetWidthSize(12), SizeUtils.GetWidthSize(308), SizeUtils.GetHeightSize(308));
+ ShadowFocusedBounds = new Xamarin.Forms.Rectangle(0, 0, w332, h332);
ImgFocused.BorderLeft = w20;
ImgFocused.BorderRight = w20;
{
case ImageContextPopupItem.FileInfo:
string message = "File name : " + info.MediaContentInformation.Title + "\n";
- message += "File size : " + info.MediaContentInformation.Size + "\n";
+ message += "File size : " + info.MediaContentInformation.FileSize + "\n";
message += "File format : " + info.MediaContentInformation.MimeType + "\n";
- message += "File size : " + info.MediaContentInformation.Size + "\n";
- message += "File path : " + info.MediaContentInformation.FilePath;
+ message += "File size : " + info.MediaContentInformation.FileSize + "\n";
+ message += "File path : " + info.MediaContentInformation.Path;
await DisplayAlert("File Information", message, "Close");
Dialog dialog = new Dialog();
/// <summary>
/// Bounds for TextArea when item is unfocused
/// </summary>
- private Rectangle TextAreaNormalBounds;
+ private Xamarin.Forms.Rectangle TextAreaNormalBounds;
/// <summary>
/// Bounds for TextArea when item is focused
/// </summary>
- private Rectangle TextAreaFocusedBounds;
+ private Xamarin.Forms.Rectangle TextAreaFocusedBounds;
/// <summary>
/// An enumeration for context popup selectable items
Artist.On<Xamarin.Forms.PlatformConfiguration.Tizen>().SetFontWeight(FontWeight.Normal);
AlbumTitle.On<Xamarin.Forms.PlatformConfiguration.Tizen>().SetFontWeight(FontWeight.Light);
- SlideEffect.SetSlideDuration(SongTitle, 15000);
- SlideEffect.SetSlideMode(SongTitle, SlideMode.Auto);
+ TextSlideEffect.SetDuration(SongTitle, 15000);
+ TextSlideEffect.SetIsAlwaysOn(SongTitle, true);
- SlideEffect.SetSlideDuration(Artist, 15000);
- SlideEffect.SetSlideMode(Artist, SlideMode.Auto);
+ TextSlideEffect.SetDuration(Artist, 15000);
+ TextSlideEffect.SetIsAlwaysOn(Artist, true);
- SlideEffect.SetSlideDuration(AlbumTitle, 15000);
- SlideEffect.SetSlideMode(AlbumTitle, SlideMode.Auto);
+ TextSlideEffect.SetDuration(SongTitle, 15000);
+ TextSlideEffect.SetIsAlwaysOn(SongTitle, true);
+
+ TextSlideEffect.SetDuration(AlbumTitle, 15000);
+ TextSlideEffect.SetIsAlwaysOn(AlbumTitle, true);
}
/// <summary>
Shadow.BorderLeft = SizeUtils.GetWidthSize(64);
Shadow.BorderRight = SizeUtils.GetWidthSize(64);
- TextAreaNormalBounds = new Rectangle(SizeUtils.GetWidthSize(202), SizeUtils.GetHeightSize(68), w446, SizeUtils.GetHeightSize(134));
- TextAreaFocusedBounds = new Rectangle(SizeUtils.GetWidthSize(206), SizeUtils.GetHeightSize(64), w446, SizeUtils.GetHeightSize(142));
+ TextAreaNormalBounds = new Xamarin.Forms.Rectangle(SizeUtils.GetWidthSize(202), SizeUtils.GetHeightSize(68), w446, SizeUtils.GetHeightSize(134));
+ TextAreaFocusedBounds = new Xamarin.Forms.Rectangle(SizeUtils.GetWidthSize(206), SizeUtils.GetHeightSize(64), w446, SizeUtils.GetHeightSize(142));
AlbumCover.WidthRequest = w134;
AlbumCover.HeightRequest = h134;
SongTitle.On<Xamarin.Forms.PlatformConfiguration.Tizen>().SetFontWeight(FontWeight.Medium);
SongTitle.TextColor = Color.FromHex("000000");
- SlideEffect.SetHasSlide(SongTitle, true);
+ TextSlideEffect.SetIsTextSliding(SongTitle, true);
Artist.On<Xamarin.Forms.PlatformConfiguration.Tizen>().SetFontWeight(FontWeight.Medium);
Artist.Opacity = 0.8;
Artist.TextColor = Color.FromHex("000000");
- SlideEffect.SetHasSlide(Artist, true);
+ TextSlideEffect.SetIsTextSliding(Artist, true);
AlbumTitle.On<Xamarin.Forms.PlatformConfiguration.Tizen>().SetFontWeight(FontWeight.Normal);
AlbumTitle.Opacity = 0.7;
AlbumTitle.TextColor = Color.FromHex("000000");
- SlideEffect.SetHasSlide(AlbumTitle, true);
+ TextSlideEffect.SetIsTextSliding(AlbumTitle, true);
+
Shadow.IsVisible = true;
OnFocusedEventHandler?.Invoke(sender, e);
}
SongTitle.On<Xamarin.Forms.PlatformConfiguration.Tizen>().SetFontWeight(FontWeight.Normal);
SongTitle.TextColor = Color.FromHex("ffffff");
- SlideEffect.SetHasSlide(SongTitle, false);
+ TextSlideEffect.SetIsTextSliding(SongTitle, false);
Artist.On<Xamarin.Forms.PlatformConfiguration.Tizen>().SetFontWeight(FontWeight.Normal);
Artist.Opacity = 0.6;
Artist.TextColor = Color.FromHex("ffffff");
- SlideEffect.SetHasSlide(Artist, false);
+ TextSlideEffect.SetIsTextSliding(Artist, false);
AlbumTitle.On<Xamarin.Forms.PlatformConfiguration.Tizen>().SetFontWeight(FontWeight.Light);
AlbumTitle.Opacity = 0.5;
AlbumTitle.TextColor = Color.FromHex("ffffff");
- SlideEffect.SetHasSlide(AlbumTitle, false);
+ TextSlideEffect.SetIsTextSliding(AlbumTitle, false);
+
TextBackground.Source = "img_music_list_normal.9.png";
Shadow.IsVisible = false;
OnUnfocusedEventHandler.Invoke(sender, e);
{
if (e.PropertyName.Equals("MusicInfo"))
{
- AudioInformation info = MusicInfo.MediaContentInformation as AudioInformation;
+ AudioInfo info = MusicInfo.MediaContentInformation as AudioInfo;
AlbumCover.Source = !(string.IsNullOrEmpty(info.ThumbnailPath)) ? info.ThumbnailPath : "img_music_nocover.png";
SongTitle.Text = info.Title;
{
case MusicContextPopupItem.FileInfo:
string message = "File name : " + info.MediaContentInformation.Title + "\n";
- message += "File size : " + info.MediaContentInformation.Size + "\n";
+ message += "File size : " + info.MediaContentInformation.FileSize + "\n";
message += "File format : " + info.MediaContentInformation.MimeType + "\n";
- message += "File size : " + info.MediaContentInformation.Size + "\n";
- message += "File path : " + info.MediaContentInformation.FilePath;
+ message += "File size : " + info.MediaContentInformation.FileSize + "\n";
+ message += "File path : " + info.MediaContentInformation.Path;
await DisplayAlert("File Information", message, "Close");
Dialog dialog = new Dialog();
/// <summary>
/// Bounds for ImageArea(Image Container) when item is unfocused
/// </summary>
- private Rectangle NormalBounds;
+ private Xamarin.Forms.Rectangle NormalBounds;
/// <summary>
/// Bounds for ImageArea(Image Container) when item is focused
/// </summary>
- private Rectangle FocusedBounds;
+ private Xamarin.Forms.Rectangle FocusedBounds;
/// <summary>
/// Bounds for Shadow Image when item is unfocused
/// </summary>
- private Rectangle NormalShadowBounds;
+ private Xamarin.Forms.Rectangle NormalShadowBounds;
/// <summary>
/// Bounds for Shadow Image when item is focused
/// </summary>
- private Rectangle FocusedShadowBounds;
+ private Xamarin.Forms.Rectangle FocusedShadowBounds;
/// <summary>
/// Bounds for Content Image when item is unfocused
/// </summary>
- private Rectangle NormalContentImageBounds;
+ private Xamarin.Forms.Rectangle NormalContentImageBounds;
/// <summary>
/// Bounds for Content Image when item is focused
/// </summary>
- private Rectangle FocusedContentImageBounds;
+ private Xamarin.Forms.Rectangle FocusedContentImageBounds;
/// <summary>
/// Bounds for Play Icon
/// </summary>
- private Rectangle PlayIconBounds;
+ private Xamarin.Forms.Rectangle PlayIconBounds;
/// <summary>
/// Bounds for Title
/// </summary>
- private Rectangle TitleContainerBounds;
+ private Xamarin.Forms.Rectangle TitleContainerBounds;
/// <summary>
/// An EventHandler for focus event of item
/// </summary>
private void InitializeLabelSlide()
{
- ContentTitle.SetValue(SlideEffect.SlideModeProperty, SlideMode.Always);
- ContentTitle.SetValue(SlideEffect.SlideStyleProperty, SlideStyle.Long);
- ContentTitle.SetValue(SlideEffect.HasSlideProperty, false);
+ TextSlideEffect.SetIsAlwaysOn(ContentTitle, true);
+ TextSlideEffect.SetMode(ContentTitle, TextSlideMode.Long); ;
+ TextSlideEffect.SetIsTextSliding(ContentTitle, false);
ContentTitle.PropertyChanged += SetSlideDuration;
}
if (e.PropertyName.Equals("Width"))
{
double slideDuration = ContentTitle.Width * 12000 / 480;
- ContentTitle.SetValue(SlideEffect.SlideDurationProperty, slideDuration);
+ TextSlideEffect.SetDuration(ContentTitle, (int)slideDuration);
+
ContentTitle.PropertyChanged -= SetSlideDuration;
}
}
int h5 = SizeUtils.GetHeightSize(5);
int w5 = SizeUtils.GetWidthSize(5);
- NormalShadowBounds = new Rectangle(w12, h12, SizeUtils.GetWidthSize(448), SizeUtils.GetHeightSize(308));
- FocusedShadowBounds = new Rectangle(w0, h0, SizeUtils.GetWidthSize(472), SizeUtils.GetHeightSize(332));
- FocusedBounds = new Rectangle(SizeUtils.GetWidthSize(64), SizeUtils.GetHeightSize(64), w344, h204);
- NormalBounds = new Rectangle(SizeUtils.GetWidthSize(76), SizeUtils.GetHeightSize(76), SizeUtils.GetWidthSize(320), SizeUtils.GetHeightSize(180));
+ NormalShadowBounds = new Xamarin.Forms.Rectangle(w12, h12, SizeUtils.GetWidthSize(448), SizeUtils.GetHeightSize(308));
+ FocusedShadowBounds = new Xamarin.Forms.Rectangle(w0, h0, SizeUtils.GetWidthSize(472), SizeUtils.GetHeightSize(332));
+ FocusedBounds = new Xamarin.Forms.Rectangle(SizeUtils.GetWidthSize(64), SizeUtils.GetHeightSize(64), w344, h204);
+ NormalBounds = new Xamarin.Forms.Rectangle(SizeUtils.GetWidthSize(76), SizeUtils.GetHeightSize(76), SizeUtils.GetWidthSize(320), SizeUtils.GetHeightSize(180));
- NormalContentImageBounds = new Rectangle(-w12, -h12, w344, h204);
- FocusedContentImageBounds = new Rectangle(w0, h0, w344, h204);
+ NormalContentImageBounds = new Xamarin.Forms.Rectangle(-w12, -h12, w344, h204);
+ FocusedContentImageBounds = new Xamarin.Forms.Rectangle(w0, h0, w344, h204);
- PlayIconBounds = new Rectangle(SizeUtils.GetWidthSize(208), SizeUtils.GetHeightSize(126), SizeUtils.GetWidthSize(80), SizeUtils.GetHeightSize(80));
+ PlayIconBounds = new Xamarin.Forms.Rectangle(SizeUtils.GetWidthSize(208), SizeUtils.GetHeightSize(126), SizeUtils.GetWidthSize(80), SizeUtils.GetHeightSize(80));
- TitleContainerBounds = new Rectangle(SizeUtils.GetWidthSize(94), SizeUtils.GetHeightSize(214), SizeUtils.GetWidthSize(284), SizeUtils.GetHeightSize(30) * 1.3);
+ TitleContainerBounds = new Xamarin.Forms.Rectangle(SizeUtils.GetWidthSize(94), SizeUtils.GetHeightSize(214), SizeUtils.GetWidthSize(284), SizeUtils.GetHeightSize(30) * 1.3);
WidthRequest = SizeUtils.GetWidthSize(472);
HeightRequest = SizeUtils.GetHeightSize(332);
Easing easing = new Easing(EasingFunction.EasyIn2);
this.AbortAnimation("TextSliding");
this.AbortAnimation("FocusAnimation");
- ContentTitle.SetValue(SlideEffect.HasSlideProperty, false);
+ TextSlideEffect.SetIsTextSliding(ContentTitle, false);
BgDimImage.Opacity = 0;
ContentImage.ScaleTo(1.0, 167, easing);
{
if (!IsCanceled)
{
- ContentTitle.SetValue(SlideEffect.HasSlideProperty, true);
+ TextSlideEffect.SetIsTextSliding(ContentTitle, true);
}
});
playerInstance.Unprepare();
playerDisplayInstance = new Display((MediaView)mediaView.NativeView);
playerInstance.Display = playerDisplayInstance;
- videoMediaSource = new MediaUriSource(CurrentVideo.MediaContentInformation.FilePath);
+ videoMediaSource = new MediaUriSource(CurrentVideo.MediaContentInformation.Path);
playerInstance.SetSource(videoMediaSource);
}
catch (Exception ex)
}
};
- videoMediaSource = new MediaUriSource(CurrentVideo.MediaContentInformation.FilePath);
+ videoMediaSource = new MediaUriSource(CurrentVideo.MediaContentInformation.Path);
playerInstance.SetSource(videoMediaSource);
}
{
case VideoContextPopupItem.FileInfo:
string message = "File name : " + info.MediaContentInformation.Title + "\n";
- message += "File size : " + info.MediaContentInformation.Size + "\n";
+ message += "File size : " + info.MediaContentInformation.FileSize + "\n";
message += "File format : " + info.MediaContentInformation.MimeType + "\n";
- message += "File size : " + info.MediaContentInformation.Size + "\n";
- message += "File path : " + info.MediaContentInformation.FilePath;
+ message += "File size : " + info.MediaContentInformation.FileSize + "\n";
+ message += "File path : " + info.MediaContentInformation.Path;
await DisplayAlert("File Information", message, "Close");
break;
<?xml version="1.0" encoding="utf-8"?>
<manifest package="org.tizen.xamediahub" version="1.0.0" api-version="3.0" xmlns="http://tizen.org/ns/packages">
<profile name="tv" />
- <ui-application appid="org.tizen.xamediahub" exec="xamediahub.exe" multiple="false" nodisplay="false" taskmanage="true" splash-screen-display="true" type="dotnet" launch_mode="single">
+ <ui-application appid="org.tizen.xamediahub" exec="TVMediaHub.Tizen.exe" multiple="false" nodisplay="false" taskmanage="true" splash-screen-display="true" type="dotnet" launch_mode="single">
<label>MediaHub</label>
<icon>xamediahub.png</icon>
</ui-application>