Esempio n. 1
0
        /// <summary>
        /// Draw Timer tick
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void DrawTimer_Tick(object sender, EventArgs e)
        {
            // If not floating panel and the panel is active and AutoRefresh is OK
            if (this.DockAreas != DockAreas.Float && DockPanel.ActiveDocument == this)
            {
                int elapsed = Environment.TickCount - Time;

                Time = Environment.TickCount;


                // Stop the drawtimer
                DrawTimer.Stop();

                //Animation.Update(TimeSpan.FromMilliseconds(elapsed));

                Animation.Update(new GameTime(TimeSpan.Zero, TimeSpan.Zero, TimeSpan.Zero, TimeSpan.FromMilliseconds(elapsed)));

                GlFramesControl.Invalidate();
                GlTilesControl.Invalidate();
                GlPreviewControl.Invalidate();

                // Restart the draw timer
                DrawTimer.Start();
            }
        }