当前位置: 首页>>代码示例>>C#>>正文


C# IObject.GetType方法代码示例

本文整理汇总了C#中IObject.GetType方法的典型用法代码示例。如果您正苦于以下问题:C# IObject.GetType方法的具体用法?C# IObject.GetType怎么用?C# IObject.GetType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IObject的用法示例。


在下文中一共展示了IObject.GetType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: MakeActive

    public void MakeActive(IObject Object)
    {
        activeObject = Object;

        if(! (activeObject is ControlPoint)) {
            if(activeObject != null)
                application.EditProperties(activeObject, activeObject.GetType().Name);
            controlPoints.Clear();
        }

        if(activeObject != null && activeObject.Resizable) {
            controlPoints.Add(new ControlPoint(activeObject,
                                               ControlPoint.AttachPoint.TOP | ControlPoint.AttachPoint.LEFT));
            controlPoints.Add(new ControlPoint(activeObject,
                                               ControlPoint.AttachPoint.TOP));
            controlPoints.Add(new ControlPoint(activeObject,
                                               ControlPoint.AttachPoint.TOP | ControlPoint.AttachPoint.RIGHT));
            controlPoints.Add(new ControlPoint(activeObject,
                                               ControlPoint.AttachPoint.LEFT));
            controlPoints.Add(new ControlPoint(activeObject,
                                               ControlPoint.AttachPoint.RIGHT));
            controlPoints.Add(new ControlPoint(activeObject,
                                               ControlPoint.AttachPoint.BOTTOM | ControlPoint.AttachPoint.LEFT));
            controlPoints.Add(new ControlPoint(activeObject,
                                               ControlPoint.AttachPoint.BOTTOM));
            controlPoints.Add(new ControlPoint(activeObject,
                                               ControlPoint.AttachPoint.BOTTOM | ControlPoint.AttachPoint.RIGHT));
        }
        application.PrintStatus( "ObjectsEditor:MakeActive(" + activeObject + ")" );
    }
开发者ID:BackupTheBerlios,项目名称:supertux-svn,代码行数:30,代码来源:ObjectsEditor.cs

示例2: ObjectHolder

		/// <summary>
		/// Inicjalizuje komponent.
		/// </summary>
		public ObjectHolder(IObject obj)
			: base("ObjectHolder." + (obj != null ? obj.GetType().Name : ""))
		{
			if (obj == null)
			{
				throw new ArgumentNullException("obj");
			}
			this.Object = obj;
		}
开发者ID:jakubfijalkowski,项目名称:Kingdoms-Clash.NET,代码行数:12,代码来源:ObjectHolder.cs

示例3: MakeActive

    public void MakeActive(IObject Object)
    {
        if (activeObject != Object) {		//ignore MakeActive(activeObject)
            activeObject = Object;

            if(! (activeObject is ControlPoint)) {
                if(activeObject != null)
                    application.EditProperties(activeObject, activeObject.GetType().Name);
                controlPoints.Clear();
            }

            if(activeObject != null && activeObject.Resizable) {
                controlPoints.Add(new ControlPoint(activeObject,
                                               ControlPoint.AttachPoint.TOP | ControlPoint.AttachPoint.LEFT));
                controlPoints.Add(new ControlPoint(activeObject,
                                               ControlPoint.AttachPoint.TOP));
                controlPoints.Add(new ControlPoint(activeObject,
                                               ControlPoint.AttachPoint.TOP | ControlPoint.AttachPoint.RIGHT));
                controlPoints.Add(new ControlPoint(activeObject,
                                               ControlPoint.AttachPoint.LEFT));
                controlPoints.Add(new ControlPoint(activeObject,
                                               ControlPoint.AttachPoint.RIGHT));
                controlPoints.Add(new ControlPoint(activeObject,
                                               ControlPoint.AttachPoint.BOTTOM | ControlPoint.AttachPoint.LEFT));
                controlPoints.Add(new ControlPoint(activeObject,
                                               ControlPoint.AttachPoint.BOTTOM));
                controlPoints.Add(new ControlPoint(activeObject,
                                               ControlPoint.AttachPoint.BOTTOM | ControlPoint.AttachPoint.RIGHT));
            }
            LogManager.Log(LogLevel.Debug, "ObjectsEditor:MakeActive(" + activeObject + ")");
        }

        //selectedObjects.Clear();
        //if (Object != null)
        //selectedObjects.Add(Object);
    }
开发者ID:Karkus476,项目名称:supertux-editor,代码行数:36,代码来源:ObjectSelectTool.cs


注:本文中的IObject.GetType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。