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.
20 namespace ElmSharp.Test
22 class BoxTest1 : TestCaseBase
24 public override string TestName => "BoxTest1";
25 public override string TestDescription => "To test basic operation of Box";
29 public override void Run(Window window)
31 Conformant conformant = new Conformant(window);
33 box = new Box(window);
34 box.BackgroundColor = Color.Orange;
35 conformant.SetContent(box);
38 Button button1 = new Button(window) {
45 Button button2 = new Button(window) {
51 BackgroundColor = new Color(50,100,200,75)
53 Button button3 = new Button(window) {
59 BackgroundColor = Color.Olive
70 button1.Clicked += Button1_Clicked;
71 button2.Clicked += Button1_Clicked;
72 button3.Clicked += Button1_Clicked;
75 private void Button1_Clicked(object sender, EventArgs e)
77 Console.WriteLine("{0} Clicked! - Button's BG Color : {1}, Box's BG Color : {2}", ((Button)sender).Text, ((Button)sender).BackgroundColor, box.BackgroundColor);