namespace LibTVRefCommonPortable.DataModels
{
/// <summary>
- /// Types for recent shortcut
- /// </summary>
- public enum RecentShortcutType
- {
- Application = 0,
- Media = 1,
- }
-
- /// <summary>
/// A Recent Shortcut information
/// </summary>
public class RecentShortcutInfo : ShortcutInfo, IComparable
{
/// <summary>
- /// A type for the content of the shortcut
- /// </summary>
- public RecentShortcutType Type { get; set; }
-
- /// <summary>
/// An Id for the content of the shortcut
/// </summary>
public string Id { get; set; }
namespace LibTVRefCommonPortable.DataModels
{
+ public enum ShortcutType
+ {
+ MainPanelItem,
+ Application,
+ Media,
+ Setting
+ }
+
/// <summary>
/// TVHome and TVApps has several buttons that represent Apps, Contents, Settings.
/// The ShortcutInfo is a model for those buttons with detail information of the represented object.
set;
}
+ public ShortcutType ShortcutType
+ {
+ get;
+ set;
+ }
+
/// <summary>
/// A current state description of a Shortcut. </summary>
/// <param name="state"> A property name.</param>
recentShortcutInfo.ScreenshotPath = item.ScreenShot;
}
- recentShortcutInfo.Type = RecentShortcutType.Application;
+ recentShortcutInfo.ShortcutType = ShortcutType.Application;
recentShortcutInfo.StateDescriptions.Add("default", defaultStateDescription);
recentShortcutInfo.CurrentStateDescription = defaultStateDescription;
recentShortcutInfo.Id = item.AppID;
}
}
- recentShortcutInfo.Type = RecentShortcutType.Media;
+ recentShortcutInfo.ShortcutType = ShortcutType.Media;
recentShortcutInfo.StateDescriptions.Add("default", defaultStateDescription);
recentShortcutInfo.CurrentStateDescription = defaultStateDescription;
recentShortcutInfo.Id = "org.tizen.xamediahub";
ShortcutInfo shortcutInfo = new HomeMenuAppShortcutInfo()
{
+ ShortcutType = ShortcutType.MainPanelItem,
StateDescriptions =
{
{
ShortcutInfo Settings = new SettingShortcutInfo()
{
+ ShortcutType = ShortcutType.Setting,
StateDescriptions =
{
{
ShortcutInfo shortcutInfo = new SettingShortcutInfo()
{
+ ShortcutType = ShortcutType.Setting,
StateDescriptions =
{
{
button.OnClickedCommand = new Command(() =>
{
item.DoAction();
- if (!item.StateDescriptions["default"].Label.Equals("Add pin"))
+ if (!item.StateDescriptions["default"].Label.Equals("Add pin") && item.ShortcutType != ShortcutType.Setting)
{
- PanelState = PanelState.Iconified;
+ MainPageViewModel.Publisher.CurrentState = AppState.HomeIconified;
}
});
button.OnUnpinCommand = new Command(() =>
public override void OnPanelHiding()
{
DebuggingUtils.Dbg("SubPanel HidePanel");
- foreach (var item in PanelButtonStack.Children)
- {
- item.IsEnabled = false;
- }
AnimationExtensions.AbortAnimation(this, "PanelAnimation");
var currentTranslationY = TranslationY;
animation.Commit(this, "PanelAnimation", length: 300, finished: (percentage, cancel) =>
{
PanelScrollView.ScrollToAsync(0, 0, true);
+ foreach (var item in PanelButtonStack.Children)
+ {
+ item.IsEnabled = false;
+ }
});
}