public void Execute() { if (CodeToExcute == null) { return; } defaultSplashScreen = new WaitDialog() { WindowStartupLocation = System.Windows.WindowStartupLocation.CenterOwner }; CodeToExcute.progressDisplayHelper = defaultSplashScreen; var task = new Task(() => { var res = CodeToExcute.Execute(); closeSplash(); if (AsyncCallBack != null) { AsyncCallBack(res); } }); task.Start(); defaultSplashScreen.ShowDialog(); }
public void Execute() { if (CodeToExcute == null) { return; } defaultSplashScreen = new SplashScreen() { StartPosition = FormStartPosition.CenterParent }; CodeToExcute.progressDisplayHelper = defaultSplashScreen; var task = new Task(() => { var res = CodeToExcute.Execute(); closeSplash(); if (AsyncCallBack != null) { AsyncCallBack(res); } }); task.Start(); defaultSplashScreen.ShowDialog(); }