コード例 #1
0
 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();
     }
 }
コード例 #2
0
ファイル: App.xaml.cs プロジェクト: JakobKallin/WPF-Ambience
        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();
        }