Mercurial > pub > ImplabNet
comparison Implab.Fx/AnimationHelpers.cs @ 106:d4e38929ce36 v2
promises refactoring
author | cin |
---|---|
date | Mon, 10 Nov 2014 18:00:28 +0300 |
parents | 2fad2d1f4b03 |
children |
comparison
equal
deleted
inserted
replaced
105:4d308952fd5e | 106:d4e38929ce36 |
---|---|
40 | 40 |
41 public static IPromise<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 |
46 .Play() | |
47 .DispatchToControl(ctl) | |
48 .Then(frm => { | |
49 frm.Close(); | |
50 return frm; | |
51 }); | |
46 } | 52 } |
47 | 53 |
48 public static IPromise<T> OverlayFadeIn<T>(this Form that, T overlay) where T : Form | 54 public static IPromise<T> OverlayFadeIn<T>(this Form that, T overlay) where T : Form |
49 { | 55 { |
50 if (that == null) | 56 if (that == null) |