comparison Implab.Fx.Test/OverlayTest.cs @ 77:91362ffbecf8 v2

ported tests to mono
author cin
date Thu, 11 Sep 2014 10:56:14 +0400
parents f2559580b481
children 037df317f126
comparison
equal deleted inserted replaced
76:c761fc982e1d 77:91362ffbecf8
1 using System; 1 using System.Windows.Forms;
2 using System.Text; 2 using Implab.Fx.Test.Sample;
3 using System.Collections.Generic; 3 using Implab.Fx;
4 using System.Linq; 4
5 #if MONO
6
7 using NUnit.Framework;
8 using TestClassAttribute = NUnit.Framework.TestFixtureAttribute;
9 using TestMethod = NUnit.Framework.TestAttribute;
10
11 #else
12
5 using Microsoft.VisualStudio.TestTools.UnitTesting; 13 using Microsoft.VisualStudio.TestTools.UnitTesting;
6 using System.Windows.Forms; 14
7 using Implab.Fx.Test.Sample; 15 #endif
8 using System.Drawing;
9 using Implab.Fx;
10 16
11 namespace Implab.Fx.Test 17 namespace Implab.Fx.Test
12 { 18 {
13 [TestClass] 19 [TestClass]
14 public class OverlayTest 20 public class OverlayTest
20 26
21 mainForm.ButtonEvent += (sender, args) => 27 mainForm.ButtonEvent += (sender, args) =>
22 { 28 {
23 var overlay = new OverlayForm(); 29 var overlay = new OverlayForm();
24 mainForm.OverlayFadeIn(overlay).Then( 30 mainForm.OverlayFadeIn(overlay).Then(
25 o => o.ButtonEvent += (s2, args2) => 31 o => o.ButtonEvent += (s2, args2) => o.CloseFadeOut()
26 {
27 o.CloseFadeOut();
28 }
29 ); 32 );
30 }; 33 };
31 34
32 Application.Run(mainForm); 35 Application.Run(mainForm);
33 } 36 }