2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using ElmSharp.Wearable;
20 namespace ElmSharp.Test.TC
22 public class CircleScrollerTest2 : TestCaseBase
24 public override string TestName => "CircleScrollerTest2";
25 public override string TestDescription => "To test basic operation of CircleScroller";
27 public override void Run(Window window)
29 Layout layout = new Layout(window);
32 layout.Resize(360, 360);
34 CircleScroller circleScroller = new CircleScroller(layout)
40 VerticalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Invisible,
41 HorizontalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Auto,
43 circleScroller.Show();
44 circleScroller.Move(0, 0);
45 circleScroller.Resize(360, 360);
46 circleScroller.Lower();
48 Box box = new Box(window)
57 circleScroller.SetContent(box);
59 var rnd = new Random();
60 for (int i = 0; i < 10; i++)
62 int r = rnd.Next(255);
63 int g = rnd.Next(255);
64 int b = rnd.Next(255);
65 Color color = Color.FromRgb(r, g, b);
66 Rectangle colorBox = new Rectangle(window)
73 MinimumWidth = window.ScreenSize.Width,
76 box.PackEnd(colorBox);
78 circleScroller.Scrolled += (s, e) => Log.Debug(TestName, "Horizental Circle Scroll Scrolled");