-using System;
+using System;
using Tizen.Applications;
using Tizen;
using Tizen.NUI;
{
public class NUIWatchApplicationManualTest : NUIWatchApplication
{
+ private Window _win;
public void OnButtonPressed()
{
Log.Fatal("TCT", "Call Exit()");
}
protected override void OnCreate()
{
- Tizen.NUI.Window.Instance.BackgroundColor = Color.White;
+ _win = this.Window;
+ _win.BackgroundColor = Color.White;
PushButton exitButton = new PushButton();
exitButton.LabelText = "EXIT";
Exit();
return true;
};
- Window.Instance.Add(exitButton);
+ _win.Add(exitButton);
FocusManager.Instance.SetCurrentFocusView(exitButton);
<?xml version="1.0" encoding="utf-8"?>
-<manifest package="org.tizen.example.NUIWatchApplicationManualTest" version="1.0.0" api-version="5" xmlns="http://tizen.org/ns/packages">
- <profile name="wearable" />
- <privileges>
- <privilege>http://tizen.org/privilege/alarm.set</privilege>
- </privileges>
- <provides-appdefined-privileges />
+<manifest package="org.tizen.example.NUIWatchApplicationManualTest" version="1.0.0" api-version="6" xmlns="http://tizen.org/ns/packages">
+ <profile name="wearable" />
+ <ui-application appid="org.tizen.example.NUIWatchApplicationManualTest"
+ exec="NUIWatchApplicationManualTest.dll"
+ multiple="false"
+ taskmanage="true"
+ splash-screen-display="true"
+ type="dotnet"
+ launch_mode="single">
+ <icon>NUIWatchApplicationManualTest.png</icon>
+ <label>NUIWatchApplicationManualTest</label>
+ </ui-application>
+ <privileges>
+ <privilege>http://tizen.org/privilege/alarm.set</privilege>
+ </privileges>
+ <provides-appdefined-privileges />
</manifest>
<!-- Property Group for .NET Core Project -->
<PropertyGroup>
<OutputType>Exe</OutputType>
- <TargetFramework>tizen50</TargetFramework>
+ <TargetFramework>tizen60</TargetFramework>
</PropertyGroup>
<!-- Property Group for Tizen Project -->
<?xml version="1.0" encoding="utf-8"?>
-<manifest package="Tizen.NUI.Wearable.Manual.Tests" version="1.0.0" api-version="5" xmlns="http://tizen.org/ns/packages">
+<manifest package="Tizen.NUI.Wearable.Manual.Tests" version="1.0.0" api-version="6" xmlns="http://tizen.org/ns/packages">
<profile name="wearable" />
- <ui-application appid="Tizen.NUI.Wearable.Manual.Tests" exec="Tizen.NUI.Wearable.Manual.Tests.dll" multiple="false" taskmanage="true" splash-screen-display="true" type="dotnet" launch_mode="single">
+ <ui-application appid="Tizen.NUI.Wearable.Manual.Tests"
+ exec="Tizen.NUI.Wearable.Manual.Tests.dll"
+ multiple="false"
+ taskmanage="true"
+ splash-screen-display="true"
+ type="dotnet"
+ launch_mode="single">
<icon>Tizen.NUI.Wearable.Manual.Tests.png</icon>
<label>Tizen.NUI.Wearable.Manual.Tests</label>
</ui-application>
static TextLabel MainTitle;
static readonly string Title = "Tizen.NUI.Wearable Auto TCT \n\n";
static readonly float TextSize = 10.0f;
+ public static Window win;
public App() : base()
{
Random rand = new Random();
- Window window = Window.Instance;
- Window.Instance.Title = "NUIWatchApplicationTest";
- window.BackgroundColor = Color.Green;
+ win = this.Window;
+ win.Title = "NUIWatchApplicationTest";
+ win.BackgroundColor = Color.Red;
MainTitle = new TextLabel();
MainTitle.MultiLine = true;
MainTitle.Text = Title;
MainTitle.PixelSize = TextSize;
MainTitle.BackgroundColor = new Color(rand.Next(250) / 255.0f, rand.Next(250) / 255.0f, rand.Next(250) / 255.0f, 1.0f);
- MainTitle.Size2D = new Size2D(window.WindowSize.Width / 2, window.WindowSize.Height / 2);
+ MainTitle.Size2D = new Size2D(win.WindowSize.Width / 2, win.WindowSize.Height / 2);
MainTitle.PositionUsesPivotPoint = true;
MainTitle.ParentOrigin = ParentOrigin.Center;
MainTitle.PivotPoint = PivotPoint.Center;
- window.Add(MainTitle);
+ win.Add(MainTitle);
}
static public async Task MainTitleChangeBackgroundColor(Color color)
-<Project Sdk="Microsoft.NET.Sdk">
+<Project Sdk="Microsoft.NET.Sdk">
<!-- Property Group for .NET Core Project -->
<PropertyGroup>
<OutputType>Exe</OutputType>
- <TargetFramework>tizen50</TargetFramework>
+ <TargetFramework>tizen60</TargetFramework>
</PropertyGroup>
<!-- Property Group for Tizen Project -->
var application = new NUIWatchApplication();
Assert.IsNotNull(application, "Object should not be null after initializing.");
Assert.IsInstanceOf<NUIWatchApplication>(application, "application must be an instance of Applications.WatchApplication.");
- application.Dispose();
+ //No need to dispose, this application never be Run nor Exit.
+ //application.Dispose();
}
catch (Exception e)
{
var application = new NUIWatchApplication("stylesheet");
Assert.IsNotNull(application, "Object should not be null after initializing.");
Assert.IsInstanceOf<NUIWatchApplication>(application, "application must be an instance of Applications.WatchApplication.");
- application.Dispose();
+ //No need to dispose, this application never be Run nor Exit.
+ //application.Dispose();
}
catch (Exception e)
{
public void Window_GET_VALUE()
{
/* TEST CODE */
- var application = new NUIWatchApplication();
- Assert.IsNotNull(application.Window, "Retrieved Window should be not null");
- Assert.AreEqual("NUIWatchApplicationTest", application.Window.Title, "Should be equal to the set value");
+ //Proper window can be aquired after Application runs normally then window creation is performed.
+ //So this App is used to check whether the Window is made properly.
+ var window = App.win;
+ Assert.IsNotNull(window, "Retrieved Window should be not null");
+ Assert.AreEqual("NUIWatchApplicationTest", window.Title, "Should be equal to the set value");
}
}
}
<?xml version="1.0" encoding="utf-8"?>
-<manifest package="Tizen.NUI.Wearable.Tests" version="1.0.0" api-version="5" xmlns="http://tizen.org/ns/packages">
+<manifest package="Tizen.NUI.Wearable.Tests" version="1.0.0" api-version="6" xmlns="http://tizen.org/ns/packages">
<profile name="wearable" />
<ui-application appid="Tizen.NUI.Wearable.Tests" exec="Tizen.NUI.Wearable.Tests.dll" multiple="false" taskmanage="true" splash-screen-display="true" type="dotnet" launch_mode="single">
<icon>Tizen.NUI.Tests.png</icon>