• 大小: 25.19MB
    文件类型: .zip
    金币: 2
    下载: 1 次
    发布日期: 2023-07-07
  • 语言: C#
  • 标签: net(opengl)  

资源简介

因为网上实在不好找,又是全英文,我自己整理了一下代码,就手残选 了2分,都可以运行,没有问题了。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Diagnostics;

namespace CSharpGL
{
    //“CSharpGL.IListEditor>”: 特性参数不能使用类型参数
    //[Editor(typeof(IListEditor>) typeof(UITypeEditor))]
    /// 
    /// a list of components who bind to the specified binding object.
    /// 

    /// 
    /// 
    public abstract class ComponentList : IList where TComponent : IBindingobject
    {
        /// 
        ///
        /// 

        public event EventHandler> ItemAdded;

        /// 
        ///
        /// 

        public event EventHandler> ItemRemoved;

        private List list = new List();

        private readonly TBinding bindingobject;

        /// 
        /// a list of components who bind to the specified binding object.
        /// 

        /// ject“>
        public ComponentList(TBinding bindingobject)
        {
            Debug.Assert(bindingobject != null);

            this.bindingobject = bindingobject;
        }

        /// 
        ///
        /// 

        /// 
        /// 
        public int IndexOf(TComponent item)
        {
            return list.IndexOf(item);
        }

        /// 
        ///
        /// 

        /// 
        /// 
        public void Insert(int index TComponent item)
        {
            item.Bindingobject = this.bindingobject;
            list.Insert(index item);

            EventHandler> ItemAdded = this.ItemAdded;
            if (ItemAdded != null)
            { ItemAdded(this new AddComponentEventArgs(item)); }
        }

        /// 
        ///
        /// 

        /// 
        public void RemoveAt(int index)
        {
            TComponent obj = list[index];
            list.RemoveAt(index);
            obj.Bindingobject = default(TBinding);

            EventHandler> ItemRemoved = this.ItemRemoved;
            if (ItemRemoved != null)
            { ItemRemoved(this new RemoveComponentEventArgs(obj)); }
        }

        /// 
        ///
        /// 

        /// 
        /// 
        public TComponent this[int index]
        {
            get
            {
                return list[index];
            }
            set
            {
                list[index] = value;
            }
        }

        /// 
        ///
        /// 

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-08-21 07:59  CSharpGL-master\
     文件        2709  2017-08-21 07:59  CSharpGL-master\.gitattributes
     文件        2233  2017-08-21 07:59  CSharpGL-master\.gitignore
     目录           0  2017-08-21 07:59  CSharpGL-master\CSharpGL.Windows\
     文件        5032  2017-08-21 07:59  CSharpGL-master\CSharpGL.Windows\CSharpGL.Windows.csproj
     目录           0  2017-08-21 07:59  CSharpGL-master\CSharpGL.Windows\GLAPI\
     文件         445  2017-08-21 07:59  CSharpGL-master\CSharpGL.Windows\GLAPI\FontBitmapEntry.cs
     文件        5449  2017-08-21 07:59  CSharpGL-master\CSharpGL.Windows\GLAPI\FontBitmaps.cs
     文件        1825  2017-08-21 07:59  CSharpGL-master\CSharpGL.Windows\GLAPI\WInGL.ExtendedAPI.cs
     文件      154582  2017-08-21 07:59  CSharpGL-master\CSharpGL.Windows\GLAPI\WinGL.BasicAPI.cs
     文件         702  2017-08-21 07:59  CSharpGL-master\CSharpGL.Windows\GLAPI\WinGL.DrawText.cs
     文件      181411  2017-08-21 07:59  CSharpGL-master\CSharpGL.Windows\GLAPI\WinGL.OpenGL32.DLL.cs
     文件       73434  2017-08-21 07:59  CSharpGL-master\CSharpGL.Windows\GLAPI\WinGL.Wrappers.cs
     文件         596  2017-08-21 07:59  CSharpGL-master\CSharpGL.Windows\GLAPI\WinGL.cs
     文件          78  2017-08-21 07:59  CSharpGL-master\CSharpGL.Windows\GLAPI\readme.md
     目录           0  2017-08-21 07:59  CSharpGL-master\CSharpGL.Windows\Properties\
     文件        1338  2017-08-21 07:59  CSharpGL-master\CSharpGL.Windows\Properties\AssemblyInfo.cs
     目录           0  2017-08-21 07:59  CSharpGL-master\CSharpGL.Windows\RenderContexts\
     文件        1047  2017-08-21 07:59  CSharpGL-master\CSharpGL.Windows\RenderContexts\DIBSection.IDisposable.cs
     文件        5326  2017-08-21 07:59  CSharpGL-master\CSharpGL.Windows\RenderContexts\DIBSection.cs
     文件        4444  2017-08-21 07:59  CSharpGL-master\CSharpGL.Windows\RenderContexts\FBORenderContext.cs
     文件        9477  2017-08-21 07:59  CSharpGL-master\CSharpGL.Windows\RenderContexts\HiddenWindowRenderContext.cs
     文件         172  2017-08-21 07:59  CSharpGL-master\CSharpGL.Windows\RenderContexts\readme.md
     目录           0  2017-08-21 07:59  CSharpGL-master\CSharpGL.Windows\Renderers\
     目录           0  2017-08-21 07:59  CSharpGL-master\CSharpGL.Windows\Renderers\ClockRenderer\
     文件       11299  2017-08-21 07:59  CSharpGL-master\CSharpGL.Windows\Renderers\ClockRenderer\Clock.png
     文件        2593  2017-08-21 07:59  CSharpGL-master\CSharpGL.Windows\Renderers\ClockRenderer\ClockCircleRenderer.cs
     文件        2751  2017-08-21 07:59  CSharpGL-master\CSharpGL.Windows\Renderers\ClockRenderer\ClockMarkRenderer.cs
     文件        5374  2017-08-21 07:59  CSharpGL-master\CSharpGL.Windows\Renderers\ClockRenderer\ClockPinRenderer.cs
     文件         557  2017-08-21 07:59  CSharpGL-master\CSharpGL.Windows\Renderers\ClockRenderer\ClockRenderer.cs
     目录           0  2017-08-21 07:59  CSharpGL-master\CSharpGL.Windows\Renderers\Propeller\
............此处省略2175个文件信息

评论

共有 条评论

相关资源