Mercurial > pub > ImplabNet
annotate Implab.Fx.Test/OverlayTest.cs @ 207:558f34b2fb50 v2
added Safe.DispatchEvent() a legacy equivalent for '?.Invoke()'
added Safe.Dispose(IEnumerable)
added PromiseExtensions.CancellationPoint to add a cancellation point to the chain of promises
added IPromise<T> PromiseExtensions.Then<T>(this IPromise<T> that, Action<T> success) overloads
added PromiseExtensions.Error() overloads to handle a error or(and) a cancellation
author | cin |
---|---|
date | Wed, 09 Nov 2016 12:03:22 +0300 |
parents | 037df317f126 |
children |
rev | line source |
---|---|
77 | 1 using System.Windows.Forms; |
2 using Implab.Fx.Test.Sample; | |
3 using Implab.Fx; | |
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
f2559580b481
implemented overlay helpers and some animation heplers improvments
cin
parents:
diff
changeset
|
13 using Microsoft.VisualStudio.TestTools.UnitTesting; |
77 | 14 |
15 #endif | |
5
f2559580b481
implemented overlay helpers and some animation heplers improvments
cin
parents:
diff
changeset
|
16 |
f2559580b481
implemented overlay helpers and some animation heplers improvments
cin
parents:
diff
changeset
|
17 namespace Implab.Fx.Test |
f2559580b481
implemented overlay helpers and some animation heplers improvments
cin
parents:
diff
changeset
|
18 { |
f2559580b481
implemented overlay helpers and some animation heplers improvments
cin
parents:
diff
changeset
|
19 [TestClass] |
f2559580b481
implemented overlay helpers and some animation heplers improvments
cin
parents:
diff
changeset
|
20 public class OverlayTest |
f2559580b481
implemented overlay helpers and some animation heplers improvments
cin
parents:
diff
changeset
|
21 { |
f2559580b481
implemented overlay helpers and some animation heplers improvments
cin
parents:
diff
changeset
|
22 [TestMethod] |
f2559580b481
implemented overlay helpers and some animation heplers improvments
cin
parents:
diff
changeset
|
23 public void TestMethod1() |
f2559580b481
implemented overlay helpers and some animation heplers improvments
cin
parents:
diff
changeset
|
24 { |
f2559580b481
implemented overlay helpers and some animation heplers improvments
cin
parents:
diff
changeset
|
25 var mainForm = new MainForm(); |
f2559580b481
implemented overlay helpers and some animation heplers improvments
cin
parents:
diff
changeset
|
26 |
f2559580b481
implemented overlay helpers and some animation heplers improvments
cin
parents:
diff
changeset
|
27 mainForm.ButtonEvent += (sender, args) => |
f2559580b481
implemented overlay helpers and some animation heplers improvments
cin
parents:
diff
changeset
|
28 { |
f2559580b481
implemented overlay helpers and some animation heplers improvments
cin
parents:
diff
changeset
|
29 var overlay = new OverlayForm(); |
155 | 30 mainForm.OverlayFadeIn(overlay).On( |
77 | 31 o => o.ButtonEvent += (s2, args2) => o.CloseFadeOut() |
5
f2559580b481
implemented overlay helpers and some animation heplers improvments
cin
parents:
diff
changeset
|
32 ); |
f2559580b481
implemented overlay helpers and some animation heplers improvments
cin
parents:
diff
changeset
|
33 }; |
f2559580b481
implemented overlay helpers and some animation heplers improvments
cin
parents:
diff
changeset
|
34 |
f2559580b481
implemented overlay helpers and some animation heplers improvments
cin
parents:
diff
changeset
|
35 Application.Run(mainForm); |
f2559580b481
implemented overlay helpers and some animation heplers improvments
cin
parents:
diff
changeset
|
36 } |
f2559580b481
implemented overlay helpers and some animation heplers improvments
cin
parents:
diff
changeset
|
37 } |
f2559580b481
implemented overlay helpers and some animation heplers improvments
cin
parents:
diff
changeset
|
38 } |