错误 CS0115: “OpenGL_3D.Service1.Dispose(bool)”: 没有找到适合的方法来重写
如题,用第三方软件CsGL调用OpenGL时出现问题,还是系统自动生成窗口的代码出现问题,什么原因?
以下是源代码
using System;
using System.Windows.Forms;
using System.Drawing;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CsGL.OpenGL;
using System.Drawing.Imaging;
namespace OpenGL_3D
{
    public class OpenGLBase : OpenGLControl//将新类OpenGLBase继承与OpenGLControl类
     {
         Timer Timer_GLupdate = new Timer();//窗口重绘计时器(用于定时刷新OpenGL窗口)
         public OpenGLBase()//初始化计时器的Tick事件的回调函数
         {
             this.Timer_GLupdate.Tick += new EventHandler(Timer_GLupdate_Tick);
             this.Timer_GLupdate.Interval = 10;
             this.Timer_GLupdate.Start();
             this.KeyDown += new KeyEventHandler(OpenGLBase_KeyDown);//按键回调
         }          
         private void Timer_GLupdata_Tick(object sender, EventArgs e)//创建屏幕刷新计时器回调函数,每10ms刷新一次OpenGL窗口
         {
             this.Invalidate();
         }
        /***************************
        重写OpenGLControl类的几个函数
        ********************************/
         #region 窗体重绘
         /// <summary>
         /// 视口改变大小时重新设置视口和绘图
         /// </summary>
         /// <param name="e"></param>
         protected override void OnSizeChanged(EventArgs e)//窗口大小改变时发生
         {
             GL.glViewport(0, 0, this.Bounds.Width, this.Bounds.Height);
             GL.glMatrixMode(GL.GL_PROJECTION);
             GL.glLoadIdentity();
             GL.gluPerspective(40.0f, (float)this.Bounds.Width / (float)this.Bounds.Height, 0.1f, 500.0f);
             GL.glMatrixMode(GL.GL_MODELVIEW);
         }
         #endregion
         #region OpenGL初始化场景
         protected override void InitGLContext()//OpenGl初始化场景
         {
             base.InitGLContext();
             GL.glMatrixMode(GL.GL_PROJECTION);//选择投影矩阵
             GL.glLoadIdentity();//重设投影矩阵
             GL.gluPerspective(40.0, ((double)(this.Width) / (double)(this.Height)), 1.0, 1000.0);//调整视口大小
             GL.glMatrixMode(GL.GL_MODELVIEW);//选择模型观察矩阵
             GL.glLoadIdentity();//重置模型观察矩阵
             GL.glShadeModel(GL.GL_SMOOTH);						// 启用阴影平滑
         }
         #endregion
         public override void glDraw()
         {
             GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);			// 清除屏幕及深度缓存
             GL.glutWireCube(10.0f);
             GL.glLoadIdentity();                                                    //重置当前模型视图矩阵
             GL.glFlush();															// Flush The GL Pipeline
         }
         protected override void Dispose(bool disposing)
         {
             base.Dispose(disposing);
         }
     }
}
--------------------------------------------------------
D:\Program Files\Microsoft Visual Studio 9.0\VC\include\GL\OpenGL_3D\OpenGL_3D\OpenGLBase.Designer.cs(14,33): 错误 CS0115: “OpenGL_3D.Service1.Dispose(bool)”: 没有找到适合的方法来重写
以下是系统自动生成的代码:
namespace OpenGL_3D
{
     partial class Service1
     {
         /// <summary>  
         /// 必需的设计器变量。
         /// </summary>
         private System.ComponentModel.IContainer components = null;
         /// <summary>
         /// 清理所有正在使用的资源。