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.
17 namespace ElmSharp.Test
19 public class ScreenInformationTest : TestCaseBase
21 public override string TestName => "ScreenInformationTest";
22 public override string TestDescription => "To get screen information";
24 public override void Run(Window window)
26 Conformant conformant = new Conformant(window);
28 Box box = new Box(window);
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);
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);