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 CircleProgressBarTest4 : TestCaseBase
24 public override string TestName => "CircleProgressBarTest4";
25 public override string TestDescription => "To test Disabled property of CircleProgressBar";
27 public override void Run(Window window)
29 Log.Debug(TestName, "CircleProgressBar run");
30 Conformant conformant = new Conformant(window);
33 var surface = new CircleSurface(conformant);
34 CircleProgressBar pb1 = new CircleProgressBar(conformant, surface)
47 BarColor = Color.Green,
50 BackgroundRadius = 100,
51 BackgroundLineWidth = 15,
52 BackgroundColor = Color.Aqua,
55 conformant.SetContent(pb1);
56 Label lb1 = new Label(window)
58 Text = string.Format("S {0} %", pb1.Value),
61 lb1.Resize(window.ScreenSize.Width, window.ScreenSize.Height);
62 lb1.Move(160, window.ScreenSize.Height / 2 - 40);
65 EcoreMainloop.AddTimer(0.05, () =>
67 if (pb1.Value == pb1.Maximum/2)
69 // Test purpose : set disable
70 pb1.IsEnabled = false;
73 if (pb1.Value == pb1.Maximum)
75 EcoreMainloop.RemoveTimer(pb1);
79 lb1.Text = string.Format("S {0} %", pb1.Value);