{
public class MediaInformationEx
{
+ /// <summary>
+ /// The media content information
+ /// </summary>
public MediaInformation MediaContentInformation;
- public bool IsAvailable;
+
+ /// <summary>
+ /// An attribute of the availability of this media content
+ /// </summary>
+ public bool IsAvailable = true;
};
}
{
result.Add(currentGroupItem);
lastGroupItem = currentGroupItem;
- DbgPort.D("new Group : " + currentGroupItem.Title);
}
if (currentGroupItem != null)
// Check 1 : The size of the image file must be less than 4MB.
var fileInfo = new FileInfo(mediaContent.MediaContentInformation.FilePath);
- if (fileInfo != null && fileInfo.Length > 4 * 1024 * 1024)
+ if (fileInfo != null && fileInfo.Length > 8 * 1024 * 1024)
{
+ DbgPort.D(mediaContent.MediaContentInformation.DisplayName + ": This content is not available");
mediaContent.IsAvailable = false;
}
}
if (mediaContent.MediaContentInformation.IsDrm ||
mediaContent.MediaContentInformation.MimeType.Contains("ogg"))
{
+ DbgPort.D(mediaContent.MediaContentInformation.DisplayName + " : This content is not available");
mediaContent.IsAvailable = false;
}
}
<Content Include="res\img_dimmed.9.png" />
<Content Include="res\img_dimmed_opacity75.9.png" />
<Content Include="res\img_dimmed_opacity85.9.png" />
+ <Content Include="res\img_gallery_unavailable_photo.png" />
+ <Content Include="res\img_gallery_unavailable_video.png" />
<Content Include="res\img_gradient_topbottom.9.png" />
<Content Include="res\img_media_no_contents.png" />
+ <Content Include="res\img_movie_unavailable.png" />
<Content Include="res\img_photozoom_gradient.9.png" />
<Content Include="res\img_stroke.9.png" />
<Content Include="res\img_stroke2.9.png" />
<Image x:Name="ContentImage"
Source="{Binding ThumbnailPath}"/>
</Views:CustomImageControl>
+ <Image x:Name="UnavailableIcon"
+ Source="img_gallery_unavailable_photo.png"
+ IsVisible="false"/>
<Utils:NinePatch x:Name="ImgDimmed"
Source="img_thumbnail_gradient_normal.9.png"
IsVisible="False" />
UpdateView();
}
}
+ else if (e.PropertyName.CompareTo("SelectedImage") == 0)
+ {
+ if (SelectedImage.IsAvailable == false)
+ {
+ ContentImage.IsVisible = false;
+ UnavailableIcon.IsVisible = true;
+ }
+ }
}
/// <summary>
ImgDimmed.LayoutTo(ImageAreaFocusedBounds, 500, easing);
ImgFocused.LayoutTo(ShadowFocusedBounds, 500, easing);
ContentImage.LayoutTo(ImageFocusedBounds, 500, easing);
+
+ if (SelectedImage.IsAvailable == false)
+ {
+ UnavailableIcon.ScaleTo(1.3, 167, easing);
+ UnavailableIcon.LayoutTo(ImageFocusedBounds, 500, easing);
+ }
+
if (IsDeleteMode)
{
ImgCheckDimmed.LayoutTo(ImageAreaFocusedBounds, 500, easing);
ImgFocused.Opacity = 0.0;
ContentImage.ScaleTo(1.0, 167, easing);
ContentImage.LayoutTo(ImageBounds, 167, easing);
+
+ if (SelectedImage.IsAvailable == false)
+ {
+ UnavailableIcon.ScaleTo(1.0, 167, easing);
+ UnavailableIcon.Layout(ImageBounds);
+ }
+
ImgFocused.LayoutTo(ShadowNormalBounds, 167, easing);
ImgDimmed.LayoutTo(ImageAreaNormalBounds, 167, easing);
if (IsDeleteMode)
ImgDimmed.Layout(ImageBounds);
ImgCheckDimmed.Layout(ImageAreaNormalBounds);
ImgCheck.Layout(ImageAreaNormalBounds);
+ UnavailableIcon.Layout(ImageAreaNormalBounds);
IsLoaded = true;
}
}
<Image x:Name="PlayImage"
Source="btn_list_thumbnail_play.png"
Opacity="0"/>
+ <Image x:Name="UnavailableIcon"
+ Source="img_movie_unavailable.png"
+ IsVisible="false"/>
<Utils:NinePatch x:Name="CheckDimImage"
VerticalOptions="CenterAndExpand"
HorizontalOptions="CenterAndExpand"
{
InitializeComponent();
InitializeSize();
- PropertyChanged += VideoTabPropertyChanged;
+ PropertyChanged += VideoItemPropertyChanged;
}
/// <summary>
PlayImage.Layout(PlayIconBounds);
CheckDimImage.Layout(NormalBounds);
CheckImage.Layout(NormalBounds);
+ UnavailableIcon.Layout(NormalBounds);
IsLoaded = true;
}
}
DimImage.LayoutTo(NormalBounds, 167, easing);
ContentImage.LayoutTo(NormalContentImageBounds, 167, easing);
BgDimImage.LayoutTo(NormalShadowBounds, 167, easing);
- PlayImage.FadeTo(0.0, 167);
+
+ if (VideoInfo.IsAvailable)
+ {
+ PlayImage.FadeTo(0.0, 167);
+ }
+
if (IsDeleteMode)
{
CheckDimImage.LayoutTo(NormalBounds, 167, easing);
DimImage.LayoutTo(FocusedBounds, 500, easing);
ContentImage.LayoutTo(FocusedContentImageBounds, 500, easing);
BgDimImage.LayoutTo(FocusedShadowBounds, 500, easing);
- PlayImage.FadeTo(0.99, 167);
+
+ if (VideoInfo.IsAvailable)
+ {
+ PlayImage.FadeTo(0.99, 167);
+ }
+
if (IsDeleteMode)
{
CheckDimImage.LayoutTo(FocusedBounds, 167, easing);
/// </summary>
/// <param name="sender">The source of the event</param>
/// <param name="e">A propertyChanged event argument</param>
- private void VideoTabPropertyChanged(object sender, PropertyChangedEventArgs e)
+ private void VideoItemPropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName.CompareTo("IsDeleteMode") == 0)
{
UpdateView();
}
}
+ else if (e.PropertyName.CompareTo("VideoInfo") == 0)
+ {
+ if (VideoInfo.IsAvailable == false)
+ {
+ ContentImage.IsVisible = false;
+ UnavailableIcon.IsVisible = true;
+ }
+ }
+
}
public void ShowContextPopup()