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 class CircleDateTimeSelectorTest2 : TestCaseBase
24 public override string TestName => "CircleDateTimeSelectorTest2";
25 public override string TestDescription => "To display a date time selector with circle UI";
27 public override void Run(Window window)
29 Conformant conformant = new Conformant(window);
32 Layout layout = new Layout(window);
34 layout.SetTheme("layout", "circle", "datetime");
36 conformant.SetContent(layout);
38 var surface = new CircleSurface(conformant);
40 DateTimeSelector datetime = new CircleDateTimeSelector(conformant, surface)
42 DateTime = DateTime.Now,
43 Style = "timepicker/circle"
46 layout.SetContent(datetime);
48 Button btn = new Button(layout)
54 layout.SetPartContent("elm.swallow.btn", btn);
56 layout.SetPartText("elm.text", "Set time");
58 datetime.DateTimeChanged += (object sender, DateChangedEventArgs e) =>
60 Log.Debug(TestName, "Old DateTime={0}", e.OldDate.ToString());
61 Log.Debug(TestName, "New DateTime={0}", e.NewDate.ToString());
62 Log.Debug(TestName, "Current DateTime={0}", datetime.DateTime.ToString());