本文整理汇总了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 + ")" );
}
示例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;
}
示例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);
}