コード例 #1
0
ファイル: MainWindow.xaml.cs プロジェクト: rusith/AISA
        private void ConnectionHandler(ViewControllerConnector.ConnectionMethod method, string Title, string URL)
        {
            switch (method)
            {
            case ViewControllerConnector.ConnectionMethod.URL:
                LinkName.Content = Title;  // Set the name of the link
                LinkURL.Content  = URL;    // Set the URL of the link

                var da = new DoubleAnimation(1, TimeSpan.FromSeconds(1));
                da.EasingFunction = new QuinticEase();
                linkContainer.BeginAnimation(OpacityProperty, da);
                break;
            }
        }
コード例 #2
0
        private void ConnectionHandler(ViewControllerConnector.ConnectionMethod method, string[] args)
        {
            switch (method)
            {
            case ViewControllerConnector.ConnectionMethod.URL:
                LinkName.Content = args[0];    // Set the name of the link
                LinkURL.Content  = args[1];    // Set the URL of the link

                var da = new DoubleAnimation(1, TimeSpan.FromSeconds(1));
                da.EasingFunction = new QuinticEase();
                linkContainer.BeginAnimation(OpacityProperty, da);
                break;

            case ViewControllerConnector.ConnectionMethod.Book:
                book1Name.Content   = args[0];
                book1Author.Content = args[1];
                book2Name.Content   = args[2];
                book2Author.Content = args[3];
                book3Name.Content   = args[4];
                book3Author.Content = args[5];

                //Set the images
                book1Image.Source = new BitmapImage(new Uri(args[6]));
                book2Image.Source = new BitmapImage(new Uri(args[7]));
                book3Image.Source = new BitmapImage(new Uri(args[8]));

                //Set the links to the book stores
                book1link = args[9];
                book2link = args[10];
                book3link = args[11];

                //Animate the 3 books
                var da2 = new DoubleAnimation(1, TimeSpan.FromSeconds(1));
                da2.EasingFunction = new QuinticEase();

                book1.BeginAnimation(OpacityProperty, da2);
                da2.BeginTime = TimeSpan.FromSeconds(1);
                book2.BeginAnimation(OpacityProperty, da2);
                da2.BeginTime = TimeSpan.FromSeconds(2);
                book3.BeginAnimation(OpacityProperty, da2);

                break;
            }
        }