Mercurial > pub > ImplabNet
comparison Implab.Fx/AnimationHelpers.cs @ 30:2fad2d1f4b03
small refactoring, cleanup.
author | cin |
---|---|
date | Mon, 07 Apr 2014 03:25:57 +0400 |
parents | f2559580b481 |
children | d4e38929ce36 |
comparison
equal
deleted
inserted
replaced
29:768f7deeb55b | 30:2fad2d1f4b03 |
---|---|
36 (ov, nv, el, du) => ov + ((float)el / du) * (nv - ov) | 36 (ov, nv, el, du) => ov + ((float)el / du) * (nv - ov) |
37 ); | 37 ); |
38 return anim; | 38 return anim; |
39 } | 39 } |
40 | 40 |
41 public static Promise<T> CloseFadeOut<T>(this T ctl) where T : Form | 41 public static IPromise<T> CloseFadeOut<T>(this T ctl) where T : Form |
42 { | 42 { |
43 var anim = ctl.AnimateTransparency(0); | 43 var anim = ctl.AnimateTransparency(0); |
44 | 44 |
45 return anim.Play().DispatchToControl(ctl).Then(frm => frm.Close()); | 45 return anim.Play().DispatchToControl(ctl).Then(frm => frm.Close()); |
46 } | 46 } |
47 | 47 |
48 public static Promise<T> OverlayFadeIn<T>(this Form that, T overlay) where T : Form | 48 public static IPromise<T> OverlayFadeIn<T>(this Form that, T overlay) where T : Form |
49 { | 49 { |
50 if (that == null) | 50 if (that == null) |
51 throw new ArgumentNullException("that"); | 51 throw new ArgumentNullException("that"); |
52 if (overlay == null) | 52 if (overlay == null) |
53 throw new ArgumentNullException("overlay"); | 53 throw new ArgumentNullException("overlay"); |