summaryrefslogtreecommitdiff
path: root/ElmSharp.Wearable.Test/TC/CircleGenListTest2.cs
diff options
context:
space:
mode:
Diffstat (limited to 'ElmSharp.Wearable.Test/TC/CircleGenListTest2.cs')
-rw-r--r--ElmSharp.Wearable.Test/TC/CircleGenListTest2.cs70
1 files changed, 70 insertions, 0 deletions
diff --git a/ElmSharp.Wearable.Test/TC/CircleGenListTest2.cs b/ElmSharp.Wearable.Test/TC/CircleGenListTest2.cs
new file mode 100644
index 0000000..ff1e9fd
--- /dev/null
+++ b/ElmSharp.Wearable.Test/TC/CircleGenListTest2.cs
@@ -0,0 +1,70 @@
+/*
+ * 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.Wearable;
+
+namespace ElmSharp.Test.TC
+{
+ class CircleGenListTest2 : TestCaseBase
+ {
+ public override string TestName => "CircleGenListTest2";
+ public override string TestDescription => "To display a genlist applied a circle UI on a layout";
+
+ public override void Run(Window window)
+ {
+ var layout = new Layout(window);
+ layout.Show();
+
+ layout.Move(0, 0);
+ layout.Resize(360, 360);
+
+ var list = new CircleGenList(layout)
+ {
+ Homogeneous = true,
+ VerticalScrollBackgroundRadius = 165,
+ VerticalScrollBarRadius = 165,
+ VerticalScrollBackgroundLineWidth = 30,
+ VerticalScrollBarLineWidth = 30,
+ };
+ list.Show();
+
+ list.Move(0, 0);
+ list.Resize(360, 360);
+ list.Lower();
+
+
+ GenItemClass defaultClass = new GenItemClass("default")
+ {
+ GetTextHandler = (obj, part) =>
+ {
+ return string.Format("{0} - {1}",(string)obj, part);
+ }
+ };
+
+ for (int i = 0; i < 100; i++)
+ {
+ list.Append(defaultClass, string.Format("{0} Item", i));
+ }
+ list.ItemSelected += List_ItemSelected; ;
+ }
+
+ private void List_ItemSelected(object sender, GenListItemEventArgs e)
+ {
+ Log.Debug(TestName, "{0} Item was selected", (string)(e.Item.Data));
+ }
+ }
+}