/// <summary>
/// A constructor
+ /// Adds or removes a back button to page
+ /// Sets a value that indicates whether or not this NavigationPage element has a navigation bar
/// </summary>
protected ContentPageEx()
: base()
namespace TVMediaHub.Tizen.Controls
{
/// <summary>
- /// A custom image that is used as button of image viewer
+ /// A custom image for displaying the buttons of image viewer
/// </summary>
public partial class CustomImageButton : Image
{
private string imgPressedPostFix = "_pressed.png";
/// <summary>
- /// Gets or set button type
+ /// Gets or sets the button type
/// </summary>
public string Type
{
}
/// <summary>
- /// Gets or set button subtype
+ /// Gets or sets the button subtype
/// </summary>
public string SubType
{
}
/// <summary>
- /// A method for handling button when the button is pressed.
+ /// A method for handling the actions when the button is pressed.
/// </summary>
public void OnButtonPressed()
{
}
/// <summary>
- /// A method for handling button when the button is released.
+ /// A method for handling the actions when the button is released.
/// </summary>
public void OnButtonReleased()
{
/// <summary>
/// A constructor
+ /// Implements the TapGestureCommand
/// </summary>
public CustomImageButton()
{
namespace TVMediaHub.Tizen.Controls
{
/// <summary>
- /// A custom image renderer for making custom image button.
+ /// A custom renderer for making custom image button.
/// </summary>
public class CustomImageRenderer : ImageRenderer
{
private ElmSharp.GestureLayer GestureRecognizer;
/// <summary>
- /// Creates GestureRecognizer and sets callbacks for tap and longtap event when ElementProperty is changed.
+ /// Creates GestureRecognizer and sets callbacks for tap and longtap event when Element is changed.
/// </summary>
- /// <param name="args">A image element property changed event's argument</param>
+ /// <param name="args">An image element property changed event's argument</param>
protected override void OnElementChanged(ElementChangedEventArgs<Xamarin.Forms.Image> args)
{
base.OnElementChanged(args);
*/
using System;
-using System.Windows.Input;
using TVMediaHub.Tizen.Utils;
using Xamarin.Forms;
namespace TVMediaHub.Tizen.Controls
{
/// <summary>
- /// A custom grid view for using button of MediaHub application
+ /// A custom grid view for displaying the button of MediaHub application
/// </summary>
public partial class MediaHubButton : Grid
{
+ /// <summary>
+ /// An Event Handler to notify if the button is clicked
+ /// </summary>
public event EventHandler Clicked;
+ /// <summary>
+ /// A value of effect duration
+ /// </summary>
int effectDuration = 200;
+ /// <summary>
+ /// A flag that whether the button is handling clicked event or not
+ /// </summary>
private static bool isButtonRunning = false;
/// <summary>
- /// Gets or sets MediaHubButtonIcon's source
+ /// Gets or sets MediaHubButtonIcon's image source
/// </summary>
public string MediaHubButtonIcon
{
/// <summary>
/// A constructor of MediaHubBUtton
+ /// Initializes the MediaHubButton and the button's BG image animation
/// </summary>
public MediaHubButton()
{
namespace TVMediaHub.Tizen.DataModels
{
/// <summary>
- /// A custom EventArgs for group item of Image and Video contents
+ /// A custom EventArgs for group item's focus event
/// </summary>
public class GroupItemFocusEventArgs : EventArgs
{
namespace TVMediaHub.Tizen.DataModels
{
/// <summary>
- /// A data model for Image Viewer
+ /// A data model for Image Viewer with detail information
/// </summary>
public class ImageViewerInfomation
{
namespace TVMediaHub.Tizen.DataModels
{
/// <summary>
- /// A enumeration of SlideShow effect option
+ /// An enumeration for SlideShow effect option
/// </summary>
public enum SlideShowEffect
{
namespace TVMediaHub.Tizen.DataModels
{
/// <summary>
- /// A enumeration of SlideShow speed option
+ /// An enumeration for SlideShow speed option
/// </summary>
public enum SlideShowSpeed
{
namespace TVMediaHub.Tizen.Models
{
/// <summary>
- /// A enumeration of sort option
+ /// An enumeration for sort option of contents
/// </summary>
public enum SortOption
{
abstract protected string GetConditionStringForSelection();
/// <summary>
- /// A event handler for update event
+ /// An event handler for update event
/// </summary>
private EventHandler UpdateListeners;
/// <summary>
/// A constructor
+ /// Connect to the media database to search, insert, remove or modify media information.
/// </summary>
public ContentProvider()
{
}
/// <summary>
- /// A method for getting the string from specific date
+ /// Converts the value of the DateTime object to its equivalent string representation.
/// </summary>
- /// <param name="date">A current DateTime information</param>
- /// <returns>A date string to be displayed</returns>
+ /// <param name="date">A DateTime information</param>
+ /// <returns>A string to be displayed</returns>
private string GetDateString(DateTime date)
{
if (date.Equals(DateTime.Today))
}
/// <summary>
- /// A method for getting group item to be added to the proper group
+ /// A method for creating group item to be added to the proper group
/// </summary>
/// <param name="sortOption">A current sort option</param>
/// <param name="lastGroupItem">A latest group item of current group</param>
}
/// <summary>
- /// A method for reading media contents from database
+ /// A method for reading media contents from database and make a group
/// </summary>
/// <param name="sortOption">The current sort option</param>
/// <param name="storageId">The current storage id</param>
}
/// <summary>
- /// A method for reading media content with specific mediaID
+ /// A method for reading media content with specific media id
/// </summary>
/// <param name="mediaID">A media Id to be read</param>
/// <returns>A media content with specific media id</returns>
/// <summary>
/// A method for adding update event handler
/// </summary>
- /// <param name="listener">A event handler to be executed</param>
+ /// <param name="listener">An event handler to be executed</param>
void SetUpdateListener(EventHandler listener)
{
UpdateListeners += listener;
namespace TVMediaHub.Tizen.Models
{
/// <summary>
- /// A class for group data model
+ /// A class for group item's data model
/// </summary>
public class GroupItem
{
public string Title { get; set; }
/// <summary>
- /// Gets or sets the list of MediaShortcutInfo for group
+ /// Gets or sets the list of MediaShortcutInfo to display the group
/// </summary>
public ICollection<MediaShortcutInfo> Contents { get; set; }
/// <summary>
/// A constructor
+ /// Initializes the list of MediaShortcutInfo
/// </summary>
public GroupItem()
{
public sealed class MediaHubImpl
{
/// <summary>
- /// A instance of the MediaHubImpl
+ /// An instance of the MediaHubImpl
/// </summary>
private static readonly MediaHubImpl instance = new MediaHubImpl();
/// <summary>
- /// Gets a instance of the MediaHubImpl
+ /// Gets an instance of the MediaHubImpl
/// </summary>
public static MediaHubImpl GetInstance
{
}
/// <summary>
- /// A instance of the ImageProvider
+ /// An instance of the ImageProvider
/// </summary>
private static readonly ImageProvider imageProviderInstance = new ImageProvider();
/// <summary>
- /// Gets a instance of the ImageProvider
+ /// Gets an instance of the ImageProvider
/// </summary>
public ImageProvider ImageProviderInstance
{
}
/// <summary>
- /// A instance of the MusicProvider
+ /// An instance of the MusicProvider
/// </summary>
private static readonly MusicProvider musicProviderInstance = new MusicProvider();
/// <summary>
- /// Gets a instance of the MusicProvider
+ /// Gets an instance of the MusicProvider
/// </summary>
public MusicProvider MusicProviderInstance
{
}
/// <summary>
- /// A instance of the MusicProvider
+ /// An instance of the MusicProvider
/// </summary>
private static readonly VideoProvider videoProviderInstance = new VideoProvider();
/// <summary>
- /// Gets a instance of the MusicProvider
+ /// Gets an instance of the MusicProvider
/// </summary>
public VideoProvider VideoProviderInstance
{
public class MediaShortcutInfo : INotifyPropertyChanged
{
/// <summary>
- /// A event handler for handling property changed.
+ /// An event handler for handling property changed.
/// </summary>
public event PropertyChangedEventHandler PropertyChanged;
}
}
+ /// <summary>
+ /// A flag that whether the content is delete mode or not
+ /// </summary>
private bool isDeleteStatus;
/// <summary>
- /// Gets or sets whether the content is delete mode or not
+ /// Gets or sets the isDeleteStatus
/// </summary>
public bool IsDeleteStatus
{
/// </summary>
class Program : global::Xamarin.Forms.Platform.Tizen.FormsApplication
{
+ /// <summary>
+ /// Gets or sets the instance of TV MediaHub
+ /// </summary>
public static Program Instance
{
get;
private set;
}
+ /// <summary>
+ /// Gets or sets the resource directory path of TV MediaHub
+ /// </summary>
public static string ResourceDirectoryPath
{
get;
private set;
}
+ /// <summary>
+ /// An instance of the TV MediaHub application
+ /// </summary>
private static App app;
/// <summary>
}
}
+ /// <summary>
+ /// A method for pushing a specific page to navigation stack.
+ /// </summary>
+ /// <param name="page">A page to be pushed</param>
public static void TransitionTo(ContentPage page)
{
app.TransitionTo(page);
}
+ /// <summary>
+ /// A method for setting the root page as MainPage.
+ /// </summary>
+ /// <param name="tabIndex">An index of tab to be set as MainPage. Default value is 0</param>
public static void TransitionToMain(int tabIndex = 0)
{
app.TransitionToMain(tabIndex);
Instance.Run(args);
}
+ /// <summary>
+ /// A method terminates application
+ /// </summary>
public void SelfTerminate()
{
Instance.Exit();
/// </summary>
public class App : Application
{
+ /// <summary>
+ /// Gets or sets the window of TV MediaHub
+ /// </summary>
public static Window MainWindow { get; private set; }
+ /// <summary>
+ /// Gets or sets the NavigationPage of TV MediaHub
+ /// </summary>
public static NavigationPage AppMainPage { get; private set; }
/// <summary>
/// A constructor
/// <summary>
/// A method for setting the root page as MainPage.
/// </summary>
- /// <param name="tabIndex">A index of tab to be set as MainPage. Default value is 0</param>
+ /// <param name="tabIndex">An index of tab to be set as MainPage. Default value is 0</param>
public void TransitionToMain(int tabIndex = 0)
{
/*
}
/// <summary>
- /// Displays a error log message
+ /// Displays an error log message
/// </summary>
/// <param name="message"> A debugging message </param>
/// <param name="file"> A file name that debugging message is exist </param>
/// </summary>
public class InOutDbgRAII
{
+ /// <summary>
+ /// A function name that debugging message is exist
+ /// </summary>
private string function;
+ /// <summary>
+ /// A file name that debugging message is exist
+ /// </summary>
private string fileName;
/// <summary>
/// <summary>
/// Updates border when Element is changed
/// </summary>
- /// <param name="args">A image element changed event's argument </param>
+ /// <param name="args">An image element changed event's argument </param>
protected override void OnElementChanged(ElementChangedEventArgs<Xamarin.Forms.Image> args)
{
base.OnElementChanged(args);
/// Updates border when ElementProperty is changed
/// </summary>
/// <param name="sender">The source of the event</param>
- /// <param name="args">A image element property changed event's argument </param>
+ /// <param name="args">An image element property changed event's argument </param>
protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs args)
{
if ((args.PropertyName == NinePatch.BorderBottomProperty.PropertyName)
public ObservableCollection<GroupItem> ImageList { get; set; }
/// <summary>
- /// A index of displaying image
+ /// An index of displaying image
/// </summary>
private int displayingImageIndex;
public ICommand ChangeSortOptionCommand { get; set; }
private int SortBy;
+ /// <summary>
+ /// A flag that whether the content is delete mode or not
+ /// </summary>
private bool isDeleteStatus;
/// <summary>
- /// Gets or sets the DeleteStatus
+ /// Gets or sets the isDeleteStatus
/// </summary>
public bool IsDeleteStatus
{
}
/// <summary>
- /// A event that is occurred when property of ViewModel is changed
+ /// An event that is occurred when property of ViewModel is changed
/// </summary>
public event PropertyChangedEventHandler PropertyChanged;
/// <summary>
/// A constructor
+ /// Initializes the footer's item source
+ /// Initializes the commands that are used in Image tab
+ /// Initializes several lists that are used in Image tab
/// </summary>
public ImageTabViewModel()
{
/// <summary>
/// A method for setting the current image
/// </summary>
- /// <param name="info">A information of current image</param>
+ /// <param name="info">An information of current image</param>
private void SetCurrentImage(MediaInformation info)
{
FindImageInfoInList(info);
public static class ImageTabViewModelLocator
{
/// <summary>
- /// A instance of the ImageTabViewModel
+ /// An instance of the ImageTabViewModel
/// </summary>
private static ImageTabViewModel _viewModel = new ImageTabViewModel();
/// </summary>
class MediaHubMainPageViewModel : INotifyPropertyChanged
{
+ /// <summary>
+ /// A flag that whether footer is normal mode or not
+ /// </summary>
bool isFooterNor;
+ /// <summary>
+ /// A flag that whether footer is select mode or not
+ /// </summary>
bool isFooterSel;
/// <summary>
- /// A event that is occurred when property of MediaHubMainPageViewModel is changed
+ /// An event that is occurred when property of MediaHubMainPageViewModel is changed
/// </summary>
public event PropertyChangedEventHandler PropertyChanged;
/// <summary>
- /// Gets or sets the value that whether the footer's status is normal mode or not
+ /// Gets or sets the isFooterNor
/// </summary>
public bool IsFooterNorStatus
{
}
/// <summary>
- /// Gets or sets the value that whether the footer's status is select mode or not
+ /// Gets or sets the isFooterSel
/// </summary>
public bool IsFooterSelStatus
{
/// </summary>
public Command OnSeleteModeCommand { get; set; }
-
+ /// <summary>
+ /// A consturctor
+ /// Initializes OnSelectModeCommand that is called to change the footer to select mode
+ /// </summary>
public MediaHubMainPageViewModel()
{
IsFooterNorStatus = true;
* limitations under the License.
*/
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
namespace TVMediaHub.Tizen.ViewModels
{
/// <summary>
public class VideoTabViewModel : INotifyPropertyChanged
{
/// <summary>
- /// A event that is occurred when property of ViewModel is changed
+ /// An event that is occurred when property of ViewModel is changed
/// </summary>
public event PropertyChangedEventHandler PropertyChanged;
/// <summary>
/// A method for setting the current video
/// </summary>
- /// <param name="videoContent">A information of current video</param>
+ /// <param name="videoContent">An information of current video</param>
private void SetCurrentVideo(MediaInformation videoContent)
{
CurrentVideo = videoContent;
public class VideoTabViewModelLocator
{
/// <summary>
- /// A instance of the VideoTabViewModel
+ /// An instance of the VideoTabViewModel
/// </summary>
private static VideoTabViewModel _viewModel = null;
/// <summary>
}
/// <summary>
- /// A EventHandler for DropdownSource ItemSelected event
+ /// An EventHandler for DropdownSource ItemSelected event
/// </summary>
public EventHandler<SelectedItemChangedEventArgs> OnDropdownSourceItemSelected;
/// <summary>
- /// A EventHandler for DropdownSort ItemSelected event
+ /// An EventHandler for DropdownSort ItemSelected event
/// </summary>
public EventHandler<SelectedItemChangedEventArgs> OnDropdownSortItemSelected;
/// <summary>
- /// A EventHandler for DropdownOption ItemSelected event
+ /// An EventHandler for selected item's IndexChanged event of Context popup
/// </summary>
public EventHandler<ContextPopupSelectedEventArgs> OnSelectedOptionIndexChanged;
{
return TitleFocusArea;
}
+
private List<Button> ChildrenFocusList;
public List<Button> LeftFocusList { get; protected set; }
public List<Button> RightFocusList { get; protected set; }
public partial class ImageItem : RelativeLayout
{
/// <summary>
- /// A enumeration for ItemStatus
+ /// An enumeration for ItemStatus
/// </summary>
public enum ItemStatus
{
SELECTED,
};
+ /// <summary>
+ /// A flag that whether the item is loaded or not
+ /// </summary>
private bool IsLoaded = false;
private Rectangle ImageAreaNormalBounds;
//private Rectangle NormalBounds;
//private Rectangle FocusedBounds;
+ /// <summary>
+ /// An EventHandler for focus event of the item
+ /// </summary>
public EventHandler OnFocusedEventHandler;
+ /// <summary>
+ /// An EventHandler for unfocus event of the item
+ /// </summary>
public EventHandler OnUnfocusedEventHandler;
+ /// <summary>
+ /// A delegate will be executed when the item is clicked
+ /// </summary>
+ /// <param name="info">A clicked item's MediaInformation</param>
public delegate void ClickEventHandler(MediaInformation info);
+ /// <summary>
+ /// A ClickEventHandler for click event of the item
+ /// </summary>
public ClickEventHandler OnItemClickedHandler;
/// <summary>
}
}
+ /// <summary>
+ /// A value of current ItemStatus
+ /// </summary>
private ItemStatus CurStatus;
/// <summary>
/// A constructor
+ /// Initializes the size of the items that are used in this class
/// </summary>
public ImageItem()
{
}
/// <summary>
- /// A method for initializing several sizes
+ /// A method for initializing size of the items that are used in this class
/// </summary>
private void InitializeSize()
{
/// This method is called when item is clicked
/// </summary>
/// <param name="sender">The source of the event</param>
- /// <param name="e">A event argument</param>
+ /// <param name="e">An event argument</param>
private async void OnItemClicked(object sender, EventArgs e)
{
if (ImgDimmed.AnimationIsRunning("LayoutTo"))
/// <summary>
/// A method for getting absolute position of item
/// </summary>
- /// <returns>A absolute position</returns>
+ /// <returns>An absolute position</returns>
private Point GetAbsolutePosition()
{
// TODO : Find proper way to get absolute location of this element.
/// This method is called when cancel button is clicked
/// </summary>
/// <param name="sender">The source of the event</param>
- /// <param name="e">A event's argument</param>
+ /// <param name="e">An event's argument</param>
private void OnCancelClicked(object sender, EventArgs e)
{
DeleteModeChangeCommand?.Execute("");
/// This method is called when SelectAll button is clicked
/// </summary>
/// <param name="sender">The source of the event</param>
- /// <param name="e">A event's argument</param>
+ /// <param name="e">An event's argument</param>
private void OnSelectAllClicked(object sender, EventArgs e)
{
/// This method is called when OK button is clicked
/// </summary>
/// <param name="sender">The source of the event</param>
- /// <param name="e">A event's argument</param>
+ /// <param name="e">An event's argument</param>
private void OnOKClicked(object sender, EventArgs e)
{
DeleteModeChangeCommand?.Execute("");
public partial class ImageViewer : ContentPage
{
/// <summary>
- /// A enumeration for NaviDirection
+ /// An enumeration for NaviDirection
/// </summary>
enum NaviDirection
{
};
/// <summary>
- /// A enumeration for ControlAreaState
+ /// An enumeration for ControlAreaState
/// </summary>
enum ControlAreaState
{
}
/// <summary>
- /// A event handler for BackButton pressed event
+ /// An event handler for BackButton pressed event
/// </summary>
private EventHandler OnBackButtonPressedHandler { get; set; }
/// A method will be called when application receives KeyDown event
/// </summary>
/// <param name="sender">The source of the event</param>
- /// <param name="e">A EvasKey event's argument</param>
+ /// <param name="e">An EvasKey event's argument</param>
private void RemoteKeyDownListener(object sender, ElmSharp.EvasKeyEventArgs e)
{
SetControlAreaState(ControlAreaState.AUTO);
/// This method is called when Rotate button is clicked
/// </summary>
/// <param name="sender">The source of the event</param>
- /// <param name="e">A event's argument</param>
+ /// <param name="e">An event's argument</param>
private async void RotateBtnClicked(object sender, EventArgs e)
{
if (ControlArea.Opacity == 0)
/// This method is called when Zoom button is clicked
/// </summary>
/// <param name="sender">The source of the event</param>
- /// <param name="e">A event's argument</param>
+ /// <param name="e">An event's argument</param>
private void ZoomBtnClicked(object sender, EventArgs e)
{
if (ControlArea.Opacity == 0)
/// This method is called when Left button is clicked
/// </summary>
/// <param name="sender">The source of the event</param>
- /// <param name="e">A event's argument</param>
+ /// <param name="e">An event's argument</param>
private void LeftBtnClicked(object sender, EventArgs e)
{
if (ControlArea.Opacity == 0)
/// This method is called when Right button is clicked
/// </summary>
/// <param name="sender">The source of the event</param>
- /// <param name="e">A event's argument</param>
+ /// <param name="e">An event's argument</param>
private void RightBtnClicked(object sender, EventArgs e)
{
/// This method is called when Slide show button is clicked
/// </summary>
/// <param name="sender">The source of the event</param>
- /// <param name="e">A event's argument</param>
+ /// <param name="e">An event's argument</param>
private void SlideShowBtnClicked(object sender, EventArgs e)
{
/// This method is called when Option button is clicked
/// </summary>
/// <param name="sender">The source of the event</param>
- /// <param name="e">A event's argument</param>
+ /// <param name="e">An event's argument</param>
private void OptionBtnClicked(object sender, EventArgs e)
{
if (ControlArea.Opacity == 0)
/// <summary>
/// A method for showing slide show on dissolve mode
/// </summary>
- /// <param name="index">A index of start image</param>
+ /// <param name="index">An index of start image</param>
/// <param name="delay">A delay time</param>
private void DissolveSlideShowAnimation(int index, uint delay)
{
using System.Threading;
using System.Threading.Tasks;
using TVMediaHub.Tizen.Controls;
-using TVMediaHub.Tizen.Utils;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace TVMediaHub.Tizen.Views
{
/// <summary>
- /// @TODO: Comment
+ /// A custom page for displaying main page of TV MediaHub
/// </summary>
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class MediaHubMainPage : TabbedPage
{
+ /// <summary>
+ /// A flag that whether app is loaded or not
+ /// </summary>
private bool IsAppLoaded;
+ /// <summary>
+ /// A constructor
+ /// </summary>
+ /// <param name="tabIndex">An index of tab to be set as MainPage</param>
public MediaHubMainPage(int tabIndex)
{
IsAppLoaded = false;
CurrentPageChanged += MediaHubMainPage_CurrentPageChanged;
}
+ /// <summary>
+ /// This method is called when the CurrentPage is changed
+ /// </summary>
+ /// <param name="sender">The source of event</param>
+ /// <param name="e">An event argument</param>
private void MediaHubMainPage_CurrentPageChanged(object sender, EventArgs e)
{
var page = CurrentPage as ContentPageEx;
page.RunShowAnimation();
}
+ /// <summary>
+ /// This method is called when the page becoming visible
+ /// </summary>
protected override async void OnAppearing()
{
base.OnAppearing();
Focus();
}
+ /// <summary>
+ /// This method is called when Back button is pressed
+ /// </summary>
+ /// <returns>Always returns true</returns>
protected override bool OnBackButtonPressed()
{
SynchronizationContext.Current.Post((o) =>
return true;
}
+ /// <summary>
+ /// This method is called when Back button is pressed at MainPage
+ /// </summary>
+ /// <returns>Always returns true</returns>
private async Task<bool> OnBackKeyPressedAtMain()
{
var answer = await DisplayAlert("QUIT", "Do you want to quit?", "YES", "NO");
namespace TVMediaHub.Tizen.Views
{
/// <summary>
- /// @TODO: Comment
+ /// A custom ContentPage for displaying Music tab
/// </summary>
public partial class MusicTab : ContentPageEx
{
+ /// <summary>
+ /// A constructor
+ /// Initializes the size of the items that are used in Music tab
+ /// </summary>
public MusicTab()
{
InitializeComponent();
InitializeSize();
}
+ /// <summary>
+ /// A method for initializing the size of the items that are used in Music tab
+ /// </summary>
private void InitializeSize()
{
ImgNoContents.Margin = new Thickness(0, SizeUtils.GetHeightSize(266), 0, SizeUtils.GetHeightSize(28));
LabelNoContents.FontSize = SizeUtils.GetFontSize(28);
}
+ /// <summary>
+ /// A method for initializing page when the page is appeared
+ /// </summary>
protected override void InitializePage()
{
}
+ /// <summary>
+ /// A method for finalizing page when the page is disappeared
+ /// </summary>
protected override void FinalizePage()
{
}
+ /// <summary>
+ /// A method for running hide animation
+ /// </summary>
public override void RunHideAnimation()
{
}
+ /// <summary>
+ /// A method for running show animation
+ /// </summary>
public override void RunShowAnimation()
{
}
namespace TVMediaHub.Tizen.Views
{
/// <summary>
- /// @TODO: Comment
+ /// A custom view for displaying Video group
/// </summary>
public partial class VideoGroup : RelativeLayout
{
+ /// <summary>
+ /// A label of group title
+ /// </summary>
private Xamarin.Forms.Label GroupTitle;
+ /// <summary>
+ /// A grid view of group content area
+ /// </summary>
private Grid GroupContentArea;
+ /// <summary>
+ /// Gets or sets the focus area of group title
+ /// </summary>
public Button GroupTitleFocusArea { get; protected set; }
+ /// <summary>
+ /// An event EventHandler for group item's focus event
+ /// </summary>
public EventHandler<GroupItemFocusEventArgs> GroupItemFocused;
/// <summary>
/// </summary>
public static readonly BindableProperty ItemsSourceProperty = BindableProperty.Create("ItemsSource", typeof(IEnumerable<MediaShortcutInfo>), typeof(VideoTab), default(IEnumerable<MediaShortcutInfo>));
+ /// <summary>
+ /// A command will be executed when item is clicked
+ /// </summary>
private ICommand ItemClickCommand;
/// <summary>
set { SetValue(ItemsSourceProperty, value); }
}
+ /// <summary>
+ /// A list of children's button objects of group
+ /// </summary>
private List<Button> ChildrenFocusList;
+ /// <summary>
+ /// @TODO:Comment
+ /// </summary>
public List<Button> LeftFocusList { get; protected set; }
+ /// <summary>
+ /// @TODO:Comment
+ /// </summary>
public List<Button> RightFocusList { get; protected set; }
+ /// <summary>
+ /// @TODO:Comment
+ /// </summary>
public List<KeyValuePair<double, Button>> BottomFocusList { get; protected set; }
+ /// <summary>
+ /// A constructor
+ /// Initializes several lists and properties that are used in this class
+ /// Initializes several size of the items that are used in this class
+ /// </summary>
public VideoGroup()
{
InitializeComponent();
PropertyChanged += VideoGroupPropertyChanged;
}
+ /// <summary>
+ /// A method for initializing several lists and properties that are used in this class
+ /// </summary>
private void Init()
{
ChildrenFocusList = new List<Button>();
GroupTitleFocusArea.Unfocused += TitleUnfocused;
}
+ /// <summary>
+ /// This method is called when the group's title is unfocused
+ /// </summary>
+ /// <param name="sender">The source of the event</param>
+ /// <param name="e">A Focus event's argument</param>
private void TitleUnfocused(object sender, FocusEventArgs e)
{
GroupTitle.AbortAnimation("FocusAnimation");
});
}
+ /// <summary>
+ /// This method is called when the group's title is focused
+ /// </summary>
+ /// <param name="sender">The source of the event</param>
+ /// <param name="e">A Focus event's argument</param>
private void TitleFocused(object sender, FocusEventArgs e)
{
GroupTitle.AbortAnimation("FocusAnimation");
});
}
+ /// <summary>
+ /// A method for initializing several size of the items that are used in this class
+ /// </summary>
private void InitializeSize()
{
GroupTitle.FontSize = SizeUtils.GetFontSize(24);
}
+ /// <summary>
+ /// This method is called when the properties is changed
+ /// </summary>
+ /// <param name="sender">The source of the event</param>
+ /// <param name="e">A propertyChanged event argument</param>
private void VideoGroupPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
if (e.PropertyName.Equals("ItemsSource"))
}
}
+ /// <summary>
+ /// A method for making focus chain among items
+ /// </summary>
private void SetFocusChain()
{
if (ChildrenFocusList.Count < 1)
}
}
+ /// <summary>
+ /// @TODO:comment
+ /// </summary>
private void SetFocusList()
{
var totalCount = ChildrenFocusList.Count - 1;
}
}
+ /// <summary>
+ /// A method for setting the command to ItemClickCommand
+ /// </summary>
+ /// <param name="command">A command to be set</param>
public void SetClickCommand(ICommand command)
{
ItemClickCommand = command;
namespace TVMediaHub.Tizen.Views
{
/// <summary>
- /// @TODO: Comment
+ /// A custom view for displaying video item
/// </summary>
public partial class VideoItem : RelativeLayout
{
+ /// <summary>
+ /// A flag that whether the item is loaded or not
+ /// </summary>
private bool IsLoaded = false;
+ /// <summary>
+ /// An enumeration for ItemStatus
+ /// </summary>
public enum ItemStatus
{
NORMAL = 0,
SELECTED,
};
+ /// <summary>
+ /// A value of current ItemStatus
+ /// </summary>
private ItemStatus CurStatus;
private Rectangle NormalShadowBounds;
private Rectangle TitleContainerBounds;
+ /// <summary>
+ /// An EventHandler for focus event of item
+ /// </summary>
public EventHandler OnFocusedEventHandler;
+ /// <summary>
+ /// An EventHandler for unfocus event of item
+ /// </summary>
public EventHandler OnUnfocusedEventHandler;
+ /// <summary>
+ /// A delegate will be executed when the item is clicked
+ /// </summary>
+ /// <param name="info">A clicked item's MediaInformation</param>
public delegate void ClickEventHandler(MediaInformation info);
+ /// <summary>
+ /// A ClickEventHandler for click event of the item
+ /// </summary>
public ClickEventHandler OnItemClickedHandler;
+ /// <summary>
+ /// Identifies the IsDeleteMode bindable property
+ /// </summary>
public static readonly BindableProperty IsDeleteModeProperty = BindableProperty.Create("IsDeleteMode", typeof(bool), typeof(VideoItem), false);
-
+ /// <summary>
+ /// Gets or sets the value whether item is delete mode or not
+ /// </summary>
public bool IsDeleteMode
{
set
}
}
+ /// <summary>
+ /// Identifies the VideoInfo bindable property
+ /// </summary>
public static readonly BindableProperty VideoInfoProperty = BindableProperty.Create("VideoInfo", typeof(MediaInformation), typeof(VideoItem), null);
+ /// <summary>
+ /// Gets or sets the VideoInfo of current video
+ /// </summary>
public MediaInformation VideoInfo
{
set
}
}
+ /// <summary>
+ /// A constructor
+ /// Initializes the size of the items that are used in this class
+ /// </summary>
public VideoItem()
{
InitializeComponent();
PropertyChanged += VideoTabPropertyChanged;
}
+ /// <summary>
+ /// A method for initializing size of the items that are used in this class
+ /// </summary>
private void InitializeSize()
{
int w0 = SizeUtils.GetWidthSize(0);
CheckImage.ImageColor = ElmSharp.Color.White;
}
+ /// <summary>
+ /// Positions and sizes the children of a Layout.
+ /// </summary>
+ /// <param name="x">A value representing the x coordinate of the child region bounding box.</param>
+ /// <param name="y">A value representing the y coordinate of the child region bounding box.</param>
+ /// <param name="width">A value representing the width of the child region bounding box.</param>
+ /// <param name="height">A value representing the height of the child region bounding box.</param>
protected override void LayoutChildren(double x, double y, double width, double height)
{
if (IsLoaded == false)
}
}
+ /// <summary>
+ /// A method for getting item's button object
+ /// </summary>
+ /// <returns>A button object</returns>
public Button GetFocusArea()
{
return FocusArea;
}
+ /// <summary>
+ /// This method is called when item is unfocused
+ /// </summary>
+ /// <param name="sender">The source of the event</param>
+ /// <param name="e">A Focus event's argument</param>
public void OnUnfocused(object sender, FocusEventArgs e)
{
Easing easing = new Easing(EasingFunction.EasyIn2);
ImageArea.LayoutTo(NormalBounds, 167, easing);
}
+ /// <summary>
+ /// This method is called when item is focused
+ /// </summary>
+ /// <param name="sender">The source of the event</param>
+ /// <param name="e">A Focus event's argument</param>
public void OnFocused(object sender, FocusEventArgs e)
{
Easing easing = new Easing(EasingFunction.EasyIn1);
});
}
+ /// <summary>
+ /// This method is called when item is focused
+ /// </summary>
+ /// <param name="sender">The source of the event</param>
+ /// <param name="e">A Focus event's argument</param>
private async void OnItemClicked(object sender, EventArgs e)
{
if (DimImage.AnimationIsRunning("LayoutTo"))
}
}
+ /// <summary>
+ /// A method for updating view according to current status
+ /// </summary>
private void UpdateView()
{
switch (CurStatus)
}
}
+ /// <summary>
+ /// A method for pushing VideoPlayer page at MainPage of TV MediaHub
+ /// </summary>
private void PushNavigationPage()
{
Program.TransitionTo(new VideoPlayer());
}
+ /// <summary>
+ /// This method is called when the properties is changed
+ /// </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)
{
if (e.PropertyName.CompareTo("IsDeleteMode") == 0)
/// This method is called when previous button is clicked
/// </summary>
/// <param name="sender">The source of the event</param>
- /// <param name="e">A event's argument</param>
+ /// <param name="e">An event's argument</param>
private async void PreviousBtnClicked(object sender, EventArgs e)
{
if (ControlArea.Opacity == 0)
/// This method is called when rewind button is clicked
/// </summary>
/// <param name="sender">The source of the event</param>
- /// <param name="e">A event's argument</param>
+ /// <param name="e">An event's argument</param>
private void RewindBtnClicked(object sender, EventArgs e)
{
PlayBackForwardIndex = 0;
/// This method is called when pause/play button is clicked
/// </summary>
/// <param name="sender">The source of the event</param>
- /// <param name="e">A event's argument</param>
+ /// <param name="e">An event's argument</param>
private void PausePlayBtnClicked(object sender, EventArgs e)
{
if (SpeedInfo.Opacity == 1)
/// This method is called when forward button is clicked
/// </summary>
/// <param name="sender">The source of the event</param>
- /// <param name="e">A event's argument</param>
+ /// <param name="e">An event's argument</param>
private void ForwardBtnClicked(object sender, EventArgs e)
{
PlayBackRewindIndex = 0;
/// This method is called when next button is clicked
/// </summary>
/// <param name="sender">The source of the event</param>
- /// <param name="e">A event's argument</param>
+ /// <param name="e">An event's argument</param>
private async void NextBtnClicked(object sender, EventArgs e)
{
if (ControlArea.Opacity == 0)
/// This method is called when cancel button is clicked
/// </summary>
/// <param name="sender">The source of the event</param>
- /// <param name="e">A event's argument</param>
+ /// <param name="e">An event's argument</param>
private void OnCancelClicked(object sender, EventArgs e)
{
ChangeTabStatusCommand?.Execute("");
/// This method is called when SelectAll button is clicked
/// </summary>
/// <param name="sender">The source of the event</param>
- /// <param name="e">A event's argument</param>
+ /// <param name="e">An event's argument</param>
private void OnSelectAllClicked(object sender, EventArgs e)
{
}
/// This method is called when OK button is clicked
/// </summary>
/// <param name="sender">The source of the event</param>
- /// <param name="e">A event's argument</param>
+ /// <param name="e">An event's argument</param>
private void OnOKClicked(object sender, EventArgs e)
{
// TODO : Change to delete Content command