Merge "[Telephony] Sample App implementation."
[platform/core/csapi/tizenfx.git] / test / ElmSharp.Test / TC / IconTest1.cs
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 using System;
18 using ElmSharp;
19 using System.Collections.Generic;
20
21 namespace ElmSharp.Test
22 {
23     public class IconTest1 : TestCaseBase
24     {
25         public override string TestName => "IconTest1";
26         public override string TestDescription => "To test basic operation of Icon";
27
28         public override void Run(Window window)
29         {
30             Background bg = new Background(window)
31             {
32                 AlignmentX = -1,
33                 AlignmentY = -1,
34                 WeightX = 1,
35                 WeightY = 1,
36                 Color = Color.White
37             };
38             bg.Show();
39             window.AddResizeObject(bg);
40
41             Conformant conformant = new Conformant(window);
42             conformant.Show();
43             Scroller scroller = new Scroller(window);
44             scroller.Show();
45             conformant.SetContent(scroller);
46             Box box = new Box(window);
47             box.Show();
48             scroller.SetContent(box);
49
50             List<string> iconList = new List<string>{ "home", "close", "apps", "arrow_up", "arrow_down", "arrow_left", "arrow_right", "chat", "clock", "delete", "edit", "refresh", "folder", "file",
51                 "menu/home", "menu/close", "menu/apps", "menu/arrow_up", "menu/arrow_down", "menu/arrow_left", "menu/arrow_right", "menu/chat", "menu/clock", "menu/delete", "menu/edit", "menu/refresh", "menu/folder",
52                 "menu/file", "media_player/forward", "media_player/info", "media_player/next", "media_player/pause", "media_player/play", "media_player/prev", "media_player/rewind", "media_player/stop"};
53
54             foreach (var iconName in iconList)
55             {
56                 Label label = new Label(window)
57                 {
58                     Text = iconName,
59                 };
60                 Icon icon = new Icon(window)
61                 {
62                     IconLookupOrder = IconLookupOrder.ThemeFirst,
63                     StandardIconName = iconName,
64                     AlignmentX = -1,
65                     AlignmentY = -1,
66                     WeightX = 1,
67                     WeightY = 1,
68                     MinimumHeight = 100,
69                     MinimumWidth = 100,
70                 };
71                 icon.Show();
72                 label.Show();
73                 box.PackEnd(icon);
74                 box.PackEnd(label);
75             }
76
77             
78         }
79     }
80 }