summaryrefslogtreecommitdiff
path: root/ElmSharp.Test
diff options
context:
space:
mode:
authorSeungkeun Lee <sngn.lee@samsung.com>2017-05-11 06:48:11 +0000
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>2017-05-11 06:48:11 +0000
commita3f9fe75399092a7add5211bf3799a3a9065129a (patch)
treee976e508e355e6809a818099fed97c219e13da4d /ElmSharp.Test
parent8576b6ea18583b3c90eafb165596f11cac546ce4 (diff)
parent73fd4ee79fa809e0da14a239bc3490b55d37ef23 (diff)
downloadelm-sharp-a3f9fe75399092a7add5211bf3799a3a9065129a.tar.gz
elm-sharp-a3f9fe75399092a7add5211bf3799a3a9065129a.tar.bz2
elm-sharp-a3f9fe75399092a7add5211bf3799a3a9065129a.zip
Merge "[label] add slide speed property & TC" into tizen
Diffstat (limited to 'ElmSharp.Test')
-rwxr-xr-xElmSharp.Test/ElmSharp.Test.csproj5
-rw-r--r--ElmSharp.Test/TC/LabelTest5.cs112
2 files changed, 115 insertions, 2 deletions
diff --git a/ElmSharp.Test/ElmSharp.Test.csproj b/ElmSharp.Test/ElmSharp.Test.csproj
index c03dcef..e2d2cfd 100755
--- a/ElmSharp.Test/ElmSharp.Test.csproj
+++ b/ElmSharp.Test/ElmSharp.Test.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -48,6 +48,7 @@
<Compile Include="TC\GenListTest10.cs" />
<Compile Include="TC\LabelTest4.cs" />
<Compile Include="TC\Log.cs" />
+ <Compile Include="TC\LabelTest5.cs" />
<Compile Include="TC\MultibuttonEntryTest1.cs" />
<Compile Include="TC\DateTimeSelectorTest2.cs" />
<Compile Include="TC\EntryTest2.cs" />
@@ -205,4 +206,4 @@
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
-</Project> \ No newline at end of file
+</Project>
diff --git a/ElmSharp.Test/TC/LabelTest5.cs b/ElmSharp.Test/TC/LabelTest5.cs
new file mode 100644
index 0000000..46294e4
--- /dev/null
+++ b/ElmSharp.Test/TC/LabelTest5.cs
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * 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 System;
+using ElmSharp;
+using System.Collections.Generic;
+
+namespace ElmSharp.Test
+{
+ public class LabelTest5 : TestCaseBase
+ {
+ public override string TestName => "LabelTest5";
+ public override string TestDescription => "To test Slide Animation Speed of Label";
+
+ public override void Run(Window window)
+ {
+ Background bg = new Background(window)
+ {
+ AlignmentX = -1,
+ AlignmentY = -1,
+ WeightX = 1,
+ WeightY = 1,
+ Color = Color.White
+ };
+ bg.Show();
+ window.AddResizeObject(bg);
+
+ Conformant conformant = new Conformant(window);
+ conformant.Show();
+ Box box = new Box(window)
+ {
+ AlignmentX = -1,
+ AlignmentY = -1,
+ WeightX = 1,
+ WeightY = 1
+ };
+ conformant.SetContent(box);
+ box.Show();
+
+ Label label1 = new Label(window)
+ {
+ Text = "Test Slide Animaiton",
+ Color = Color.Black,
+ Style = "slide_long",
+ SlideSpeed = 100,
+ SlideMode = LabelSlideMode.Always,
+ AlignmentX = -1,
+ AlignmentY = -1,
+ WeightX = 1,
+ WeightY = 1
+ };
+ label1.Show();
+ label1.PlaySlide();
+
+ Button btnCurrentSpeed = new Button(window)
+ {
+ Text = "Current Speed : 100",
+ AlignmentX = -1,
+ AlignmentY = -1,
+ WeightX = 1,
+ };
+
+ Button btnSpeedUp = new Button(window)
+ {
+ Text = "Speed + 10",
+ AlignmentX = -1,
+ AlignmentY = -1,
+ WeightX = 1,
+ };
+ btnSpeedUp.Clicked += (s, e) =>
+ {
+ label1.SlideSpeed += 10;
+ btnCurrentSpeed.Text = string.Format("Current Speed : {0}", label1.SlideSpeed);
+ label1.PlaySlide();
+ };
+ Button btnSpeedDown = new Button(window)
+ {
+ Text = "Speed - 10",
+ AlignmentX = -1,
+ AlignmentY = -1,
+ WeightX = 1,
+ };
+ btnSpeedDown.Clicked += (s, e) =>
+ {
+ label1.SlideSpeed -= 10;
+ btnCurrentSpeed.Text = string.Format("Current Speed : {0}", label1.SlideSpeed);
+ label1.PlaySlide();
+ };
+
+ box.PackEnd(label1);
+ box.PackEnd(btnCurrentSpeed);
+ box.PackEnd(btnSpeedUp);
+ box.PackEnd(btnSpeedDown);
+ btnCurrentSpeed.Show();
+ btnSpeedUp.Show();
+ btnSpeedDown.Show();
+ }
+ }
+}