public FadeAnimation(MainWindow window, double to, double duration, Action onFadeEnded = null) { To = to; Duration = new Duration(TimeSpan.FromSeconds(duration)); if (onFadeEnded != null) { Completed += (s, e) => onFadeEnded(); } }
private void OnStartup(object sender, StartupEventArgs e) { MainWindow window = null; if ( e.Args.Length == 0 ) { window = new MainWindow(); } else { var adventureFilePath = e.Args[0]; window = new MainWindow(adventureFilePath); } window.Show(); }