Click here to Skip to main content
15,896,269 members
Articles / Web Development / ASP.NET

Genesis Smart Client v2.0 - Ruby - User Experience Platform

Rate me:
Please Sign up or sign in to vote.
4.50/5 (6 votes)
7 Jun 2010Ms-PL12 min read 25.3K   353   12  
This article introduces The Genesis Smart Client Framework v2.0 (Project Ruby). It focusses on the user interface component, dubbed the User Experience Platform (UXP), developed using PRISM for WPF and Silverlight.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Threading;
using System.Windows.Media.Animation;

namespace BlueMarble.Genesis.Infrastructure.Background.Default
{
    /// <summary>
    /// Interaction logic for InformationAmbience.xaml
    /// </summary>
    public partial class InformationAmbience : UserControl
    {
        protected Random random;
        protected DispatcherTimer timer;

        public InformationAmbience()
        {
            InitializeComponent();

            Storyboard animation = this.Resources["MainTitleStoryBoard"] as Storyboard;

            animation.Begin();

            random = new Random();
            timer = new DispatcherTimer();

            timer.Interval = new TimeSpan(0, 0, 30);
            timer.Tick += new EventHandler(timer_Tick);

            timer.Start();
        }

        void timer_Tick(object sender, EventArgs e)
        {
            timer.Stop();

            int function = random.Next(2);

            switch (function)
            {
                case 0:
                    Storyboard animation = this.Resources["BasicInformationStoryBoard"] as Storyboard;

                    animation.Begin();
                    break;
                case 1:
                    break;
                case 2:
                    break;
                default:
                    break;
            }

            timer.Interval = new TimeSpan(0, random.Next(3), 0);
            timer.Start();
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)


Written By
We Fix Code
South Africa South Africa
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions