Merge "[Telephony] Sample App implementation."
[platform/core/csapi/tizenfx.git] / test / ElmSharp.Test / TC / ScreenInformationTest.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 namespace ElmSharp.Test
18 {
19     public class ScreenInformationTest : TestCaseBase
20     {
21         public override string TestName => "ScreenInformationTest";
22         public override string TestDescription => "To get screen information";
23
24         public override void Run(Window window)
25         {
26             Conformant conformant = new Conformant(window);
27             conformant.Show();
28             Box box = new Box(window);
29             box.Show();
30             conformant.SetContent(box);
31             Label label = new Label(window);
32             label.SetAlignment(-1, 0);
33             label.SetWeight(1, 0);
34             label.Text = string.Format("<span color=#FFFFFF , font_size=50>ScreenSize : {0}x{1}", window.ScreenSize.Width, window.ScreenSize.Height);
35             label.Show();
36             box.PackEnd(label);
37             Label label2 = new Label(window);
38             label2.SetAlignment(-1, 0);
39             label2.SetWeight(1, 0);
40             label2.Text = string.Format("<span color=#FFFFFF , font_size=50>ScreenDPI : xdpi : {0} ydpi : {1}", window.ScreenDpi.X, window.ScreenDpi.Y);
41             label2.Show();
42             box.PackEnd(label2);
43         }        
44     }
45 }