Ejemplo n.º 1
0
        public MainWindow()
        {
            InitializeComponent();
#if DEBUG
            this.AttachDevTools();
#endif
            var canvas  = this.Get <Canvas>("canvas");
            var foxDraw = new FoxDraw(canvas);
            canvas.Width  = 800;
            canvas.Height = 800;
            Stars stars = new Stars(foxDraw);
            timer          = new DispatcherTimer();
            timer.Interval = new System.TimeSpan(0, 0, 0, 0, 30);
            double i = 0;
            timer.Tick += delegate
            {
                OnTick(ref i, ref foxDraw, stars);
            };
            timer.Start();
        }
Ejemplo n.º 2
0
 public void OnTick(ref double i, ref FoxDraw foxDraw, Stars stars)
 {
     stars.MoveStars();
     i += 0.01;
 }