Add tpk packaging for ElmSharp.Test
[platform/core/csapi/tizenfx.git] / test / ElmSharp.Test / TC / ImageTest1.cs
1 using System;
2 using System.IO;
3 using ElmSharp;
4 using System.Collections.Generic;
5
6 namespace ElmSharp.Test
7 {
8     public class ImageTest1 : TestCaseBase
9     {
10         public override string TestName => "ImageTest1";
11         public override string TestDescription => "To test basic operation of Image";
12
13         public override void Run(Window window)
14         {
15             Image image = new Image(window)
16             {
17                 IsFixedAspect = false
18             };
19             image.Load(Path.Combine(TestRunner.ResourceDir,  "picture.png"));
20             image.Clicked += (e, o) =>
21             {
22                 Console.WriteLine("Image has been clicked. (IsFixedAspect = {0}", image.IsFixedAspect);
23                 image.IsFixedAspect = image.IsFixedAspect == true?false:true;
24             };
25
26             image.Show();
27             image.Resize(500, 500);
28             image.Move(100,100);
29         }
30     }
31 }