}
}
+ /// <summary>
+ /// Checks application isn't pinnable
+ /// </summary>
+ /// <param name="appID">Application id for checking</param>
+ /// <returns>If the application isn't pinnable return 'true'</returns>
public static bool IsNonPinnableApps(string appID)
{
if (appID.CompareTo(TVHomeAppID) == 0 ||
return false;
}
+ /// <summary>
+ /// Checks application have to be hidden at recently used application
+ /// </summary>
+ /// <param name="appID">Application id for checking</param>
+ /// <returns>If the application have to be hidden, return 'true'</returns>
public static bool IsHiddenRecentApp(string appID)
{
if (appID.CompareTo(TVHomeAppID) == 0 ||
}
IMediaContentAPIs apiSet = DependencyService.Get<IMediaContentAPIs>();
- var recentPlayedMedia = DependencyService.Get<IMediaContentAPIs>().GetRecentlyPladyedMedia(10);
+ var recentPlayedMedia = DependencyService.Get<IMediaContentAPIs>().GetRecentlyPlayedMedia(10);
foreach (var item in recentPlayedMedia)
/// <summary>
/// Default implementation of IDebuggingAPIs interface .
- /// This is required for the unit testing of the Calculator application. </summary>
+ /// This is required for the unit testing of the Calculator application.
+ /// </summary>
private class DefaultSM : IDebuggingAPIs
{
/// <summary>
- /// A method displays a error log. </summary>
+ /// A method displays a error log.
+ /// </summary>
/// <param name="message"> A error message.</param>
/// <param name="file"> A file name.</param>
/// <param name="func"> A function name.</param>
}
/// <summary>
- /// A method displays a dialog with a given message. </summary>
+ /// A method displays a dialog with a given message.
+ /// </summary>
/// <param name="message"> A debugging message.</param>
/// <param name="file"> A file name.</param>
/// <param name="func"> A function name.</param>
}
/// <summary>
- /// A method displays a debugging log. </summary>
+ /// A method displays a debugging log.
+ /// </summary>
/// <param name="message"> A debugging message.</param>
public void Popup(string message)
{
}
/// <summary>
- /// DebuggingUtils constructor which set interface instance. </summary>
+ /// DebuggingUtils constructor which set interface instance.
+ /// </summary>
private DebuggingUtils()
{
if (DependencyService.Get<IDebuggingAPIs>() != null)
}
/// <summary>
- /// A method displays a debugging message </summary>
+ /// A method displays a debugging message
+ /// </summary>
/// <param name="message"> A list of command line arguments.</param>
/// <param name="file"> A file name.</param>
/// <param name="func"> A function name.</param>
}
/// <summary>
- /// A method displays a error message </summary>
+ /// A method displays a error message
+ /// </summary>
/// <param name="message"> A list of command line arguments.</param>
/// <param name="file"> A file name.</param>
/// <param name="func"> A function name.</param>
}
/// <summary>
- /// A method displays a pop up message </summary>
+ /// A method displays a pop up message
+ /// </summary>
/// <param name="message"> A list of command line arguments.</param>
public static void Popup(string message)
{
/// </summary>
public interface IFileSystemAPIs
{
+ /// <summary>
+ /// A directory path which should be used for app data storing.
+ /// </summary>
string AppDataStorage
{
get;
}
+ /// <summary>
+ /// A directory path which should be used for app resource storing.
+ /// </summary>
string AppResourceStorage
{
get;
}
+ /// <summary>
+ /// A directory path which should be used for sharing between apps.
+ /// </summary>
string PlatformShareStorage
{
get;
namespace LibTVRefCommonPortable.Utils
{
+ /// <summary>
+ /// A information of recently played media content
+ /// </summary>
public struct RecentlyPlayedMedia
{
+ /// <summary>
+ /// A id of media content
+ /// </summary>
public string MediaId;
+
+ /// <summary>
+ /// A path of media content thumbnail
+ /// </summary>
public string ThumbnailPath;
+
+ /// <summary>
+ /// A path of media content
+ /// </summary>
public string FilePath;
+
+ /// <summary>
+ /// A title of media content
+ /// </summary>
public string DisplayName;
+
+ /// <summary>
+ /// Last played time of media content
+ /// </summary>
public DateTime PlayedAt;
}
+ /// <summary>
+ /// A interface for getting recently played media contents.
+ /// </summary>
public interface IMediaContentAPIs
{
- IEnumerable<RecentlyPlayedMedia> GetRecentlyPladyedMedia(int limitation);
+ /// <summary>
+ /// A method for getting recently played media content list
+ /// </summary>
+ /// <param name="limitation">Maximum count of list</param>
+ /// <returns>The recently played media content list</returns>
+ IEnumerable<RecentlyPlayedMedia> GetRecentlyPlayedMedia(int limitation);
}
}
namespace LibTVRefCommonPortable.Utils
{
+ /// <summary>
+ /// A interface for getting system setting informations.
+ /// </summary>
public interface ISystemSettings
{
+ /// <summary>
+ /// A method for getting system model name.
+ /// </summary>
+ /// <param name="modelName">The system model name</param>
+ /// <returns>The result whether getting the modelName is done</returns>
bool GetSystemModelName(out string modelName);
}
}
<?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 Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
+ <RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
+ <RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
+ <ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">D:\git\home\LibTVRefCommonTizen\LibTVRefCommonTizen.project.lock.json</ProjectAssetsFile>
+ <NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
+ <NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\samsung\.nuget\packages\</NuGetPackageFolders>
+ <NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">ProjectJson</NuGetProjectStyle>
+ <NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">4.2.0</NuGetToolVersion>
</PropertyGroup>
- <ImportGroup>
- <Import Project="$(NuGetPackageRoot)\Xamarin.Forms\2.3.5-r233-003\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets" Condition="Exists('$(NuGetPackageRoot)\Xamarin.Forms\2.3.5-r233-003\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets')" />
+ <PropertyGroup>
+ <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
+ </PropertyGroup>
+ <ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
+ <Import Project="$(NuGetPackageRoot)xamarin.forms\2.3.5-r233-003\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets" Condition="Exists('$(NuGetPackageRoot)xamarin.forms\2.3.5-r233-003\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets')" />
</ImportGroup>
</Project>
\ No newline at end of file
namespace LibTVRefCommonTizen.Ports
{
+ /// <summary>
+ /// Handles the MediaContent APIs
+ /// </summary>
public class MediaContentPort : IMediaContentAPIs
{
+ /// <summary>
+ /// The constructor of this class
+ /// Connects content database
+ /// </summary>
public MediaContentPort()
{
DbgPort.D("MediaContentPort");
ContentDatabase.Connect();
}
- public IEnumerable<RecentlyPlayedMedia> GetRecentlyPladyedMedia(int limitation)
+ /// <summary>
+ /// A method for getting recently played media content list
+ /// </summary>
+ /// <param name="limitation">Maximum count of list</param>
+ /// <returns>The recently played media content list</returns>
+ public IEnumerable<RecentlyPlayedMedia> GetRecentlyPlayedMedia(int limitation)
{
var recentlyPlayedVideos = new List<RecentlyPlayedMedia>();
var contentFilter = new ContentFilter();
namespace LibTVRefCommonTizen.Ports
{
+ /// <summary>
+ /// Handles the SystemSettings APIs
+ /// </summary>
public class SystemSettingsPort : ISystemSettings
{
public static readonly int ErrorNone = 0;
internal static extern int SystemInfoGetPlatformString(string key, out string value);
}
-
+ /// <summary>
+ /// A method for getting system model name.
+ /// </summary>
+ /// <param name="modelName">The system model name</param>
+ /// <returns>The result whether getting the modelName is done</returns>
public bool GetSystemModelName(out string modelName)
{
if (SystemInfo.SystemInfoGetPlatformString(KeyModelName, out modelName) != ErrorNone)
<?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 Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
+ <RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
+ <RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
+ <ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">D:\git\home\TVApps\TVApps.TizenTV\TVApps.TizenTV.project.lock.json</ProjectAssetsFile>
+ <NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
+ <NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\samsung\.nuget\packages\</NuGetPackageFolders>
+ <NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">ProjectJson</NuGetProjectStyle>
+ <NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">4.2.0</NuGetToolVersion>
</PropertyGroup>
- <ImportGroup>
- <Import Project="$(NuGetPackageRoot)\Xamarin.Forms\2.3.5-r233-003\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets" Condition="Exists('$(NuGetPackageRoot)\Xamarin.Forms\2.3.5-r233-003\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets')" />
+ <PropertyGroup>
+ <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
+ </PropertyGroup>
+ <ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
+ <Import Project="$(NuGetPackageRoot)xamarin.forms\2.3.5-r233-003\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets" Condition="Exists('$(NuGetPackageRoot)xamarin.forms\2.3.5-r233-003\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets')" />
</ImportGroup>
</Project>
\ No newline at end of file
/// <summary>
/// Identifies the IsFocused bindable property
/// </summary>
- public static readonly BindableProperty IsFocusedProperty = BindableProperty.Create("IsFocused", typeof(bool), typeof(AppItemCell), default(bool), BindingMode.TwoWay);
+ public static readonly BindableProperty IsItemFocusedProperty = BindableProperty.Create("IsFocused", typeof(bool), typeof(AppItemCell), default(bool), BindingMode.TwoWay);
/// <summary>
/// Gets or sets focus state of AppItemCell
/// </summary>
- public bool IsFocused
+ public bool IsItemFocused
{
- get { return (bool)GetValue(IsFocusedProperty); }
- set { SetValue(IsFocusedProperty, value); }
+ get { return (bool)GetValue(IsItemFocusedProperty); }
+ set { SetValue(IsItemFocusedProperty, value); }
}
public static readonly BindableProperty PinCommandProperty = BindableProperty.Create("PinCommand", typeof(ICommand), typeof(AppItemCell));
/// <param name="e">The event that is occurred when button is focused</param>
private void OnFocused(object sender, EventArgs e)
{
- IsFocused = true;
+ IsItemFocused = true;
OnPropertyChanged("IsFocused");
OnFocusedCommand?.Execute("");
/// <param name="e">The event that is occurred when button is unfocused</param>
private void OnUnFocused(object sender, EventArgs e)
{
- IsFocused = false;
+ IsItemFocused = false;
OnPropertyChanged("IsFocused");
ButtonTitle.On<Tizen>().SetFontWeight(FontWeight.Normal);
}
}
+ /// <summary>
+ /// A command will be executed if focus chain is changed
+ /// </summary>
public ICommand OnChangeFocusChainingCommand { get; set; }
/// <summary>
}
}
+ /// <summary>
+ /// A method for getting upper app list
+ /// </summary>
+ /// <returns>A list of views in upper side</returns>
public IList<View> GetAppsUpperList()
{
return AppUpperList.Children;
}
+ /// <summary>
+ /// A method for getting lower app list
+ /// </summary>
+ /// <returns>A list of views in lower side</returns>
public IList<View> GetAppsLowerList()
{
return AppLowerList.Children;
/// </summary>
public Dictionary<string, string> PinnedApps;
+ /// <summary>
+ /// A name of pinned application
+ /// </summary>
public string PinnedAppName;
+
+ /// <summary>
+ /// A name of unpinned application
+ /// </summary>
public string UnpinnedAppName;
/// <summary>
ViewModel.ChangeCurrentStatus(AppsStatus.Default);
}
+ /// <summary>
+ /// A method for changing status of applications to Default
+ /// </summary>
public void ChangeToDefaultStatus()
{
ViewModel.ChangeCurrentStatus(AppsStatus.Default);
}
/// <summary>
- /// A method sends application delete request
- /// If application is pinned, removes in PinnedApps
+ /// A method for checking the application is removable
+ /// If the application is removable, show Delete Popup
/// </summary>
- /// <param name="appID">The ID of application for deleting</param>
+ /// <param name="appID">The ID of application for checking</param>
public void CheckDeleteApp(string appID)
{
DebuggingUtils.Dbg("check that the app( " + appID + ") can be deleted");
}
}
+ /// <summary>
+ /// A method sends application delete request
+ /// If application is pinned, removes in PinnedApps
+ /// </summary>
+ /// <param name="appID">The ID of application for deleting</param>
public void DeleteApp(string appID)
{
// if the app to be deleted is pinned, remove the app in the pinned apps list
set;
}
+ /// <summary>
+ /// Gets or sets recently pinned application name
+ /// </summary>
public string PinnedAppName
{
get
}
}
+ /// <summary>
+ /// Gets or sets recently unpinned application name
+ /// </summary>
public string UnpinnedAppName
{
get
public event PropertyChangedEventHandler PropertyChanged;
private bool isPinAppRequested = false;
+
/// <summary>
/// A flag indicates whether pin app is requested or not
/// If TV Home requests pin app to TV Apps, IsPinAppRequested will be true
private Button CancelButton;
/// <summary>
+ /// Gets Cancel Button
+ /// </summary>
+ /// <returns>Returns Cancel Button</returns>
+ public Button GetCancelButton()
+ {
+ return CancelButton;
+ }
+
+ /// <summary>
/// A constructor
/// </summary>
public FooterDeleteStatus()
yConstraint: Constraint.Constant(SizeUtils.GetHeightSize(662)),
xConstraint: Constraint.Constant(SizeUtils.GetWidthSize(96 + 1130 + 300 + 2)));
}
-
- public Button GetCancelButton()
- {
- return CancelButton;
- }
}
}
set { SetValue(DeleteAppCommandProperty, value); }
}
+ /// <summary>
+ /// A command will be executed if the Sort DropdownList item is selected
+ /// </summary>
public static readonly BindableProperty SortOptionIndexCommandProperty = BindableProperty.Create("SortOptionIndexCommand", typeof(Command), typeof(FooterNormalStatus), null);
public ICommand SortOptionIndexCommand
{
set { SetValue(SortOptionIndexCommandProperty, value); }
}
+ /// <summary>
+ /// A command will be executed if the Context Popup is showed or dismissed
+ /// </summary>
public ICommand ChangeBackKeyInfoCommand { get; set; }
/// <summary>
CreateOptionButton();
}
+ /// <summary>
+ /// Gets Sort DropdownList
+ /// </summary>
+ /// <returns>Returns Sort DropdownList</returns>
public DropdownList GetSortDropdownList()
{
return SortButton;
}
+ /// <summary>
+ /// Creates Option Button
+ /// </summary>
private void CreateOptionButton()
{
OptionButton = new Button()
xConstraint: Constraint.Constant(SizeUtils.GetWidthSize(96 + 1130 + 300 + 2)));
}
+ /// <summary>
+ /// Creates Sort DropdownList
+ /// </summary>
private void CreateSortButton()
{
List<string> SortList = new List<string> { "Newest", "A - Z", "Z - A" };
xConstraint: Constraint.Constant(SizeUtils.GetWidthSize(96 + 1130)));
}
+ /// <summary>
+ /// A method for handling Option Button is clicked
+ /// </summary>
+ /// <param name="sender">The source of the event</param>
+ /// <param name="e">The event that is occurred when OptionButton is clicked</param>
void OnOptionsClicked(object sender, EventArgs e)
{
if (isPopupShowing)
public partial class FooterPinStatus : RelativeLayout
{
private Button DoneButton;
+ /// <summary>
+ /// Gets Done Button
+ /// </summary>
+ /// <returns>Returns Done Button object</returns>
+ public Button GetDoneButton()
+ {
+ return DoneButton;
+ }
+
+ /// <summary>
+ /// A Container for additional information labels
+ /// </summary>
+ public StackLayout additionalInfo;
+
+ /// <summary>
+ /// A label for displaying pinned or unpinned application name
+ /// </summary>
private Xamarin.Forms.Label AppNameLabel;
+
+ /// <summary>
+ /// A label for displaying pin or unpin information
+ /// </summary>
private Xamarin.Forms.Label AfterLabel;
+
+ /// <summary>
+ /// Counts of pinned applications
+ /// </summary>
private static int pinnedAppCount = 0;
- public StackLayout additionalInfo;
/// <summary>
/// Identifies the SumOfCheckedApp bindable property
pinnedAppCount = SumOfCheckedApp;
}
+ /// <summary>
+ /// Creates Labels and Container
+ /// </summary>
private void CreateFooterAdditionalText()
{
SetBinding(FooterPinStatus.PinnedAppNameProperty, new Binding("PinnedAppName"));
PropertyChanged += FooterPinStatusPropertyChanged;
}
-
+ /// <summary>
+ /// Creates Done Button
+ /// </summary>
private void CreateDoneButton()
{
DoneButton = new Button()
widthConstraint: Constraint.Constant(SizeUtils.GetWidthSize(300)),
yConstraint: Constraint.Constant(SizeUtils.GetHeightSize(662)),
xConstraint: Constraint.Constant(SizeUtils.GetWidthSize(96 + 1332 + 96)));
- }
-
- public Button GetDoneButton()
- {
- return DoneButton;
}
+ /// <summary>
+ /// This method is called when the properties of FooterPinStatus is changed
+ /// </summary>
+ /// <param name="sender">The source of the event</param>
+ /// <param name="e">The event that is occurred when Property is changed</param>
private void FooterPinStatusPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
if (e.PropertyName.Equals("SumOfCheckedApp"))
/// </summary>
public partial class MainPage : ContentPage
{
- private DropdownList sortList;
- private Button doneButton;
- private Button cancelButton;
- private bool isShowOptions = false;
-
/// <summary>
/// SubPanel icon's transition height value when it focused.
/// </summary>
set { SetValue(DeletePopupCommandProperty, value); }
}
+ /// <summary>
+ /// A method for animation when application is terminated
+ /// </summary>
private void PlayHideAnimation()
{
var animation = new Animation();
animation.Commit(this, "QuitAnimation", 16, 834, null, (v, s) => AppControlUtils.SelfTerminate());
}
-
/// <summary>
/// A constructor
/// Adds PropertyChanged event handler and MenuKey event listener
});
}
+ /// <summary>
+ /// A method for customizing behavior immediately prior to the Page becoming visible
+ /// Sets focus chain and Moves focus to first App icon
+ /// </summary>
protected override async void OnAppearing()
{
base.OnAppearing();
MakeFocusChaining();
}
+ /// <summary>
+ /// A method for setting focus chain in list
+ /// </summary>>
private void MakeFocusChaining()
{
List<View> upperList = AppList.GetAppsUpperList().ToList();
SetFocusChainingWithCurrentStatus(CurrentStatus);
}
+ /// <summary>
+ /// Sets focus chain between two items
+ /// </summary>
+ /// <param name="left">A left App icon</param>
+ /// <param name="right">A right App icon</param>
private void SetFocusChainingLeftAndRight(Button left, Button right)
{
left?.On<Tizen>()?.SetNextFocusRightView(right);
right?.On<Tizen>()?.SetNextFocusLeftView(left);
}
+ /// <summary>
+ /// A method for setting focus chain list with FooterNormalStatus
+ /// </summary>
private void SetFocusChainingUpAndDownForDefaultMode()
{
List<View> lowerList = AppList.GetAppsLowerList().ToList();
- sortList = FooterNormal.GetSortDropdownList();
+ DropdownList sortList = FooterNormal.GetSortDropdownList();
foreach (var item in lowerList)
{
}
}
+ /// <summary>
+ /// A method for setting focus chain list with FooterDeleteStatus
+ /// </summary>
private void SetFocusChainingUpAndDownForDeleteMode()
{
List<View> lowerList = AppList.GetAppsLowerList().ToList();
- cancelButton = FooterDelete.GetCancelButton();
+ Button cancelButton = FooterDelete.GetCancelButton();
foreach (var item in lowerList)
{
cancelButton?.On<Tizen>()?.SetNextFocusLeftView(cancelButton);
}
+ /// <summary>
+ /// A method for setting focus chain list with FooterPinStatus
+ /// </summary>
private void SetFocusChainingUpAndDownForPinMode()
{
List<View> lowerList = AppList.GetAppsLowerList().ToList();
- doneButton = FooterPin.GetDoneButton();
+ Button doneButton = FooterPin.GetDoneButton();
foreach (var item in lowerList)
{
doneButton?.On<Tizen>()?.SetNextFocusLeftView(doneButton);
}
+ /// <summary>
+ /// A method for changing focus chain list by Status
+ /// </summary>
+ /// <param name="status">The TVApps Application status</param>
private void SetFocusChainingWithCurrentStatus(AppsStatus status)
{
switch (status)
FooterPin.additionalInfo.IsVisible = false;
FooterDelete.IsVisible = false;
BackKeyInfo.Text = "Quit";
- if (isShowOptions)
- {
- isShowOptions = false;
- }
- else
- {
- AppList.InitializeFocus();
- }
-
+ AppList.InitializeFocus();
break;
case AppsStatus.Pin:
FooterNormal.IsVisible = false;
namespace CoreApp
{
+ /// <summary>
+ /// Handles recent screen shot of launched applications
+ /// </summary>
public class Sniper
{
+ /// <summary>
+ /// Main window of the application
+ /// </summary>
private IntPtr nativeWindow;
+
+ /// <summary>
+ /// A path of storage for recent screen shot of launched application
+ /// </summary>
private string storagePath;
+
+ /// <summary>
+ /// A width of recent screen shot
+ /// </summary>
private int imageWidth;
+
+ /// <summary>
+ /// A height of recent screen shot
+ /// </summary>
private int imageHeight;
+
+ /// <summary>
+ /// A flag indicates whether updating recent screen shot or not
+ /// </summary>
public bool SkipUpdateFlag;
+
+ /// <summary>
+ /// Callbacks of sniper events
+ /// </summary>
private static InterOp.SniperCallback callbacks;
+ /// <summary>
+ /// A EventHandler handles recent screen shot update event
+ /// </summary>
public event EventHandler<Event> UpdatedEvent;
+
+ /// <summary>
+ /// A EventHandler handles add or remove application
+ /// </summary>
public event EventHandler<Event> AddRemoveEvent;
+
+ /// <summary>
+ /// A EventHandler handles skip update event
+ /// </summary>
public event EventHandler<Event> SkipUpdateEvent;
+ /// <summary>
+ /// TODO : Comment this
+ /// </summary>
public class Event : EventArgs
{
public string AppId;
public string Info;
}
+ /// <summary>
+ /// A method for writing debug log
+ /// </summary>
+ /// <param name="message">A log message</param>
+ /// <param name="file">A path of caller file</param>
+ /// <param name="func">A name of caller function</param>
+ /// <param name="line">A line number of caller line</param>
private void WriteLog(string message, [CallerFilePath] string file = "", [CallerMemberName] string func = "", [CallerLineNumber] int line = 0)
{
Log.Debug("sniper", message);
}
+ /// <summary>
+ /// A method for handling launched application
+ /// </summary>
+ /// <param name="appId">A ID of launched application</param>
+ /// <param name="instanceId">A instance ID of launched application</param>
private void AddedCallback(string appId, string instanceId)
{
EventHandler<Event> handler = AddRemoveEvent;
handler(this, eventInfo);
}
+ /// <summary>
+ /// A method for handling terminated application
+ /// </summary>
+ /// <param name="appId">A ID of terminated application</param>
+ /// <param name="instanceId">A instance ID of terminated application</param>
private void RemovedCallback(string appId, string instanceId)
{
EventHandler<Event> handler = AddRemoveEvent;
handler(this, eventInfo);
}
+ /// <summary>
+ /// A method for handling application screen is updated
+ /// </summary>
+ /// <param name="appId">A ID of application that screen is updated</param>
+ /// <param name="instanceId">A instance ID of application that screen is updated</param>
+ /// <param name="Filename">A path of application screen shot</param>
private void UpdatedCallback(string appId, string instanceId, string Filename)
{
EventHandler<Event> handler = UpdatedEvent;
handler(this, eventInfo);
}
+ /// <summary>
+ /// A method for handling screen update is skipped
+ /// </summary>
+ /// <param name="appId">A ID of application that screen update is skipped</param>
+ /// <param name="instanceId">A instance ID of application that screen update is skipped</param>
+ /// <param name="Filename">A path of application screen shot</param>
+ /// <returns>Returns finish code</returns>
private int SkipUpdateCallback(string appId, string instanceId, string Filename)
{
EventHandler<Event> handler = SkipUpdateEvent;
return 0;
}
- public Sniper(IntPtr win, string path, int w, int h)
+ /// <summary>
+ /// Constructor
+ /// </summary>
+ /// <param name="window">Main window of this application</param>
+ /// <param name="path">Storage path</param>
+ /// <param name="width">Screen shot width</param>
+ /// <param name="height">Screen shot height</param>
+ public Sniper(IntPtr window, string path, int width, int height)
{
- nativeWindow = win;
+ nativeWindow = window;
storagePath = path;
- imageWidth = w;
- imageHeight = h;
+ imageWidth = width;
+ imageHeight = height;
SkipUpdateFlag = false;
}
+ /// <summary>
+ /// A method for starting monitoring
+ /// Adds callbacks and initialize Sniper class
+ /// </summary>
public void StartMonitor()
{
try
WriteLog("Sniper starts monitoring : " + storagePath + "ImageSize : " + imageWidth + "x" + imageHeight);
}
+ /// <summary>
+ /// A method stops monitoring
+ /// </summary>
public void StopMonitor()
{
try
WriteLog("Sniper stops monitoring : " + storagePath + "ImageSize : " + imageWidth + "x" + imageHeight);
}
+ /// <summary>
+ /// A method requests updating application screen shot
+ /// </summary>
+ /// <param name="instanceId">A instance ID of application</param>
public void RequestUpdate(string instanceId)
{
try
<?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 Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
+ <RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
+ <RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
+ <ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">D:\git\home\TVHome\TVHome.TizenTV\TVHome.TizenTV.project.lock.json</ProjectAssetsFile>
+ <NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
+ <NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\samsung\.nuget\packages\</NuGetPackageFolders>
+ <NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">ProjectJson</NuGetProjectStyle>
+ <NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">4.2.0</NuGetToolVersion>
</PropertyGroup>
- <ImportGroup>
- <Import Project="$(NuGetPackageRoot)\Xamarin.Forms\2.3.5-r233-003\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets" Condition="Exists('$(NuGetPackageRoot)\Xamarin.Forms\2.3.5-r233-003\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets')" />
+ <PropertyGroup>
+ <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
+ </PropertyGroup>
+ <ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
+ <Import Project="$(NuGetPackageRoot)xamarin.forms\2.3.5-r233-003\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets" Condition="Exists('$(NuGetPackageRoot)xamarin.forms\2.3.5-r233-003\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets')" />
</ImportGroup>
</Project>
\ No newline at end of file
<icon>xahome.png</icon>
<label>Home</label>
</ui-application>
- <ui-application appid="org.tizen.xaapps" exec="xaapps.exe" multiple="false" nodisplay="true" taskmanage="false" splash-screen-display="true" type="dotnet" launch_mode="single">
- <icon>xaapps.png</icon>
- <label>Apps</label>
- </ui-application>
<shortcut-list />
<privileges>
<privilege>http://tizen.org/privilege/bluetooth</privilege>
{
}
+ /// <summary>
+ /// A method for changing context popup mode
+ /// </summary>
+ /// <param name="showOptions">Options for change context popup mode</param>
public override void ChangeShowOptionsMode(bool showOptions)
{
}
/// </summary>
public abstract void ShowContextPopup();
- public abstract void ChangeShowOptionsMode(bool isShowOptions);
+ /// <summary>
+ /// A method for changing context popup mode
+ /// </summary>
+ /// <param name="showOptions">Options for change context popup mode</param>
+ public abstract void ChangeShowOptionsMode(bool showOptions);
}
}
{
}
+
+ /// <summary>
+ /// A method for changing context popup mode
+ /// </summary>
+ /// <param name="showOptions">Options for change context popup mode</param>
public override void ChangeShowOptionsMode(bool showOptions)
{
}
#pragma warning restore CS4014
}
+ /// <summary>
+ /// A method for changing context popup mode
+ /// </summary>
+ /// <param name="showOptions">Options for change context popup mode</param>
public override async void ChangeShowOptionsMode(bool showOptions)
{
if (showOptions)
{
}
+ /// <summary>
+ /// A method for changing context popup mode
+ /// </summary>
+ /// <param name="showOptions">Options for change context popup mode</param>
public override void ChangeShowOptionsMode(bool showOptions)
{
}
}
*/
-
- private void AnimationInitialize(object sender, EventArgs e)
- {
- }
-
/// <summary>
/// Handles Button Clicked event
/// </summary>
isPopupShowing = true;
}
+ /// <summary>
+ /// A method for changing context popup mode
+ /// </summary>
+ /// <param name="showOptions">Options for change context popup mode</param>
public override void ChangeShowOptionsMode(bool showOptions)
{
}
/// Gets or set MainList for MainPanel
/// </summary>
public IEnumerable<ShortcutInfo> MainList { get; set; }
+
/// <summary>
/// Gets or set RecentList for Recent SubPanel
/// </summary>
public IEnumerable<ShortcutInfo> RecentList { get; set; }
+
/// <summary>
/// Gets or set AppList for Apps SubPanel
/// </summary>
public IEnumerable<ShortcutInfo> AppList { get; set; }
+
/// <summary>
/// Gets or set SettingsList for Settings SubPanel
/// </summary>
/// A command for executing when MainPanel is focused.
/// </summary>
public Command MainPanelFocusedCommand { get; set; }
+
/// <summary>
/// A command for executing when SubPanel is focused.
/// </summary>
public Command SubPanelFocusedCommand { get; set; }
+
/// <summary>
/// A command for changing the status to Move status
/// </summary>
public Command SetMoveStatusCommand { get; set; }
+
/// <summary>
/// A command for changing the status to Unpin status
/// </summary>
public Command SetUnpinStatusCommand { get; set; }
+ /// <summary>
+ /// A command for moving item in sub panel
+ /// </summary>
public Command OnMoveCommand { get; set; }
+
+ /// <summary>
+ /// A command for unpin item in sub panel
+ /// </summary>
public Command OnUnpinCommand { get; set; }
+
+ /// <summary>
+ /// A command for delete a recent item
+ /// </summary>
public Command OnClearCommand { get; set; }
+
+ /// <summary>
+ /// A command for delete all recent items
+ /// </summary>
public Command OnClearAllCommand { get; set; }
/// <summary>
/// Gets or set CurrentStatus of HomeStatus
/// </summary>
public HomeStatus CurrentStatus { get; private set; }
+
/// <summary>
/// Gets or set SelectedMenuName of HomeMenuItem
/// </summary>
}
/// <summary>
- /// Sub panel's spacing size
+ /// Apps, Settings sub panel's spacing size
/// </summary>
public int SubPanelSpacing
{
}
}
+ /// <summary>
+ /// Recent sub panel's spacing size
+ /// </summary>
public double SubThumbPanelSpacing
{
get
}
}
+ /// <summary>
+ /// A method for unpin application
+ /// </summary>
+ /// <param name="appId">A application ID for unpin</param>
private void UnpinAppShortcutInfo(string appId)
{
RemovePinnedApp(appId);
}
+ /// <summary>
+ /// A method for updating pinned applications
+ /// </summary>
+ /// <param name="pinnedApps">A list of pinned application</param>
private void UpdatePinnedApps(Dictionary<string, string> pinnedApps)
{
List<AppShortcutInfo> pinnedAppList = new List<AppShortcutInfo>();
TVHomeImpl.GetInstance.AppShortcutControllerInstance.UpdatePinnedApps(pinnedAppList);
}
+ /// <summary>
+ /// A method for remove pinned application
+ /// </summary>
+ /// <param name="appID">A ID of application for removing from pinned application list</param>
private async void RemovePinnedApp(string appID)
{
Dictionary<string, string> PinnedApps = await TVHomeImpl.GetInstance.AppShortcutControllerInstance.GetPinnedAppsAppIDs();
}
}
+ /// <summary>
+ /// A method for updating reordered list
+ /// </summary>
+ /// <param name="moveList">A list of reordered views</param>
private void MoveAppShortcutInfo(List<View> moveList)
{
List<AppShortcutInfo> pinnedAppList = new List<AppShortcutInfo>();
};
}
+ /// <summary>
+ /// A method for customizing behavior immediately prior to the Page becoming visible
+ /// Sets focus chain and Moves focus to Apps icon in Main Panel
+ /// </summary>
protected override void OnAppearing()
{
base.OnAppearing();
PageMainPanel.InitialFocusing();
}
+ /// <summary>
+ /// A method for setting focus chain in Main Panel
+ /// </summary>
private void InitializeMainPanelButtonFocusChain()
{
Button recentMainPanelButton = PageMainPanel.GetButtonToFocusing(0);
settingMainPanelButton.On<Tizen>().SetNextFocusLeftView(appsMainPanelButton);
}
+ /// <summary>
+ /// A method for setting focus chain in Recent Sub Panel
+ /// </summary>
private void InitializeRecentSubPanelButtonFocusChain()
{
List<View> recentSubPanelButtons = new List<View>(RecentSubPanel.GetSubPanelButtons());
}
}
+ /// <summary>
+ /// A method for setting focus chain in Apps Sub Panel
+ /// </summary>
private void InitializeAppsSubPanelButtonFocusChain()
{
List<View> appsSubPanelButtons = new List<View>(AppsSubPanel.GetSubPanelButtons());
}
}
+ /// <summary>
+ /// A method for setting focus chain in Settings Sub Panel
+ /// </summary>
private void InitializeSettingsSubPanelButtonFocusChain()
{
List<View> settingSubPanelButtons = new List<View>(SettingsSubPanel.GetSubPanelButtons());
public partial class MainPanel : Panel
{
public delegate void SelectEventHandler(HomeMenuItem item);
+
+ /// <summary>
+ /// A EventHandler for Item selected event
+ /// </summary>
public SelectEventHandler OnItemSelectedHandler;
+
/// <summary>
/// MainPanel icon's transition height value when it focused.
/// </summary>
button.FindByName<Button>("ButtonFocusArea").Focus();
}
+ /// <summary>
+ /// A method for getting focusable element of Panel Button
+ /// </summary>
+ /// <param name="index">A index of panel button to get</param>
+ /// <returns>A Button element of Panel Button</returns>
public Button GetButtonToFocusing(int index)
{
var button = PanelButtonGrid.Children[index];
await this.ScaleTo(1, 0);
}
- public void SetButtonFocus(int idx)
+ /// <summary>
+ /// A method for setting focus to Panel Button
+ /// </summary>
+ /// <param name="index">A index of Panel Button to set focus</param>
+ public void SetButtonFocus(int index)
{
- var button = PanelButtonGrid.Children[idx];
+ var button = PanelButtonGrid.Children[index];
button.FindByName<Button>("ButtonFocusArea").Focus();
}
+
public override void MenuKeyPressed()
{
-
}
public override void ForceHidePanel()
{
- throw new NotImplementedException();
}
}
}
\ No newline at end of file
set { SetValue(OnMoveVMCommandProperty, value); }
}
+ /// <summary>
+ /// Identifies the OnClearVMCommand bindable property
+ /// </summary>
public static readonly BindableProperty OnClearVMCommandProperty = BindableProperty.Create("OnClearVMCommand", typeof(ICommand), typeof(SubThumbnailPanel));
+ /// <summary>
+ /// A command is executed when item remove is clicked
+ /// </summary>
public ICommand OnClearVMCommand
{
get { return (ICommand)GetValue(OnClearVMCommandProperty); }
set { SetValue(OnClearVMCommandProperty, value); }
}
+ /// <summary>
+ /// Identifies the OnClearAllVMCommand bindable property
+ /// </summary>
public static readonly BindableProperty OnClearAllVMCommandProperty = BindableProperty.Create("OnClearAllVMCommand", typeof(ICommand), typeof(SubThumbnailPanel));
+ /// <summary>
+ /// A command is executed when item remove all is clicked
+ /// </summary>
public ICommand OnClearAllVMCommand
{
get { return (ICommand)GetValue(OnClearAllVMCommandProperty); }
/// A method for handling to hide panel
/// </summary>
public abstract void HidePanel();
+
+ /// <summary>
+ /// A method for handling to hide panel without animation
+ /// </summary>
public abstract void ForceHidePanel();
/// <summary>
public abstract void ShowPanel();
public delegate void ItemClickEventHandler();
+
+ /// <summary>
+ /// A EventHandler for handling Item is clicked
+ /// </summary>
public ItemClickEventHandler OnItemClickEventHandler;
/// <summary>
}
}
+ /// <summary>
+ /// A method for scrolling to right
+ /// </summary>
private async void ScrollToRight()
{
double distance = SizeUtils.GetWidthSize((int)PanelScrollView.ScrollX) + SizeUtils.GetWidthSize(216);
await PanelScrollView.ScrollToAsync(distance, 0, true);
}
+ /// <summary>
+ /// A method for scrolling to left
+ /// </summary>
private async void ScrollToLeft()
{
double distance = SizeUtils.GetWidthSize((int)PanelScrollView.ScrollX) - SizeUtils.GetWidthSize(216);
ButtonViewList[prevIndex] = originItemView;
}
+ /// <summary>
+ /// A method for handling to hide panel without animation
+ /// </summary>
public override void ForceHidePanel()
{
foreach (var item in PanelButtonStack.Children)
ButtonList = new List<PanelButton>();
}
+ /// <summary>
+ ///
+ /// </summary>
public override void MenuKeyPressed()
{
if (isFocused)
}
}
+ /// <summary>
+ /// A method for scrolling to right
+ /// </summary>
private async void ScrollToRight()
{
double distance = SizeUtils.GetWidthSize((int)PanelScrollView.ScrollX) + SizeUtils.GetWidthSize(320);
await PanelScrollView.ScrollToAsync(distance, 0, true);
}
+ /// <summary>
+ /// A method for scrolling to left
+ /// </summary>
private async void ScrollToLeft()
{
double distance = SizeUtils.GetWidthSize((int)PanelScrollView.ScrollX) - SizeUtils.GetWidthSize(320);
await PanelScrollView.ScrollToAsync(distance, 0, true);
}
+ /// <summary>
+ /// A method for getting Panel Buttons
+ /// </summary>
+ /// <returns>A list of panel button views</returns>
public IList<View> GetSubPanelButtons()
{
return PanelButtonStack.Children;
#pragma warning restore CS4014
}
+ /// <summary>
+ /// A method for handling to hide panel without animation
+ /// </summary>
public override void ForceHidePanel()
{
foreach (var item in PanelButtonStack.Children)