|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using AGE_Engine3D;
namespace Test01_Triangles
{
public partial class TestForm : Form
{
private double TimerInterval = 16;
private System.Timers.Timer RenderTimer = null;
public BaseSimulation TheSimulation
{
set { this.openGLControl1.LoadSimulation(value); }
}
public TestForm()
{
InitializeComponent();
}
private void TestForm_Load(object sender, EventArgs e)
{
RenderTimer = new System.Timers.Timer(this.TimerInterval);
RenderTimer.Elapsed += new System.Timers.ElapsedEventHandler(RenderTimer_Elapsed);
RenderTimer.Start();
}
void RenderTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
this.openGLControl1.Invalidate();
}
private void TestForm_Activated(object sender, EventArgs e)
{
this.openGLControl1.Activated();
}
private void TestForm_Deactivate(object sender, EventArgs e)
{
this.openGLControl1.Deactivate();
}
}
}
|
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.
I am a licensed Electrical Engineer at Lea+Elliott, Inc. We specialize in the planning, procurement and implementation of transportation systems, with special emphasis on automated and emerging technologies.