+++ /dev/null
-using System;
-using System.Collections.Generic;
-using System.Text;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-
-namespace NUIBrokerSample
-{
- public class DefaultView : View
- {
- public DefaultView()
- {
- PositionUsesPivotPoint = true;
- ParentOrigin = Tizen.NUI.ParentOrigin.TopCenter;
- PivotPoint = Tizen.NUI.PivotPoint.Center;
- }
- }
-}
+++ /dev/null
-using System;
-using Tizen.Applications;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Components;
-
-namespace NUIBrokerSample
-{
- public class Program : NUIApplication
- {
- private Window window;
- private View animationView;
- private ObjectAnimationManager objectAnimationManager;
-
- protected override void OnCreate()
- {
- base.OnCreate();
- window = GetDefaultWindow();
- window.KeyEvent += OnKeyEvent;
-
- var xamlPage = CreateXamlPage();
- animationView = xamlPage.AnimationView;
- window.Add(xamlPage);
-
- EnableAppTransition(true);
-
- //Animating by default transition
- //EnableAppTransition(false);
-
- objectAnimationManager = new ObjectAnimationManager(xamlPage);
- }
-
- private XamlPage CreateXamlPage()
- {
- var page = new XamlPage(this);
- page.PositionUsesPivotPoint = true;
- page.ParentOrigin = ParentOrigin.TopLeft;
- page.PivotPoint = PivotPoint.TopLeft;
- page.BackgroundColor = new Color(0.9f, 0.9f, 0.9f, 1.0f);
- page.Size = new Size(window.WindowSize.Width, window.WindowSize.Height, 0);
-
- return page;
- }
-
- private void EnableAppTransition(bool isCustomAnimation = true)
- {
- TransitionOptions = new TransitionOptions(window);
- TransitionOptions.AnimatedTarget = animationView;
- TransitionOptions.EnableTransition = true;
-
- if (isCustomAnimation)
- {
- //Set Custom Animation
- TransitionOptions.ForwardAnimation = new SeamlessForward(400);
- TransitionOptions.BackwardAnimation = new SeamlessBackward(400);
- TransitionOptions.AnimationInitialized += TransitionOptions_AnimationInitialized;
- }
- else
- {
- //Set Default Animation
- TransitionOptions.ForwardAnimation = new SlideIn(600);
- TransitionOptions.BackwardAnimation = new SlideOut(600);
- }
-
- }
-
- private void TransitionOptions_AnimationInitialized(bool direction)
- {
- objectAnimationManager.StartIconAnimationByDirection(direction);
- }
-
- public void OnKeyEvent(object sender, Window.KeyEventArgs e)
- {
- if (e.Key.State == Key.StateType.Down && (e.Key.KeyPressedName == "XF86Back" || e.Key.KeyPressedName == "Escape"))
- {
- Exit();
- }
- }
-
- static void Main(string[] args)
- {
- var app = new Program();
- app.Run(args);
- }
- }
-}
+++ /dev/null
-<Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- <OutputType>Exe</OutputType>
- <TargetFramework>netcoreapp2.0</TargetFramework>
- <AssemblyName>NUIBrokerSample</AssemblyName>
- <DebugType>embedded</DebugType>
- </PropertyGroup>
-
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugType>portable</DebugType>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>None</DebugType>
- </PropertyGroup>
-
- <ItemGroup>
- <Folder Include="lib\" />
- </ItemGroup>
-
- <ItemGroup>
- <EmbeddedResource Include="res\layout\XamlPage.xaml">
- <Generator>MSBuild:Compile</Generator>
- </EmbeddedResource>
- </ItemGroup>
-
- <ItemGroup>
- <PackageReference Include="Tizen.NUI.XamlBuild" Version="1.0.10" />
- <PackageReference Include="Tizen.NET.Sdk" Version="1.0.0" />
- </ItemGroup>
-
- <ItemGroup>
- <ProjectReference Include="..\..\..\src\Tizen.NUI\Tizen.NUI.csproj" />
- </ItemGroup>
-
- <PropertyGroup>
- <NeedInjection>True</NeedInjection>
- </PropertyGroup>
-
-</Project>
+++ /dev/null
-using System;
-using System.Collections.Generic;
-using System.Text;
-using Tizen.NUI;
-
-namespace NUIBrokerSample
-{
- class ObjectAnimationManager
- {
- private XamlPage xamlPage;
- private Position defaultPosition = new Position(0, 0);
-
- public ObjectAnimationManager(XamlPage xamlPage)
- {
- this.xamlPage = xamlPage;
- }
-
- public void StartIconAnimationByDirection(bool direction)
- {
- if(direction)
- {
- xamlPage.mainView.Hide();
- xamlPage.picture.Hide();
- defaultPosition = xamlPage.mainViewModel.MainPosition;
-
- Animation ani = new Animation(500);
- ani.DefaultAlphaFunction = GetSineInOut80();
- ani.AnimateTo(xamlPage.IconView, "Position", new Position(0, 150));
- ani.AnimateTo(xamlPage.AddView, "Position", new Position(30, 180));
-
- ani.AnimateTo(xamlPage.IconView, "Scale", new Vector3(1.3f, 1.3f, 1.3f));
- ani.AnimateTo(xamlPage.AddView, "Scale", new Vector3(0.5f, 0.5f, 0.5f));
-
- ani.AnimateTo(xamlPage.MainProfileText, "Position", new Position(0, 220));
-
- ani.AnimateTo(xamlPage.AnimationView, "Size", new Size(Window.Instance.WindowSize));
- ani.AnimateTo(xamlPage.AnimationView, "Position", new Position(0, 0));
-
- ani.AnimateTo(xamlPage.cinematicText, "Position", new Position(0, 320));
-
- ani.Play();
-
- }
- else
- {
- int startTime = 200;
- int endTime = 400;
- xamlPage.mainView.Show();
- xamlPage.picture.Show();
-
- Animation ani = new Animation(endTime);
- ani.DefaultAlphaFunction = GetSineInOut80();
- ani.AnimateTo(xamlPage.IconView, "Position", new Position(-160, 80), startTime, endTime);
- ani.AnimateTo(xamlPage.AddView, "Position", new Position(160, 80), startTime, endTime);
-
- ani.AnimateTo(xamlPage.IconView, "Scale", new Vector3(1.0f, 1.0f, 1.0f), startTime, endTime);
- ani.AnimateTo(xamlPage.AddView, "Scale", new Vector3(1.0f, 1.0f, 1.0f), startTime, endTime);
-
- ani.AnimateTo(xamlPage.MainProfileText, "Position", new Position(0, 60), startTime, endTime);
-
- ani.AnimateTo(xamlPage.AnimationView, "Size", new Size(470, 600), startTime, endTime);
- ani.AnimateTo(xamlPage.AnimationView, "Position", defaultPosition);
-
- ani.AnimateTo(xamlPage.cinematicText, "Position", new Position(0, 150));
-
- ani.Play();
-
- }
- }
-
-
- private AlphaFunction GetSineInOut80()
- {
- return new AlphaFunction(new Vector2(0.45f, 0.43f), new Vector2(0.41f, 1.0f));
- }
- }
-}
+++ /dev/null
-using System;
-using System.Collections.Generic;
-using System.Text;
-using Tizen.NUI;
-
-namespace NUIBrokerSample
-{
- class SeamlessBackward : TransitionAnimation
- {
- string[] properties = { "SizeWidth", "SizeHeight" };
- string[] destinationValue = { "470", "600" };
-
- public SeamlessBackward(int durationMilliSeconds) : base(durationMilliSeconds)
- {
- DefaultImageStyle.Size = new Size(Window.Instance.WindowSize);
- DefaultImageStyle.Position = new Position(0, 0);
- DefaultImageStyle.ParentOrigin = ParentOrigin.TopCenter;
- DefaultImageStyle.PivotPoint = PivotPoint.TopCenter;
-
- int idx = 0;
- foreach (string property in properties)
- {
- TransitionAnimationData data = new TransitionAnimationData();
- data.StartTime = 0;
- data.EndTime = durationMilliSeconds;
- data.Property = property;
- data.DestinationValue = destinationValue[idx++];
- AddAnimationData(data);
- }
- }
- }
-}
-
+++ /dev/null
-using System;
-using System.Collections.Generic;
-using System.Text;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-
-namespace NUIBrokerSample
-{
- class SeamlessForward : TransitionAnimation
- {
- private string[] properties = { "SizeWidth", "SizeHeight", "PositionX", "PositionY", "Opacity" };
- private string[] destinationValue = { "1080", "1920", "0", "0", "1" };
-
- public SeamlessForward(int durationMilliSeconds) : base(durationMilliSeconds)
- {
- DefaultImageStyle.Size = new Size(470, 600);
- DefaultImageStyle.Position = new Position(0, 0);
- DefaultImageStyle.ParentOrigin = ParentOrigin.TopCenter;
- DefaultImageStyle.PivotPoint = PivotPoint.TopCenter;
-
- int idx = 0;
- foreach (string property in properties)
- {
- TransitionAnimationData data = new TransitionAnimationData();
- data.StartTime = 0;
- data.EndTime = durationMilliSeconds;
- data.Property = property;
- data.DestinationValue = destinationValue[idx++];
- AddAnimationData(data);
- }
- }
- }
-}
-
+++ /dev/null
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Input;
-
-namespace NUIBrokerSample
-{
- class DelegateCommand : ICommand
- {
- private readonly Func<bool> canExecute;
- private readonly Action execute;
-
- /// <summary>
- /// Initializes a new instance of the DelegateCommand class.
- /// </summary>
- /// <param name="execute">indicate an execute function</param>
- public DelegateCommand(Action execute) : this(execute, null)
- {
- }
-
- /// <summary>
- /// Initializes a new instance of the DelegateCommand class.
- /// </summary>
- /// <param name="execute">execute function </param>
- /// <param name="canExecute">can execute function</param>
- public DelegateCommand(Action execute, Func<bool> canExecute)
- {
- this.execute = execute;
- this.canExecute = canExecute;
- }
- /// <summary>
- /// can executes event handler
- /// </summary>
- public event EventHandler CanExecuteChanged;
-
- /// <summary>
- /// implement of icommand can execute method
- /// </summary>
- /// <param name="o">parameter by default of icomand interface</param>
- /// <returns>can execute or not</returns>
- public bool CanExecute(object o)
- {
- if (this.canExecute == null)
- {
- return true;
- }
- return this.canExecute();
- }
-
- /// <summary>
- /// implement of icommand interface execute method
- /// </summary>
- /// <param name="o">parameter by default of icomand interface</param>
- public void Execute(object o)
- {
- this.execute();
- }
-
- /// <summary>
- /// raise ca excute changed when property changed
- /// </summary>
- public void RaiseCanExecuteChanged()
- {
- if (this.CanExecuteChanged != null)
- {
- this.CanExecuteChanged(this, EventArgs.Empty);
- }
- }
- }
-}
+++ /dev/null
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Input;
-using Tizen.NUI;
-
-namespace NUIBrokerSample
-{
- public class MainViewModel : INotifyPropertyChanged
- {
- private Position2D mainPosition;
-
- public MainViewModel()
- {
- mainPosition = new Position2D(-50, 500);
- }
-
- public Position2D MainPosition
- {
- get
- {
- return mainPosition;
- }
- set
- {
- mainPosition = value;
- PageContents = string.Format($"Move {mainPosition.X}, {mainPosition.Y}");
- OnPropertyChanged("MainPosition");
- }
- }
- public event PropertyChangedEventHandler PropertyChanged;
-
- protected void OnPropertyChanged(string propertyName)
- {
- if(PropertyChanged != null)
- {
- PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
- }
- }
-
- private ICommand minusCommand;
- public ICommand MinusCommand
- {
- get { return (this.minusCommand) ?? (this.minusCommand = new DelegateCommand(Minus)); }
- }
-
- private void Minus()
- {
- }
-
-
- private ICommand plusCommand;
- public ICommand PlusCommand
- {
- get { return (this.plusCommand) ?? (this.plusCommand = new DelegateCommand(Plus)); }
- }
-
- private void Plus()
- {
- }
-
- private string pageContent;
- public string PageContents
- {
- get
- {
- return pageContent;
- }
- set
- {
- pageContent = value;
- OnPropertyChanged("PageContents");
- }
- }
-
- }
-}
+++ /dev/null
-using System;
-using Tizen.Applications;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-
-namespace NUIBrokerSample
-{
- public partial class XamlPage : View
- {
- private const int TOUCH_AREA = 5;
- private const string TARGET_APPLICATION = "org.tizen.example.NUIMusicPlayer";
- private const string EMART_APPLICATION = "org.tizen.example.ScrollingTransition";
-
- private NUIApplication application;
- private Animation startAni;
-
- private Position downPosition = new Position(0, 0);
- private Position movePosition = new Position(0, 0);
- public XamlPage(NUIApplication application)
- {
- this.application = application;
- InitializeComponent();
- }
-
- private bool OnViewTouchEvent2(object source, TouchEventArgs e)
- {
- PointStateType type = e.Touch.GetState(0);
- Vector2 vector = e.Touch.GetScreenPosition(0);
- switch (type)
- {
- case PointStateType.Down:
- downPosition = movePosition = new Position(vector);
- PlayScaleDownAnimation(mainView);
- PlayScaleDownAnimation(source as View);
- break;
- case PointStateType.Motion:
- var currentPosition = new Position(vector);
- MoveMainScreen(new Position(mainViewModel.MainPosition) + (currentPosition - movePosition));
- movePosition = currentPosition;
- break;
- case PointStateType.Up:
- if (isTouchArea(AbsPosition(new Position(vector) - downPosition)))
- {
- LaunchApplication(TARGET_APPLICATION);
- }
-
- PlayScaleUpAnimation(mainView);
- PlayScaleUpAnimation(source as View);
- break;
- }
- return false;
- }
-
- private void LaunchApplication(string opr)
- {
- AppControl appControl = new AppControl();
- appControl.ApplicationId = opr;
- application.SendLaunchRequest(appControl);
- }
-
- private Position AbsPosition(Position2D position)
- {
- return new Position(Math.Abs(position.X), Math.Abs(position.Y));
- }
-
- private bool isTouchArea(Position2D position)
- {
- return (position.X < TOUCH_AREA && position.Y < TOUCH_AREA);
- }
-
- private void MoveMainScreen(Position position)
- {
- mainViewModel.MainPosition = position;
- }
-
- private void PlayScaleDownAnimation(View view)
- {
- //ClearAnimation();
- Animation startAni = new Animation(150);
- startAni.AnimateTo(view, "Scale", new Vector3(0.9f, 0.9f, 1.0f));
- startAni.Play();
- }
-
- private void PlayScaleUpAnimation(View view)
- {
- //ClearAnimation();
- Animation startAni = new Animation(150);
- startAni.AnimateTo(view, "Scale", new Vector3(1.0f, 1.0f, 1.0f));
- startAni.Play();
- }
-
- private void ClearAnimation()
- {
- if (startAni != null)
- {
- startAni.Stop();
- startAni.Clear();
- startAni.Dispose();
- startAni = null;
- }
- }
-
- }
-}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" ?>
-<View x:Class="NUIBrokerSample.XamlPage"
- xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
- xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
- xmlns:b="clr-namespace:Tizen.NUI;assembly=Tizen.NUI"
- xmlns:local="clr-namespace:NUIBrokerSample">
- <View.XamlResources>
- <ResourceDictionary>
- <x:String x:Key="bgPath">
- "*Resource*/familyboard_setting_bg1.png"
- </x:String>
- <x:String x:Key="mainImage">
- "*Resource*/pic_1.jpg"
- </x:String>
- <x:String x:Key="chartIcon">
- "*Resource*/bar-chart-5-128.png"
- </x:String>
- <x:String x:Key="clockIcon">
- "*Resource*/clock-128.png"
- </x:String>
- <x:String x:Key="playIcon">
- "*Resource*/play-128.png"
- </x:String>
- <x:String x:Key="profileIcon">
- "*Resource*/profile.jpg"
- </x:String>
- <x:String x:Key="addIcon">
- "*Resource*/add.png"
- </x:String>
- <x:String x:Key="mainText">
- "Beautiful, dreamy and dramtic
 instrumental neo classical piano scores
 from movies and tv series.
"
- </x:String>
- <b:Color x:Key="grayColor" R="0.3" G="0.3" B="0.3" A="1.0"></b:Color>
- <x:String x:Key="whiteMainTextColor">
- "0.95, 0.95, 0.95, 1.0"
- </x:String>
- <x:String x:Key="whiteSubTextColor">
- "0.7, 0.7, 0.7, 1.0"
- </x:String>
- <Size2D x:Key="popupSize" Width="470" Height="600">
- </Size2D>
- <x:Single x:Key="point1">12.0</x:Single>
- <x:Single x:Key="point2">24.0</x:Single>
- </ResourceDictionary>
- </View.XamlResources>
-
- <View.BindingContext>
- <local:MainViewModel x:Name="mainViewModel"/>
- </View.BindingContext>
-
- <ImageView ResourceUrl="*Resource*/familyboard_setting_bg6.png"
- WidthResizePolicy="FillToParent"
- HeightResizePolicy="FillToParent"/>
-
- <View x:Name="mainView"
- PositionUsesPivotPoint="True"
- ParentOrigin="TopCenter"
- PivotPoint="TopCenter"
- BackgroundColor="Black"
- Position2D="{Binding MainPosition}"
- Size2D="{StaticResource popupSize}"
- CornerRadius="10" >
-
- <ImageView x:Name="picture"
- PositionUsesPivotPoint="True"
- ParentOrigin="BottomCenter"
- PivotPoint="BottomCenter"
- ResourceUrl="*Resource*/pic_1.jpg"
- Size2D="360,360"/>
- <TextLabel PositionUsesPivotPoint="True"
- ParentOrigin="Center"
- PivotPoint="Center"
- MultiLine="True"
- HorizontalAlignment="Center"
- TextColor="0.6, 0.6, 0.6, 1.0"
- PointSize="14"
- Position2D="0,-30"
- WidthResizePolicy="FillToParent"
- Text="{StaticResource mainText}" />
-
- <TextLabel x:Name="cinematicText"
- PositionUsesPivotPoint="True"
- ParentOrigin="TopCenter"
- PivotPoint="Center"
- Text="Cinematic Piano"
- HorizontalAlignment="Center"
- VerticalAlignment="Top"
- TextColor="0.95, 0.95, 0.95, 1.0"
- PointSize="20"
- Position2D="0,150"
- WidthResizePolicy="FillToParent">
- <TextLabel.FontStyle>
- <PropertyMap>
- <KeyValue Key="weight" Value="bold" />
- </PropertyMap>
- </TextLabel.FontStyle>
- </TextLabel>
-
- <TextLabel PositionUsesPivotPoint="True"
- ParentOrigin="TopCenter"
- PivotPoint="Center"
- Text="9,465
"
- HorizontalAlignment="Center"
- VerticalAlignment="Top"
- TextColor="0.3, 0.3, 0.3, 1.0"
- PointSize="{StaticResource point1}"
- Position2D="-35,198"
- WidthResizePolicy="FillToParent"/>
- <ImageView ParentOrigin="TopCenter"
- ResourceUrl="*Resource*/bar-chart-5-128.png"
- Color="0.3, 0.3, 0.3, 1.0"
- Position2D="-85,190"
- Size2D="15,15"/>
-
- <TextLabel PositionUsesPivotPoint="True"
- ParentOrigin="TopCenter"
- PivotPoint="Center"
- Text="5h 35m
"
- HorizontalAlignment="Center"
- VerticalAlignment="Top"
- TextColor="0.3, 0.3, 0.3, 1.0"
- PointSize="{StaticResource point1}"
- Position2D="65,198"
- WidthResizePolicy="FillToParent"/>
- <ImageView ParentOrigin="TopCenter"
- ResourceUrl="*Resource*/clock-128.png"
- Color="0.3, 0.3, 0.3, 1.0"
- Position2D="10,190"
- Size2D="15,15"/>
-
- <View PositionUsesPivotPoint="True"
- ParentOrigin="BottomCenter"
- PivotPoint="Center"
- BackgroundColor="White"
- Position2D="0,-40"
- Size2D="52,52"
- CornerRadius="26">
- <ImageView PositionUsesPivotPoint="True"
- ParentOrigin="Center"
- PivotPoint="Center"
- ResourceUrl="*Resource*/play-128.png"
- Color="Black"
- Size2D="20,20"/>
- </View>
- </View>
-
- <View x:Name="AnimationView"
- Position2D="{Binding MainPosition}"
- Size2D="{StaticResource popupSize}"
- TouchEvent="OnViewTouchEvent2"
- PositionUsesPivotPoint="True"
- ParentOrigin="TopCenter"
- PivotPoint="TopCenter" >
- <View x:Name="IconView"
- PositionUsesPivotPoint="True"
- ParentOrigin="TopCenter"
- PivotPoint="Center"
- BackgroundColor="White"
- Position2D="-160,80"
- Size2D="76,76"
- CornerRadius="38">
- <View PositionUsesPivotPoint="True"
- ParentOrigin="Center"
- PivotPoint="Center"
- BackgroundColor="Black"
- Size2D="76,76"
- CornerRadius="37">
- <ImageView PositionUsesPivotPoint="True"
- ParentOrigin="Center"
- PivotPoint="Center"
- ResourceUrl="*Resource*/profile.jpg"
- Size2D="62,62"
- CornerRadius="31"/>
- </View>
- </View>
-
- <TextLabel x:Name="MainProfileText"
- Text="PIANO DAILY"
- PositionUsesPivotPoint="True"
- ParentOrigin="TopCenter"
- PivotPoint="Center"
- HorizontalAlignment="Center"
- VerticalAlignment="Top"
- TextColor="0.95,0.95,0.95,1.0"
- PointSize="{StaticResource point1}"
- Position2D="0,60"
- WidthResizePolicy="FillToParent">
- <TextLabel.FontStyle>
- <PropertyMap>
- <KeyValue Key="weight" Value="bold" />
- </PropertyMap>
- </TextLabel.FontStyle>
- </TextLabel>
- <TextLabel Text="July 2020"
- PositionUsesPivotPoint="True"
- ParentOrigin="TopCenter"
- PivotPoint="Center"
- HorizontalAlignment="Center"
- VerticalAlignment="Top"
- TextColor="0.70,0.70,0.70,1.0"
- PointSize="{StaticResource point1}"
- Position2D="0,90"
- WidthResizePolicy="FillToParent"/>
- <View x:Name="AddView"
- PositionUsesPivotPoint="True"
- ParentOrigin="TopCenter"
- PivotPoint="Center"
- BackgroundColor="White"
- Position2D="160, 80"
- Size2D="60, 60"
- CornerRadius="30">
- <ImageView PositionUsesPivotPoint="True"
- ParentOrigin="Center"
- PivotPoint="Center"
- ResourceUrl="*Resource*/add.png"
- Size2D="15, 15"/>
- </View>
- </View>
-
-</View>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<manifest package="org.tizen.example.NUIBrokerSample" version="1.0.0" api-version="6" xmlns="http://tizen.org/ns/packages">
- <profile name="common" />
- <ui-application appid="org.tizen.example.NUIBrokerSample" exec="NUIBrokerSample.dll" multiple="false" nodisplay="false" taskmanage="true" type="dotnet-nui" launch_mode="single">
- <label>NUIBrokerSample</label>
- <icon>NUIBrokerSample.png</icon>
- <metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
- <splash-screens />
- </ui-application>
- <shortcut-list />
- <privileges>
- <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
- </privileges>
- <dependencies />
- <provides-appdefined-privileges />
-</manifest>
+++ /dev/null
-using System;
-using Tizen.Applications;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-
-namespace NUIMusicPlayer
-{
- public class Program : NUIApplication
- {
- private Window window;
- private XamlPage page;
- protected override void OnCreate()
- {
- base.OnCreate();
- window = GetDefaultWindow();
- window.KeyEvent += OnKeyEvent;
-
- page = new XamlPage();
- page.PositionUsesPivotPoint = true;
- page.ParentOrigin = ParentOrigin.TopLeft;
- page.PivotPoint = PivotPoint.TopLeft;
- page.BackgroundColor = Color.Black;
- page.Size = window.WindowSize;
- window.Add(page);
-
- TransitionOptions = new TransitionOptions(window);
- TransitionOptions.EnableTransition = true;
- TransitionOptions.CallerScreenHidden += TransitionOptions_CallerScreenHidden;
- TransitionOptions.CallerScreenShown += TransitionOptions_CallerScreenShown;
- }
-
- private void TransitionOptions_CallerScreenShown(object sender, EventArgs e)
- {
- page.ShowInitObject();
- }
-
- private void TransitionOptions_CallerScreenHidden(object sender, EventArgs e)
- {
- page.HideInitObject();
- }
-
- protected override void OnAppControlReceived(AppControlReceivedEventArgs e)
- {
- base.OnAppControlReceived(e);
- window.Activate();
- }
-
- protected override void OnResume()
- {
- base.OnResume();
- }
-
- protected override void OnPause()
- {
- base.OnPause();
- }
-
- public void OnKeyEvent(object sender, Window.KeyEventArgs e)
- {
- if (e.Key.State == Key.StateType.Down && (e.Key.KeyPressedName == "XF86Back" || e.Key.KeyPressedName == "Escape"))
- {
- window.Lower();
- //window.Hide();
- }
- }
-
- static void Main(string[] args)
- {
- var app = new Program();
- app.Run(args);
- }
- }
-}
+++ /dev/null
-<Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- <OutputType>Exe</OutputType>
- <TargetFramework>netcoreapp2.0</TargetFramework>
- <AssemblyName>NUIMusicPlayer</AssemblyName>
- <DebugType>embedded</DebugType>
- </PropertyGroup>
-
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugType>portable</DebugType>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>None</DebugType>
- </PropertyGroup>
-
- <ItemGroup>
- <Folder Include="lib\" />
- <Folder Include="res\" />
- </ItemGroup>
-
- <ItemGroup>
- <EmbeddedResource Include="res\layout\XamlPage.xaml">
- <Generator>MSBuild:Compile</Generator>
- </EmbeddedResource>
- </ItemGroup>
-
- <ItemGroup>
- <PackageReference Include="Tizen.NUI.XamlBuild" Version="1.0.10" />
- <PackageReference Include="Tizen.NET.Sdk" Version="1.0.0" />
- </ItemGroup>
-
- <ItemGroup>
- <ProjectReference Include="..\..\..\src\Tizen.NUI\Tizen.NUI.csproj" />
- </ItemGroup>
-
- <PropertyGroup>
- <NeedInjection>True</NeedInjection>
- </PropertyGroup>
-
-</Project>
+++ /dev/null
-using System;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-
-namespace NUIMusicPlayer
-{
- public partial class XamlPage : View
- {
- public XamlPage()
- {
- InitializeComponent();
-
- HideInitObject();
- }
-
- private bool OnBackTouchEvent(object source, View.TouchEventArgs e)
- {
- if (e.Touch.GetState(0) == PointStateType.Up)
- {
- Window.Instance.Hide();
- }
- return false;
- }
-
- public void ShowInitObject()
- {
- profileContainer.Opacity = 1.0f;
- addContainer.Opacity = 1.0f;
- profileText1.Opacity = 1.0f;
- profileText2.Opacity = 1.0f;
- cinematicText.Show();
- }
-
- public void HideInitObject()
- {
- profileContainer.Opacity = 0.0f;
- addContainer.Opacity = 0.0f;
- profileText1.Opacity = 0.0f;
- profileText2.Opacity = 0.0f;
- cinematicText.Hide();
- }
- }
-}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" ?>
-<View x:Class="NUIMusicPlayer.XamlPage"
- xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
- xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
-
- <View x:Name="profileContainer" PositionUsesPivotPoint="True" ParentOrigin="TopCenter" PivotPoint="Center" BackgroundColor="White" Position2D="0,150" Size2D="96,96" CornerRadius="48" Opacity="0">
- <View x:Name="profileContainer_inner" PositionUsesPivotPoint="True" ParentOrigin="Center" PivotPoint="Center" BackgroundColor="Black" Size2D="94,94" CornerRadius="47">
- <ImageView x:Name="profileImage" PositionUsesPivotPoint="True" ParentOrigin="Center" PivotPoint="Center" ResourceUrl="*Resource*/profile.jpg" Size2D="80,80" CornerRadius="40"/>
- </View>
- </View>
-
- <View x:Name="addContainer" PositionUsesPivotPoint="True" ParentOrigin="TopCenter" PivotPoint="Center" BackgroundColor="White" Position2D="33,183" Size2D="40,40" CornerRadius="20" Opacity="0">
- <ImageView x:Name="addIcon" PositionUsesPivotPoint="True" ParentOrigin="Center" PivotPoint="Center" ResourceUrl="*Resource*/add.png" Size2D="16,16"/>
- </View>
- <ImageView x:Name="backBtn" PositionUsesPivotPoint="True" ParentOrigin="BottomLeft" PivotPoint="Center" ResourceUrl="*Resource*/arrow-89-128.png" Position2D="50,-60" Size2D="40,40" TouchEvent="OnBackTouchEvent"/>
-
- <TextLabel x:Name="profileText1" PositionUsesPivotPoint="True" ParentOrigin="TopCenter" PivotPoint="Center" Text="PIANO DAILY" HorizontalAlignment="Center" VerticalAlignment="Top" TextColor="0.95,0.95,0.95,1.0" PointSize="20" Position2D="0,220" WidthResizePolicy="FillToParent" Opacity="0"/>
- <TextLabel x:Name="profileText2" PositionUsesPivotPoint="True" ParentOrigin="TopCenter" PivotPoint="Center" Text="July 2020" HorizontalAlignment="Center" VerticalAlignment="Top" TextColor="0.70,0.70,0.70,1.0" PointSize="13" Position2D="0,243" WidthResizePolicy="FillToParent" Opacity="0"/>
-
- <TextLabel x:Name="info1" PositionUsesPivotPoint="True" ParentOrigin="TopCenter" PivotPoint="Center" Text="9,465
" HorizontalAlignment="Center" VerticalAlignment="Top" TextColor="0.3, 0.3, 0.3, 1.0" PointSize="20" Position2D="-65,400" WidthResizePolicy="FillToParent"/>
- <ImageView x:Name="info1Icon" ParentOrigin="TopCenter" ResourceUrl="*Resource*/bar-chart-5-128.png" Color="0.3, 0.3, 0.3, 1.0" Position2D="-125,392" Size2D="18,18"/>
-
- <TextLabel x:Name="info2" PositionUsesPivotPoint="True" ParentOrigin="TopCenter" PivotPoint="Center" Text="5h 35m
" HorizontalAlignment="Center" VerticalAlignment="Top" TextColor="0.3, 0.3, 0.3, 1.0" PointSize="20" Position2D="65,400" WidthResizePolicy="FillToParent"/>
- <ImageView x:Name="info2Icon" ParentOrigin="TopCenter" ResourceUrl="*Resource*/clock-128.png" Color="0.3, 0.3, 0.3, 1.0" Position2D="-2,392" Size2D="18,18"/>
-
- <TextLabel x:Name="cinematicText" PositionUsesPivotPoint="True" ParentOrigin="TopCenter" PivotPoint="Center" Text="Cinematic Piano" HorizontalAlignment="Center" VerticalAlignment="Top" TextColor="0.95, 0.95, 0.95, 1.0" PointSize="70" Position2D="0,320" WidthResizePolicy="FillToParent">
- <TextLabel.FontStyle>
- <PropertyMap>
- <KeyValue Key="weight" Value="bold" />
- </PropertyMap>
- </TextLabel.FontStyle>
- </TextLabel>
-
- <ImageView x:Name="imgView" PositionUsesPivotPoint="True" ParentOrigin="BottomCenter" PivotPoint="BottomCenter" ResourceUrl="*Resource*/pic_1.jpg" Size2D="850,850"/>
-
- <TextLabel x:Name="contents" PositionUsesPivotPoint="True" ParentOrigin="TopCenter" PivotPoint="Center" Text="Beautiful, dreamy and dramtic
 instrumental neo classical piano scores
 from movies and tv series.
" MultiLine="True" HorizontalAlignment="Center"
- VerticalAlignment="Top" TextColor="0.4, 0.4, 0.4, 1.0" PointSize="30" Position2D="0,500" WidthResizePolicy="FillToParent"/>
-
- <View x:Name="playBtn" PositionUsesPivotPoint="True" ParentOrigin="BottomCenter" PivotPoint="Center" BackgroundColor="White" Position2D="0,-70" Size2D="88,88" CornerRadius="44">
- <ImageView x:Name="playIcon" PositionUsesPivotPoint="True" ParentOrigin="Center" PivotPoint="Center" ResourceUrl="*Resource*/play-128.png" Color="Black" Size2D="26,26"/>
- </View>
-
-</View>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="6" package="org.tizen.example.NUIMusicPlayer" version="1.0.0">
- <profile name="common" />
- <ui-application appid="org.tizen.example.NUIMusicPlayer"
- exec="NUIMusicPlayer.dll"
- type="dotnet-nui"
- multiple="false"
- taskmanage="true"
- nodisplay="false"
- launch_mode="single"
- >
- <label>NUIMusicPlayer</label>
- <icon>NUIMusicPlayer.png</icon>
- <metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
- </ui-application>
-</manifest>