+++ /dev/null
-using System;
-using Tizen.Applications;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-
-namespace NUIBrokerSample
-{
- class Program : NUIApplication
- {
- private UICreator uiCreator;
- private SeamlessForwardAnimation fAnimation;
- private SeamlessBackwardAnimation bAnimation;
-
- protected override void OnCreate()
- {
- base.OnCreate();
- Initialize();
- }
-
- void Initialize()
- {
- Window.Instance.KeyEvent += OnKeyEvent;
- Window.Instance.BackgroundColor = new Color(0.9f, 0.9f, 0.9f, 1.0f);
-
- uiCreator = new UICreator(this);
- uiCreator.CreateUI();
-
- TransitionOptions = new TransitionOptions(GetDefaultWindow());
- TransitionOptions.EnableTransition = true;
-
- fAnimation = new SeamlessForwardAnimation(uiCreator, 600);
- bAnimation = new SeamlessBackwardAnimation(uiCreator, 600);
- TransitionOptions.ForwardAnimation = fAnimation;
- //TransitionOptions.BackwardAnimation = bAnimation;
-
- TransitionOptions.AnimationInitialized += TransitionOptions_AnimationInitialized;
- //(launchBroker as SeamlessAnimator)?.SetUICreator(uiCreator);
- }
-
- private void TransitionOptions_AnimationInitialized(object sender, EventArgs e)
- {
- fAnimation.InitAnimation();
- //bAnimation.InitAnimation();
- }
-
- protected override void OnResume()
- {
- base.OnResume();
- }
-
- protected override void OnPause()
- {
- base.OnPause();
- }
-
-
- public static string GetResourcePath()
- {
- return Tizen.Applications.Application.Current.DirectoryInfo.Resource;
- }
-
- 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)
- {
- new Program().Run(args);
- }
- }
-}
+++ /dev/null
-<Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- <OutputType>Exe</OutputType>
- <TargetFramework>netcoreapp2.0</TargetFramework>
- </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>
- <PackageReference Include="Tizen.NET.Sdk" Version="1.0.1" />
- </ItemGroup>
-
- <ItemGroup>
- <ProjectReference Include="..\..\..\src\Tizen.NUI\Tizen.NUI.csproj" />
- </ItemGroup>
-
-</Project>
-
+++ /dev/null
-using System;
-using System.Collections.Generic;
-using System.Text;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-
-namespace NUIBrokerSample
-{
- class SeamlessBackwardAnimation : TransitionAnimation
- {
- private Size DEFAULT_POPUP_SIZE = new Size(470, 600);
-
- private Window window;
-
- private Position DefaultIconPos;
- private Position DefaultAddIconPos;
- private Position DefaultMainPos;
- private Position DefaultSubPos;
- private Position DefaultMainViewPos;
-
- private int durationMilliSeconds;
- private UICreator uiCreator;
-
- public SeamlessBackwardAnimation(UICreator uiCreator, int durationMilliSeconds) : base(durationMilliSeconds)
- {
- this.durationMilliSeconds = durationMilliSeconds;
- window = Window.Instance;
- this.uiCreator = uiCreator;
-
- int propertyCount = 4;
- Properties = new string[propertyCount];
- DestValue = new string[propertyCount];
- StartTime = new int[propertyCount];
- EndTime = new int[propertyCount];
- for (int i = 0; i < propertyCount; i++)
- {
- StartTime[i] = 200;
- EndTime[i] = durationMilliSeconds;
- }
-
- DefaultAlphaFunction = GetSineInOut80();
-
- }
- private void SetupAnimationData()
- {
- Properties[0] = "SizeWidth";
- DestValue[0] = DEFAULT_POPUP_SIZE.Width.ToString();
-
- Properties[1] = "SizeHeight";
- DestValue[1] = DEFAULT_POPUP_SIZE.Height.ToString();
-
- Properties[2] = "PositionX";
- DestValue[2] = DefaultMainViewPos.X.ToString();
-
- Properties[3] = "PositionY";
- DestValue[3] = DefaultMainViewPos.Y.ToString();
-
- }
-
- public void InitAnimation()
- {
- Animation ani = new Animation(durationMilliSeconds);
- ani.DefaultAlphaFunction = GetSineInOut80();
-
- StoreInitDate();
- SetupAnimationData();
-
- this.AnimateTo(uiCreator.AnimationView, "Size", DEFAULT_POPUP_SIZE, 50, 600);
- this.AnimateTo(uiCreator.AnimationView, "Position", DefaultMainViewPos, 50, 600);
- //this.AnimateTo(imgView, "Size", DEFAULT_POPUP_SIZE, 200, 600);
-
- this.AnimateTo(uiCreator.IconView, "Position", DefaultIconPos, 400, 600);
- this.AnimateTo(uiCreator.AddView, "Position", DefaultAddIconPos, 400, 600);
-
- this.AnimateTo(uiCreator.IconView, "Scale", new Vector3(1.0f, 1.0f, 1.0f), 400, 600);
- this.AnimateTo(uiCreator.IconView, "Scale", new Vector3(1.0f, 1.0f, 1.0f), 400, 600);
-
- ani.Finished += Ani_Finished;
- ani.Play();
- }
-
- private void Ani_Finished(object sender, EventArgs e)
- {
- //FinishAnimation();
- Timer timer = new Timer(30);
- timer.Tick += Timer_Tick;
- timer.Start();
- }
-
- private bool Timer_Tick(object source, Timer.TickEventArgs e)
- {
- uiCreator.MainView.Show();
- uiCreator.MainProfileText.Show();
- uiCreator.SubProfileText.Show();
- return false;
- }
-
- private void StoreInitDate()
- {
- DefaultIconPos = uiCreator.IconView.Position;
- DefaultAddIconPos = uiCreator.AddView.Position;
- DefaultMainPos = uiCreator.MainProfileText.Position;
- DefaultSubPos = uiCreator.SubProfileText.Position;
- DefaultMainViewPos = uiCreator.MainView.Position;
-
- uiCreator.AnimationView.Size = DEFAULT_POPUP_SIZE;
- }
-
- internal AlphaFunction GetSineInOut80()
- {
- return new AlphaFunction(new Vector2(0.45f, 0.43f), new Vector2(0.41f, 1.0f));
- }
-
-
- public override Position GetDefaultPosition()
- {
- return DefaultMainViewPos;
- }
-
- public override Size GetDefaultSize()
- {
- return new Size(0, 0);
- }
-
- public override Position GetDefaultParentOrigin()
- {
- return ParentOrigin.TopCenter;
- }
-
- public override Position GetDefaultPivotPoint()
- {
- return PivotPoint.TopCenter;
- }
-
- }
-}
+++ /dev/null
-using System;
-using System.Collections.Generic;
-using System.Text;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-
-namespace NUIBrokerSample
-{
- class SeamlessForwardAnimation : TransitionAnimation
- {
- private Size DEFAULT_POPUP_SIZE = new Size(470, 600);
-
- private Window window;
-
- private Position DefaultIconPos;
- private Position DefaultAddIconPos;
- private Position DefaultMainViewPos;
-
- private int durationMilliSeconds;
- private UICreator uiCreator;
-
- public SeamlessForwardAnimation(UICreator uiCreator, int durationMilliSeconds) : base(durationMilliSeconds)
- {
- this.durationMilliSeconds = durationMilliSeconds;
- window = Window.Instance;
- this.uiCreator = uiCreator;
-
- int propertyCount = 4;
- Properties = new string[propertyCount];
- DestValue = new string[propertyCount];
- StartTime = new int[propertyCount];
- EndTime = new int[propertyCount];
- for (int i = 0; i < propertyCount; i++)
- {
- StartTime[i] = 200;
- EndTime[i] = durationMilliSeconds;
- }
-
- Properties[0] = "SizeWidth";
- DestValue[0] = Window.Instance.WindowSize.Width.ToString();
-
- Properties[1] = "SizeHeight";
- DestValue[1] = Window.Instance.WindowSize.Height.ToString();
-
- Properties[2] = "PositionX";
- DestValue[2] = "0";
-
- Properties[3] = "PositionY";
- DestValue[3] = "0";
-
- DefaultAlphaFunction = GetSineInOut80();
-
- }
-
- public void InitAnimation()
- {
- Animation ani = new Animation(durationMilliSeconds);
- ani.DefaultAlphaFunction = GetSineInOut80();
-
- StoreInitDate();
- uiCreator.MainView.Hide();
- //ani.AnimateTo(uiCreator.AnimationView, "Size", new Size(window.Size), 50, 600);
- ani.AnimateTo(uiCreator.AnimationView, "Position", new Position(0, 0), 50, 600);
-
- ani.AnimateTo(uiCreator.IconView, "Position", new Position(0, 150), 0, 300);
- ani.AnimateTo(uiCreator.AddView, "Position", new Position(30, 180), 0, 300);
-
- ani.AnimateTo(uiCreator.IconView, "Scale", new Vector3(1.3f, 1.3f, 1.0f), 0, 300);
- ani.AnimateTo(uiCreator.AddView, "Scale", new Vector3(0.7f, 0.7f, 1.0f), 0, 300);
-
- ani.Finished += Ani_Finished;
- ani.Play();
- }
-
- private void Ani_Finished(object sender, EventArgs e)
- {
- uiCreator.AnimationView.Position = DefaultMainViewPos;
- uiCreator.IconView.Position = DefaultIconPos;
- uiCreator.IconView.Scale = new Vector3(1.0f, 1.0f, 1.0f);
- uiCreator.AddView.Position = DefaultAddIconPos;
- uiCreator.AddView.Scale = new Vector3(1.0f, 1.0f, 1.0f);
- uiCreator.AnimationView.Size = new Size(470, 600);
- uiCreator.MainView.Show();
- }
-
- private void StoreInitDate()
- {
- DefaultIconPos = new Position(-160, 80); //uiCreator.IconView.Position;
- DefaultAddIconPos = new Position(160, 80); //uiCreator.AddView.Position;
-
- DefaultMainViewPos = uiCreator.MainView.Position;
- uiCreator.AnimationView.Size = DEFAULT_POPUP_SIZE;
- }
-
- internal AlphaFunction GetSineInOut80()
- {
- return new AlphaFunction(new Vector2(0.45f, 0.43f), new Vector2(0.41f, 1.0f));
- }
-
-
- public override Position GetDefaultPosition()
- {
- return DefaultMainViewPos;
- }
-
- public override Size GetDefaultSize()
- {
- return new Size(0, 0);
- }
-
- public override Position GetDefaultParentOrigin()
- {
- return ParentOrigin.TopCenter;
- }
-
- public override Position GetDefaultPivotPoint()
- {
- return PivotPoint.TopCenter;
- }
-
- }
-}
+++ /dev/null
-using System;
-using System.Collections.Generic;
-using System.Text;
-using Tizen.Applications;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-
-namespace NUIBrokerSample
-{
- class UICreator
- {
- private Color MAIN_TEXT_COLOR = new Color(0.95f, 0.95f, 0.95f, 1.0f);
- private Color SUB_TEXT_COLOR = new Color(0.70f, 0.70f, 0.70f, 1.0f);
- private Color INFO_TEXT_COLOR = new Color(0.3f, 0.3f, 0.3f, 1.0f);
-
- private Color CONTENTS_TEXT_COLOR = new Color(0.6f, 0.6f, 0.6f, 1.0f);
-
- private float MAIN_TEXT_POINT_SIZE;
- private float PROFILE_TEXT_POINT_SIZE;
- private float SUB_TEXT_POINT_SIZE;
-
- private float INFO_TEXT_POINT_SIZE;
- private float CONTENTS_TEXT_POINT_SIZE;
-
- public View AnimationView;
- public View IconView;
- public View AddView;
-
- public View MainView;
-
- public TextLabel MainProfileText;
- public TextLabel SubProfileText;
-
- //Touch/Launching Animation
- public bool isStartingProcess = false;
- private Vector2 prePos = new Vector2(0, 0);
- private Vector2 firstPos = new Vector2(0, 0);
- private Animation startAni;
-
- private NUIApplication application;
-
- public UICreator(NUIApplication app)
- {
- application = app;
- CreateFHubSize();
- }
- private void CreateMobileSize()
- {
- MAIN_TEXT_POINT_SIZE = 8.0f;
- PROFILE_TEXT_POINT_SIZE = 6.0f;
- SUB_TEXT_POINT_SIZE = 3.0f;
-
- INFO_TEXT_POINT_SIZE = 3.0f;
- CONTENTS_TEXT_POINT_SIZE = 3.0f;
- }
-
-
- private void CreateFHubSize()
- {
- MAIN_TEXT_POINT_SIZE = 32.0f;
- PROFILE_TEXT_POINT_SIZE = 14.0f;
- SUB_TEXT_POINT_SIZE = 11.0f;
-
- INFO_TEXT_POINT_SIZE = 13.0f;
- CONTENTS_TEXT_POINT_SIZE = 12.0f;
- }
-
- public void CreateUI()
- {
- ImageView bgView = new ImageView()
- {
- ResourceUrl = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/familyboard_setting_bg1.png",
- Size = new Size(Window.Instance.WindowSize.Width, Window.Instance.WindowSize.Height),
- };
-
- Window.Instance.Add(bgView);
- MainView = new View()
- {
- Size = new Size(470, 600),
- //Size = new Size(50, 50),
- BackgroundColor = Color.Black,
- CornerRadius = 10.0f,
- Position = new Position(-50, 500),
- ParentOrigin = ParentOrigin.TopCenter,
- PivotPoint = PivotPoint.TopCenter,
- PositionUsesPivotPoint = true,
- };
-
-
- Window.Instance.Add(MainView);
- AnimationView = new View()
- {
- ParentOrigin = ParentOrigin.TopCenter,
- PivotPoint = PivotPoint.TopCenter,
- PositionUsesPivotPoint = true,
- Size = new Size(470, 600),
- Position = new Position(-50, 500),
- };
- Window.Instance.Add(AnimationView);
- MainView.TouchEvent += View_TouchEvent; ;
-
-
- ImageView imgView = new ImageView()
- {
- ParentOrigin = ParentOrigin.BottomCenter,
- PivotPoint = PivotPoint.BottomCenter,
- PositionUsesPivotPoint = true,
- ResourceUrl = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/pic_1.jpg",
- //Position = new Position(0, -30, 0),
- Size = new Size(360, 360),
- };
- MainView.Add(imgView);
-
- TextLabel contents = new TextLabel()
- {
- Text = "Beautiful, dreamy and dramtic\n instrumental neo classical piano scores\n from movies and tv series.\n",
- MultiLine = true,
- TextColor = CONTENTS_TEXT_COLOR,
- HorizontalAlignment = HorizontalAlignment.Center,
- VerticalAlignment = VerticalAlignment.Top,
- PointSize = CONTENTS_TEXT_POINT_SIZE,
- Position = new Position(0, 250, 0),
- HeightResizePolicy = ResizePolicyType.FillToParent,
- WidthResizePolicy = ResizePolicyType.FillToParent,
- Opacity = 0.0f,
- };
- MainView.Add(contents);
-
- CreateTopProfile(MainView);
-
- PropertyMap map = new PropertyMap();
- map.Insert("weight", new PropertyValue("bold"));
-
- TextLabel text = new TextLabel("Cinematic Piano")
- {
- HorizontalAlignment = HorizontalAlignment.Center,
- VerticalAlignment = VerticalAlignment.Top,
- TextColor = MAIN_TEXT_COLOR,
- PointSize = MAIN_TEXT_POINT_SIZE,
- Position = new Position(0, 150, 0),
- HeightResizePolicy = ResizePolicyType.FillToParent,
- WidthResizePolicy = ResizePolicyType.FillToParent,
- FontStyle = map,
- };
- MainView.Add(text);
-
- CreateInfo(MainView);
-
- View play_btn = new View()
- {
- ParentOrigin = ParentOrigin.BottomCenter,
- PivotPoint = PivotPoint.Center,
- PositionUsesPivotPoint = true,
- BackgroundColor = Color.White,
- Position = new Position(0, -40),
- Size = new Size(52, 52),
- CornerRadius = 26.0f,
- };
-
- ImageView play_icon = new ImageView()
- {
- ParentOrigin = ParentOrigin.Center,
- PivotPoint = PivotPoint.Center,
- PositionUsesPivotPoint = true,
- ResourceUrl = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/play-128.png",
- Color = Color.Black,
- Size = new Size(20, 20),
- };
-
- play_btn.Add(play_icon);
- MainView.Add(play_btn);
- }
-
-
- public void CreateTopProfile(View view)
- {
- IconView = new View()
- {
- ParentOrigin = ParentOrigin.TopCenter,
- PivotPoint = PivotPoint.Center,
- PositionUsesPivotPoint = true,
- BackgroundColor = Color.White,
- Position = new Position(-160, 80, 0),
- Size = new Size(76, 76, 0),
- CornerRadius = 38.0f,
- };
-
- View profileContainer_inner = new View()
- {
- ParentOrigin = ParentOrigin.Center,
- PivotPoint = PivotPoint.Center,
- PositionUsesPivotPoint = true,
- BackgroundColor = Color.Black,
- Size = new Size(74, 74, 0),
- CornerRadius = 37.0f,
- };
-
- ImageView profileImage = new ImageView()
- {
- ParentOrigin = ParentOrigin.Center,
- PivotPoint = PivotPoint.Center,
- PositionUsesPivotPoint = true,
- ResourceUrl = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/profile.jpg",
- Size = new Size(62, 62, 0),
- CornerRadius = 31.0f,
- };
- IconView.Add(profileContainer_inner);
- profileContainer_inner.Add(profileImage);
- AnimationView.Add(IconView);
-
- PropertyMap map = new PropertyMap();
- map.Insert("weight", new PropertyValue("bold"));
- MainProfileText = new TextLabel("PIANO DAILY")
- {
- HorizontalAlignment = HorizontalAlignment.Center,
- VerticalAlignment = VerticalAlignment.Top,
- TextColor = MAIN_TEXT_COLOR,
- PointSize = PROFILE_TEXT_POINT_SIZE,
- Position = new Position(0, 60, 0),
- HeightResizePolicy = ResizePolicyType.FillToParent,
- WidthResizePolicy = ResizePolicyType.FillToParent,
- FontStyle = map,
- };
- AnimationView.Add(MainProfileText);
- SubProfileText = new TextLabel("July 2020")
- {
- HorizontalAlignment = HorizontalAlignment.Center,
- VerticalAlignment = VerticalAlignment.Top,
- TextColor = SUB_TEXT_COLOR,
- PointSize = SUB_TEXT_POINT_SIZE,
- Position = new Position(0, 90, 0),
- HeightResizePolicy = ResizePolicyType.FillToParent,
- WidthResizePolicy = ResizePolicyType.FillToParent,
- };
- AnimationView.Add(SubProfileText);
-
-
-
- AddView = new View()
- {
- ParentOrigin = ParentOrigin.TopCenter,
- PivotPoint = PivotPoint.Center,
- PositionUsesPivotPoint = true,
- BackgroundColor = Color.White,
- Position = new Position(160, 80),
- Size = new Size(60, 60),
- CornerRadius = 30.0f,
- };
- ImageView add_icon = new ImageView()
- {
- ParentOrigin = ParentOrigin.Center,
- PivotPoint = PivotPoint.Center,
- PositionUsesPivotPoint = true,
- ResourceUrl = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/add.png",
- Size = new Size(15, 15),
- };
- AddView.Add(add_icon);
- AnimationView.Add(AddView);
- }
-
- public void CreateInfo(View view)
- {
- int posY = 210;
- TextLabel info1 = new TextLabel()
- {
- Text = "9,465\n",
- TextColor = INFO_TEXT_COLOR,
- HorizontalAlignment = HorizontalAlignment.Center,
- VerticalAlignment = VerticalAlignment.Top,
- PointSize = INFO_TEXT_POINT_SIZE,
- Position = new Position(-35, posY, 0),
- HeightResizePolicy = ResizePolicyType.FillToParent,
- WidthResizePolicy = ResizePolicyType.FillToParent,
- };
- view.Add(info1);
- ImageView info1_icon = new ImageView()
- {
- ParentOrigin = ParentOrigin.TopCenter,
- ResourceUrl = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/bar-chart-5-128.png",
- Color = INFO_TEXT_COLOR,
- Position = new Position(-85, posY, 0),
- Size = new Size(15, 15),
- };
- view.Add(info1_icon);
-
-
- TextLabel info2 = new TextLabel()
- {
- Text = "5h 35m\n",
- TextColor = INFO_TEXT_COLOR,
- HorizontalAlignment = HorizontalAlignment.Center,
- VerticalAlignment = VerticalAlignment.Top,
- PointSize = INFO_TEXT_POINT_SIZE,
- Position = new Position(65, posY, 0),
- HeightResizePolicy = ResizePolicyType.FillToParent,
- WidthResizePolicy = ResizePolicyType.FillToParent,
- };
- view.Add(info2);
-
- ImageView info2_icon = new ImageView()
- {
- ParentOrigin = ParentOrigin.TopCenter,
- ResourceUrl = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/clock-128.png",
- Color = INFO_TEXT_COLOR,
- Position = new Position(10, posY, 0),
- Size = new Size(15, 15),
- };
- //view.Add(info2_icon);
-
- }
- private bool View_TouchEvent(object source, View.TouchEventArgs e)
- {
-
- if (e.Touch.GetState(0) == PointStateType.Down)
- {
- prePos = e.Touch.GetScreenPosition(0);
- firstPos = prePos;
-
- startAni = new Animation(150);
- startAni.AnimateTo(MainView, "Scale", new Vector3(0.9f, 0.9f, 1.0f));
- startAni.AnimateTo(AnimationView, "Scale", new Vector3(0.9f, 0.9f, 1.0f));
- startAni.Play();
- }
- else if (e.Touch.GetState(0) == PointStateType.Motion)
- {
- Vector2 curPos = e.Touch.GetScreenPosition(0);
- float moveX = curPos.X - prePos.X;
- float moveY = curPos.Y - prePos.Y;
- Position mPos = MainView.Position;
- MainView.Position = new Position(mPos.X + moveX, mPos.Y + moveY);
- AnimationView.Position = new Position(mPos.X + moveX, mPos.Y + moveY);
-
- prePos = curPos;
- }
- else if (e.Touch.GetState(0) == PointStateType.Up)
- {
- Vector2 curPos = e.Touch.GetScreenPosition(0);
- float moveX = Math.Abs(curPos.X - firstPos.X);
- float moveY = Math.Abs(curPos.Y - firstPos.Y);
-
- if (moveX < 5 && moveY < 5 && !isStartingProcess)
- {
- Tizen.Log.Error("MYLOG", "launch app");
- launchApplication();
- }
- if (startAni != null)
- {
- startAni.Clear();
- startAni.Dispose();
- startAni = null;
- }
- startAni = new Animation(150);
- startAni.AnimateTo(MainView, "Scale", new Vector3(1.0f, 1.0f, 1.0f));
- startAni.AnimateTo(AnimationView, "Scale", new Vector3(1.0f, 1.0f, 1.0f));
- startAni.Play();
- }
-
- return true;
- }
-
- private void launchApplication()
- {
- AppControl appControl = new AppControl();
- appControl.ApplicationId = "org.tizen.example.NUIMusicPlayer";
- application.SendLaunchRequest(appControl);
- }
-
- }
-}
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<manifest package="org.tizen.example.NUIBrokerSample" version="1.0.0" api-version="5" 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
-{
- class Program : NUIApplication
- {
- private UICreator uiCreator;
-
- protected override void OnCreate()
- {
- base.OnCreate();
- Initialize();
- }
-
- void Initialize()
- {
- Window.Instance.KeyEvent += OnKeyEvent;
- uiCreator = new UICreator();
- uiCreator.CreateUI();
-
- TransitionOptions = new TransitionOptions(GetDefaultWindow());
- TransitionOptions.EnableTransition = true;
-
- }
-
- protected void OnResumed()
- {
- base.OnResume();
- uiCreator.ShowObjects();
- }
-
- public void OnKeyEvent(object sender, Window.KeyEventArgs e)
- {
- if (e.Key.State == Key.StateType.Down && (e.Key.KeyPressedName == "XF86Back" || e.Key.KeyPressedName == "Escape"))
- {
- uiCreator.HideObjects();
- //Window.Instance.SetIconified(true);
- 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>
- </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>
- <PackageReference Include="Tizen.NET.Sdk" Version="1.0.1" />
- </ItemGroup>
-
- <ItemGroup>
- <ProjectReference Include="..\..\..\src\Tizen.NUI\Tizen.NUI.csproj" />
- </ItemGroup>
-
-</Project>
-
+++ /dev/null
-using System;
-using System.Collections.Generic;
-using System.Text;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-
-namespace NUIMusicPlayer
-{
- public class UICreator
- {
- private Color MAIN_TEXT_COLOR = new Color(0.95f, 0.95f, 0.95f, 1.0f);
- private Color INFO_TEXT_COLOR = new Color(0.3f, 0.3f, 0.3f, 1.0f);
- private Color CONTENTS_TEXT_COLOR = new Color(0.4f, 0.4f, 0.4f, 1.0f);
- private Color SUB_TEXT_COLOR = new Color(0.70f, 0.70f, 0.70f, 1.0f);
-
- private float MAIN_TEXT_POINT_SIZE;
- private float INFO_TEXT_POINT_SIZE;
- private float PROFILE_TEXT_POINT_SIZE;
- private float CONTENTS_TEXT_POINT_SIZE;
-
- private float SUB_TEXT_POINT_SIZE;
-
- private View profileContainer;
- private View add_container;
-
- private TextLabel profile_text1;
- private TextLabel profile_text2;
-
- public UICreator()
- {
- CreateFHubSize();
- }
- public void CreateMobileSize()
- {
- MAIN_TEXT_POINT_SIZE = 16.0f;
- INFO_TEXT_POINT_SIZE = 5.0f;
- PROFILE_TEXT_POINT_SIZE = 5.0f;
- CONTENTS_TEXT_POINT_SIZE = 7.0f;
-
- SUB_TEXT_POINT_SIZE = 4.0f;
- }
-
-
- public void CreateFHubSize()
- {
- MAIN_TEXT_POINT_SIZE = 70.0f;
- INFO_TEXT_POINT_SIZE = 20.0f;
- PROFILE_TEXT_POINT_SIZE = 20.0f;
- CONTENTS_TEXT_POINT_SIZE = 30.0f;
-
- SUB_TEXT_POINT_SIZE = 13.0f;
- }
-
- public void CreateUI()
- {
-
- View view = new View()
- {
- Size = new Size(Window.Instance.WindowSize.Width, Window.Instance.WindowSize.Height, 0),
- BackgroundColor = Color.Black,
- };
- Window.Instance.GetDefaultLayer().Add(view);
-
- profileContainer = new View()
- {
- ParentOrigin = ParentOrigin.TopCenter,
- PivotPoint = PivotPoint.Center,
- PositionUsesPivotPoint = true,
- BackgroundColor = Color.White,
- Position = new Position(0, 150, 0),
- Size = new Size(96, 96, 0),
- CornerRadius = 48.0f,
- };
-
- View profileContainer_inner = new View()
- {
- ParentOrigin = ParentOrigin.Center,
- PivotPoint = PivotPoint.Center,
- PositionUsesPivotPoint = true,
- BackgroundColor = Color.Black,
- Size = new Size(94, 94, 0),
- CornerRadius = 47.0f,
- };
-
- ImageView profileImage = new ImageView()
- {
- ParentOrigin = ParentOrigin.Center,
- PivotPoint = PivotPoint.Center,
- PositionUsesPivotPoint = true,
- ResourceUrl = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/profile.jpg",
- Size = new Size(80, 80, 0),
- CornerRadius = 40.0f,
- };
- profileContainer.Add(profileContainer_inner);
- profileContainer_inner.Add(profileImage);
- view.Add(profileContainer);
-
- add_container = new View()
- {
- ParentOrigin = ParentOrigin.TopCenter,
- PivotPoint = PivotPoint.Center,
- PositionUsesPivotPoint = true,
- BackgroundColor = Color.White,
- Position = new Position(33, 183),
- Size = new Size(40, 40),
- CornerRadius = 20.0f,
- };
- ImageView add_icon = new ImageView()
- {
- ParentOrigin = ParentOrigin.Center,
- PivotPoint = PivotPoint.Center,
- PositionUsesPivotPoint = true,
- ResourceUrl = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/add.png",
- Size = new Size(16, 16),
- };
- add_container.Add(add_icon);
- view.Add(add_container);
-
- ImageView back_btn = new ImageView()
- {
- ParentOrigin = ParentOrigin.BottomLeft,
- PivotPoint = PivotPoint.Center,
- PositionUsesPivotPoint = true,
- ResourceUrl = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/arrow-89-128.png",
- Position = new Position(50, -60),
- Size = new Size(40, 40),
- };
- back_btn.TouchEvent += Back_btn_TouchEvent;
- view.Add(back_btn);
-
- profile_text1 = new TextLabel("PIANO DAILY")
- {
- HorizontalAlignment = HorizontalAlignment.Center,
- VerticalAlignment = VerticalAlignment.Top,
- TextColor = MAIN_TEXT_COLOR,
- PointSize = PROFILE_TEXT_POINT_SIZE,
- Position = new Position(0, 207, 0),
- HeightResizePolicy = ResizePolicyType.FillToParent,
- WidthResizePolicy = ResizePolicyType.FillToParent,
- };
- view.Add(profile_text1);
-
- profile_text2 = new TextLabel("July 2020")
- {
- HorizontalAlignment = HorizontalAlignment.Center,
- VerticalAlignment = VerticalAlignment.Top,
- TextColor = SUB_TEXT_COLOR,
- PointSize = SUB_TEXT_POINT_SIZE,
- Position = new Position(0, 230, 0),
- HeightResizePolicy = ResizePolicyType.FillToParent,
- WidthResizePolicy = ResizePolicyType.FillToParent,
- };
- view.Add(profile_text2);
-
-
- TextLabel info1 = new TextLabel()
- {
- Text = "9,465\n",
- TextColor = INFO_TEXT_COLOR,
- HorizontalAlignment = HorizontalAlignment.Center,
- VerticalAlignment = VerticalAlignment.Top,
- PointSize = INFO_TEXT_POINT_SIZE,
- Position = new Position(-65, 400, 0),
- HeightResizePolicy = ResizePolicyType.FillToParent,
- WidthResizePolicy = ResizePolicyType.FillToParent,
- };
- view.Add(info1);
- ImageView info1_icon = new ImageView()
- {
- ParentOrigin = ParentOrigin.TopCenter,
- ResourceUrl = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/bar-chart-5-128.png",
- Color = INFO_TEXT_COLOR,
- Position = new Position(-125, 405, 0),
- Size = new Size(18, 18),
- };
- view.Add(info1_icon);
-
-
- TextLabel info2 = new TextLabel()
- {
- Text = "5h 35m\n",
- TextColor = INFO_TEXT_COLOR,
- HorizontalAlignment = HorizontalAlignment.Center,
- VerticalAlignment = VerticalAlignment.Top,
- PointSize = INFO_TEXT_POINT_SIZE,
- Position = new Position(65, 400, 0),
- HeightResizePolicy = ResizePolicyType.FillToParent,
- WidthResizePolicy = ResizePolicyType.FillToParent,
- };
- view.Add(info2);
-
- ImageView info2_icon = new ImageView()
- {
- ParentOrigin = ParentOrigin.TopCenter,
- ResourceUrl = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/clock-128.png",
- Color = INFO_TEXT_COLOR,
- Position = new Position(-2, 405, 0),
- Size = new Size(18, 18),
- };
- view.Add(info2_icon);
-
-
-
- PropertyMap map = new PropertyMap();
- map.Insert("weight", new PropertyValue("bold"));
-
- TextLabel text = new TextLabel("Cinematic Piano")
- {
- HorizontalAlignment = HorizontalAlignment.Center,
- VerticalAlignment = VerticalAlignment.Top,
- TextColor = MAIN_TEXT_COLOR,
- PointSize = MAIN_TEXT_POINT_SIZE,
- Position = new Position(0, 280, 0),
- HeightResizePolicy = ResizePolicyType.FillToParent,
- WidthResizePolicy = ResizePolicyType.FillToParent,
- FontStyle = map,
- };
- view.Add(text);
-
- ImageView imgView = new ImageView()
- {
- ParentOrigin = ParentOrigin.BottomCenter,
- PivotPoint = PivotPoint.BottomCenter,
- PositionUsesPivotPoint = true,
- ResourceUrl = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/pic_1.jpg",
- //Position = new Position(0, -30, 0),
- Size = new Size(850, 850),
- };
- view.Add(imgView);
-
-
- TextLabel contents = new TextLabel()
- {
- Text = "Beautiful, dreamy and dramtic\n instrumental neo classical piano scores\n from movies and tv series.\n",
- MultiLine = true,
- TextColor = CONTENTS_TEXT_COLOR,
- HorizontalAlignment = HorizontalAlignment.Center,
- VerticalAlignment = VerticalAlignment.Top,
- PointSize = CONTENTS_TEXT_POINT_SIZE,
- Position = new Position(0, 500, 0),
- HeightResizePolicy = ResizePolicyType.FillToParent,
- WidthResizePolicy = ResizePolicyType.FillToParent,
- };
- view.Add(contents);
-
-
- View play_btn = new View()
- {
- ParentOrigin = ParentOrigin.BottomCenter,
- PivotPoint = PivotPoint.Center,
- PositionUsesPivotPoint = true,
- BackgroundColor = Color.White,
- Position = new Position(0, -70),
- Size = new Size(88, 88),
- CornerRadius = 44.0f,
- };
-
-
- ImageView play_icon = new ImageView()
- {
- ParentOrigin = ParentOrigin.Center,
- PivotPoint = PivotPoint.Center,
- PositionUsesPivotPoint = true,
- ResourceUrl = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/play-128.png",
- Color = Color.Black,
- Size = new Size(26, 26),
- };
-
- play_btn.Add(play_icon);
- view.Add(play_btn);
- }
-
- private bool Back_btn_TouchEvent(object source, View.TouchEventArgs e)
- {
- if(e.Touch.GetState(0) == PointStateType.Up)
- {
- //HideObjects();
- //Window.Instance.SetIconified(true);
- //Exit();
- }
- return false;
- }
-
- public void HideObjects()
- {
- profileContainer.Hide();
- add_container.Hide();
- profile_text1.Hide();
- profile_text2.Hide();
- }
-
- public void ShowObjects()
- {
- profileContainer.Show();
- add_container.Show();
- profile_text1.Show();
- profile_text2.Show();
- }
- }
-}
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="5" 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>
+++ /dev/null
-using System;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-
-namespace NUISimpleCallee
-{
- class Program : NUIApplication
- {
- protected override void OnCreate()
- {
- base.OnCreate();
- Initialize();
- }
-
- void Initialize()
- {
- Window.Instance.KeyEvent += OnKeyEvent;
- Window.Instance.TouchEvent += OnTouchEvent;
- Window.Instance.BackgroundColor = Color.Yellow;
-
- TextLabel text = new TextLabel("Callee");
- text.HorizontalAlignment = HorizontalAlignment.Center;
- text.VerticalAlignment = VerticalAlignment.Center;
- text.TextColor = Color.Red;
- text.PointSize = 25.0f;
- text.HeightResizePolicy = ResizePolicyType.FillToParent;
- text.WidthResizePolicy = ResizePolicyType.FillToParent;
- Window.Instance.GetDefaultLayer().Add(text);
-
- TransitionOptions = new TransitionOptions(GetDefaultWindow());
- TransitionOptions.EnableTransition = true;
-
- TransitionOptions.CallerScreenShown += TransitionOptions_CallerScreenShown;
- TransitionOptions.CallerScreenHidden += TransitionOptions_CallerScreenHidden;
- }
-
- private void TransitionOptions_CallerScreenShown(object sender, EventArgs e)
- {
- Tizen.Log.Error("MYLOG", "Shown");
- }
-
- private void TransitionOptions_CallerScreenHidden(object sender, EventArgs e)
- {
- Tizen.Log.Error("MYLOG", "Hidden");
- }
-
- private void OnTouchEvent(object sender, Window.TouchEventArgs e)
- {
- if (e.Touch.GetState(0) == PointStateType.Up)
- {
- //Window.Instance.Hide();
- Exit();
- }
- }
-
- 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
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="5" package="org.tizen.example.NUISimpleCallee" version="1.0.0">
- <profile name="common" />
- <ui-application appid="org.tizen.example.NUISimpleCallee"
- exec="NUISimpleCallee.dll"
- type="dotnet"
- multiple="false"
- taskmanage="true"
- nodisplay="false"
- launch_mode="single">
- <label>NUISimpleCallee</label>
- <icon>NUISimpleCallee.png</icon>
- <metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
- </ui-application>
-</manifest>
+++ /dev/null
-using System;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-using Tizen.Applications;
-
-namespace NUISimpleCaller
-{
- class Program : NUIApplication
- {
- protected override void OnCreate()
- {
- base.OnCreate();
- Initialize();
- }
-
- void Initialize()
- {
- Window.Instance.KeyEvent += OnKeyEvent;
- Window.Instance.TouchEvent += OnTouchEvent;
-
- TextLabel text = new TextLabel("NUI Simple Caller Sample");
- text.HorizontalAlignment = HorizontalAlignment.Center;
- text.VerticalAlignment = VerticalAlignment.Center;
- text.TextColor = Color.Blue;
- text.PointSize = 25.0f;
- text.HeightResizePolicy = ResizePolicyType.FillToParent;
- text.WidthResizePolicy = ResizePolicyType.FillToParent;
- Window.Instance.GetDefaultLayer().Add(text);
-
-
- TransitionOptions = new TransitionOptions(GetDefaultWindow());
- TransitionOptions.EnableTransition = true;
- TransitionOptions.ForwardAnimation = new SlideIn(1300);
- TransitionOptions.BackwardAnimation = new SlideOut(1300);
-
- TransitionOptions.AnimationInitialized += TransitionOptions_AnimationInitialized;
- TransitionOptions.AnimationFinished += TransitionOptions_AnimationFinished;
- }
-
- private void TransitionOptions_AnimationInitialized(object sender, EventArgs e)
- {
- Tizen.Log.Error("MYLOG", "Animation Initialized");
- }
-
- private void TransitionOptions_AnimationFinished(object sender, EventArgs e)
- {
- Tizen.Log.Error("MYLOG", "Animation Finished");
- }
-
- private void OnTouchEvent(object sender, Window.TouchEventArgs e)
- {
- if (e.Touch.GetState(0) == PointStateType.Up)
- {
- AppControl appControl = new AppControl();
- appControl.ApplicationId = "org.tizen.example.NUISimpleCallee";
- SendLaunchRequest(appControl);
- }
- }
-
- 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);
- }
- }
-}
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
+ <AssemblyName>BrokerSample</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\..\..\src\Tizen.NUI\Tizen.NUI.csproj" />
<PackageReference Include="Tizen.NET.Sdk" Version="1.0.0" />
</ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\src\Tizen.NUI.Components\Tizen.NUI.Components.csproj" />
+ <ProjectReference Include="..\..\..\src\Tizen.NUI\Tizen.NUI.csproj" />
+ </ItemGroup>
+
</Project>
--- /dev/null
+/*
+ * Copyright(c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+
+namespace BrokerSample
+{
+ class Program : NUIApplication
+ {
+ private Window window;
+ protected override void OnCreate()
+ {
+ base.OnCreate();
+ Initialize();
+ }
+
+ void Initialize()
+ {
+ ApplicationTransitionManager.Instance.ApplicationFrameType = FrameType.FrameBroker;
+ window = GetDefaultWindow();
+ window.KeyEvent += OnKeyEvent;
+
+ CreateUI();
+ }
+
+ private void CreateUI()
+ {
+ var layoutView = new View()
+ {
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.White,
+ Layout = new LinearLayout()
+ {
+ LinearAlignment = LinearLayout.Alignment.Center,
+ LinearOrientation = LinearLayout.Orientation.Horizontal
+ },
+ };
+
+ int type = 0;
+ Color[] colors = { Color.Red, Color.Blue, Color.Cyan, Color.Yellow };
+ foreach (var color in colors)
+ {
+ var button = new BrokerView()
+ {
+ Name = "" + type,
+ BackgroundColor = color,
+ Margin = new Extents(30, 30, 30, 30),
+ };
+ type++;
+ layoutView.Add(button);
+ }
+ GetDefaultWindow().Add(layoutView);
+ }
+
+ 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
+/*
+ * Copyright(c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using Tizen.Applications;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+
+namespace BrokerSample
+{
+
+ public class BrokerView : View
+ {
+ public BrokerView()
+ {
+ Size = new Size(100, 100);
+ CornerRadius = new Vector4(0.5f, 0.5f, 0.5f, 0.5f);
+ CornerRadiusPolicy = VisualTransformPolicyType.Relative;
+
+ TouchEvent += targetView_TouchEvent;
+ }
+
+ private bool targetView_TouchEvent(object source, View.TouchEventArgs e)
+ {
+ //앱 런칭
+ if (e.Touch.GetState(0) == PointStateType.Up)
+ {
+ SetApplicationTransition();
+
+ AppControl control = new AppControl()
+ {
+ ApplicationId = "org.tizen.example.ProviderSample",
+ };
+ control.ExtraData.Add("Color", Name);
+ //AppControl.SendLaunchRequest(control);
+ ApplicationTransitionManager.Instance.LaunchRequestWithTransition(control);
+ }
+ return false;
+ }
+
+ private void SetApplicationTransition()
+ {
+ var transitionManager = ApplicationTransitionManager.Instance;
+ //reset value
+ transitionManager.SourceView = null;
+ transitionManager.AppearingTransition = null;
+ transitionManager.DisappearingTransition = null;
+ transitionManager.SourceView = this;
+ }
+ }
+}
<?xml version="1.0" encoding="utf-8"?>
-<manifest package="org.tizen.example.NUISimpleCaller" version="1.0.0" api-version="5" xmlns="http://tizen.org/ns/packages">
+<manifest package="org.tizen.example.BrokerSample" version="1.0.0" api-version="6" xmlns="http://tizen.org/ns/packages">
<profile name="common" />
- <ui-application appid="org.tizen.example.NUISimpleCaller" exec="NUISimpleCaller.dll" multiple="false" nodisplay="false" taskmanage="true" type="dotnet" launch_mode="single">
- <label>NUISimpleCaller</label>
- <icon>NUISimpleCaller.png</icon>
+ <ui-application appid="org.tizen.example.BrokerSample" exec="BrokerSample.dll" multiple="false" nodisplay="false" taskmanage="true" type="dotnet" launch_mode="single">
+ <label>BrokerSample</label>
+ <icon>BrokerSample.png</icon>
<metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
<splash-screens />
</ui-application>
--- /dev/null
+/*
+ * Copyright(c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using Tizen.Applications;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+
+namespace ProviderSample
+{
+ class Program : NUIApplication
+ {
+ private View layoutView;
+ protected override void OnCreate()
+ {
+ base.OnCreate();
+ Initialize();
+ }
+
+ protected override void OnAppControlReceived(AppControlReceivedEventArgs e)
+ {
+ Tizen.Log.Error("NUI", "OnAppControlReceived - Provider");
+ string message;
+ ReceivedAppControl receivedAppControl = e.ReceivedAppControl;
+
+ /// Get ExtraData coming from caller application
+ message = receivedAppControl.ExtraData.Get<string>("Color");
+
+ Color[] colors = { Color.Red, Color.Blue, Color.Cyan, Color.Yellow };
+ layoutView.BackgroundColor = colors[int.Parse(message)];
+
+ if (receivedAppControl.IsReplyRequest)
+ {
+ AppControl replyRequest = new AppControl();
+
+ /// Send reply to the caller application
+ receivedAppControl.ReplyToLaunchRequest(replyRequest, AppControlReplyResult.Succeeded);
+ }
+
+
+ base.OnAppControlReceived(e);
+ }
+
+ void Initialize()
+ {
+ Window.Instance.KeyEvent += OnKeyEvent;
+
+ CreateUI();
+
+ ApplicationTransitionManager.Instance.ApplicationFrameType = FrameType.FrameProvider;
+ }
+
+ private void CreateUI()
+ {
+ layoutView = new View()
+ {
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.White,
+ Layout = new AbsoluteLayout(),
+ };
+ layoutView.TouchEvent += ContentPage_TouchEvent;
+ Window.Instance.Add(layoutView);
+ }
+
+ private bool ContentPage_TouchEvent(object source, View.TouchEventArgs e)
+ {
+ //앱 런칭
+ if (e.Touch.GetState(0) == PointStateType.Up)
+ {
+ Window.Instance.Lower();
+ }
+ return false;
+ }
+
+ 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);
+ }
+ }
+}
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
+ <AssemblyName>ProviderSample</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<Folder Include="res\" />
</ItemGroup>
+
<ItemGroup>
- <ProjectReference Include="..\..\..\src\Tizen.NUI\Tizen.NUI.csproj" />
<PackageReference Include="Tizen.NET.Sdk" Version="1.0.0" />
</ItemGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\src\Tizen.NUI.Components\Tizen.NUI.Components.csproj" />
+ <ProjectReference Include="..\..\..\src\Tizen.NUI\Tizen.NUI.csproj" />
+ </ItemGroup>
+
</Project>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="6" package="org.tizen.example.ProviderSample" version="1.0.0">
+ <profile name="common" />
+ <ui-application appid="org.tizen.example.ProviderSample"
+ exec="ProviderSample.dll"
+ type="dotnet"
+ multiple="false"
+ taskmanage="true"
+ nodisplay="false"
+ launch_mode="single"
+ >
+ <label>ProviderSample</label>
+ <icon>ProviderSample.png</icon>
+ <metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
+ </ui-application>
+</manifest>