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


C# AttachmentPoint类代码示例

本文整理汇总了C#中AttachmentPoint的典型用法代码示例。如果您正苦于以下问题:C# AttachmentPoint类的具体用法?C# AttachmentPoint怎么用?C# AttachmentPoint使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: MyText

 public MyText(Point3d pt3, string cont, double th, Database db, AttachmentPoint ap)
 {
     this.SetDatabaseDefaults();
     this.Location = pt3;
     this.Contents = cont;
     this.TextStyleId = db.Textstyle;
     this.TextHeight = th;
     this.Attachment = ap;
 }
开发者ID:koryun08,项目名称:AutoCAD-CSharp-plug-in1,代码行数:9,代码来源:TypeViewerForm.xaml.cs

示例2: Attachment

 public Attachment(AttachmentPoint attachmentPoint, PixelFormat pixelFormat, PixelInternalFormat pixelInternalFormat, PixelType pixelType, int index = 0, bool mipmaps = false)
 {
     AttachmentPoint = attachmentPoint;
     PixelFormat = pixelFormat;
     PixelInternalFormat = pixelInternalFormat;
     PixelType = pixelType;
     Index = index;
     MipMaps = mipmaps;
 }
开发者ID:johang88,项目名称:triton,代码行数:9,代码来源:Definition.cs

示例3: MText

 public static MText MText(Point3d pt3, string cont, double th, Database db, AttachmentPoint ap)
 {
     MText mt = new MText();
     mt.SetDatabaseDefaults();
     mt.Location = pt3;
     mt.Contents = cont;
     mt.TextStyleId = db.Textstyle;
     mt.TextHeight = th;
     mt.Attachment = ap;
     return mt;
 }
开发者ID:koryun08,项目名称:AutoCAD-CSharp-plug-in1,代码行数:11,代码来源:Service.cs

示例4: GetInternalReports

 public ReportList GetInternalReports(AttachmentPoint point, Visibility visibility)
 {
     List<Report> reports = new List<Report>();
     foreach (Report report in Reports)
     {
         if (!report.HasFlag(Flag.Internal)) continue;
         if (report.AttachmentPoint != point) continue;
         bool visible = report.Visibility == visibility;
         visible = visible || Visibility.All == report.Visibility;
         if (!visible) continue;
         reports.Add(report);
     }
     return reports;
 }
开发者ID:aelhadi,项目名称:opencbs,代码行数:14,代码来源:ReportService.cs

示例5: InitPrintButton

        private void InitPrintButton(AttachmentPoint attachmentPoint, PrintButton button)
        {
            button.AttachmentPoint = attachmentPoint;
            Visibility visibility;
            switch (_oClientType)
            {
                case OClientTypes.Person:
                    visibility = Visibility.Individual;
                    break;

                case OClientTypes.Group:
                    visibility = Visibility.Group;
                    break;

                case OClientTypes.Corporate:
                    visibility = Visibility.Corporate;
                    break;

                default:
                    visibility = Visibility.All;
                    break;
            }
            button.Visibility = visibility;

            button.ReportInitializer =
                report =>
                {
                    report.SetParamValue("user_id", User.CurrentUser.Id);
                    if (_credit != null) report.SetParamValue("contract_id", _credit.Id);
                    if (_saving != null) report.SetParamValue("saving_id", _saving.Id);
                    if (_guarantee != null) report.SetParamValue("guarantee_id", _guarantee.Id);
                };
            button.LoadReports();

            //from extension
            foreach (var item in PrintButtonContextMenuStrips)
            {
                var menuItems = item.GetContextMenuStrip(_client, _credit, _guarantee, _saving, attachmentPoint.ToString());
                if (menuItems == null) continue;

                foreach (var menuItem in menuItems)
                {
                    button.Menu.Items.Add(menuItem);
                }
            }
        }
开发者ID:fdrgnmx,项目名称:opencbs,代码行数:46,代码来源:ClientForm.cs

示例6: AttachmentAt

 public InventoryItem AttachmentAt(AttachmentPoint point)
 {
     lock (attachments)
     {
         foreach (KeyValuePair<UUID, AttachmentInfo> att in attachments)
         {
             if (att.Value.Point == point)
             {
                 return att.Value.Item;
             }
         }
     }
     return null;
 }
开发者ID:robincornelius,项目名称:radegast,代码行数:14,代码来源:InventoryConsole.cs

示例7: Attach

 /// <summary>
 /// Attach an item to our agent specifying attachment details
 /// </summary>
 /// <param name="itemID">The <seealso cref="OpenMetaverse.UUID"/> of the item to attach</param>
 /// <param name="ownerID">The <seealso cref="OpenMetaverse.UUID"/> attachments owner</param>
 /// <param name="name">The name of the attachment</param>
 /// <param name="description">The description of the attahment</param>
 /// <param name="perms">The <seealso cref="OpenMetaverse.Permissions"/> to apply when attached</param>
 /// <param name="itemFlags">The <seealso cref="OpenMetaverse.InventoryItemFlags"/> of the attachment</param>
 /// <param name="attachPoint">The <seealso cref="OpenMetaverse.AttachmentPoint"/> on the agent
 /// to attach the item to</param>
 public void Attach(UUID itemID, UUID ownerID, string name, string description,
     Permissions perms, uint itemFlags, AttachmentPoint attachPoint)
 {
     Attach(itemID, ownerID, name, description, perms, itemFlags, attachPoint, true);
 }
开发者ID:CCIR,项目名称:libopenmetaverse,代码行数:16,代码来源:AppearanceManager.cs

示例8: Unattach

    public void Unattach(AttachmentPoint parentJoint, AttachmentPoint childJoint)
    {
        // First remove all children of limb from skeleton...
        foreach (RobotComponent limb in childJoint.owner.getDirectChildren())
        {
            childJoint.owner.Unattach(limb.parentAttachmentPoint, limb.parentAttachmentPoint.child);
        }

        AttachmentSlot slot = parentJoint.slot;
        Bone bone = Skeleton.GetBoneForSlot(slot);

        // Unparent from lower joint bone if it exists (for limbs)
        if (bone && bone.LowerJoint)
        {
            bone = bone.LowerJoint;
        }

        AttachmentType attachmentType = childJoint.owner.parentAttachmentPoint.attachmentType;

        RobotComponent child = childJoint.owner;
        child.Skeleton = null;

        if (LevelMusic.Instance)
        {
            LevelMusic.Instance.DetachLimb(childJoint.owner.limbType, childJoint.owner.Slot);
        }

        parentJoint.child = null;
        childJoint.parent = null;
        childJoint.owner.parentComponent = null;
        childJoint.owner.parentAttachmentPoint= null;

        if (parentJoint.connectsGround)
        {
            groundConnections.Remove(childJoint.owner);
        }

        parentJoint.childTransform = parentJoint.transform;

        // parent child to null
        bone.Detach(child.transform);
        child.transform.parent = null;
        child.parentComponent = null;
        child.Skeleton = null;

        // Unparent all child joints from bones
        foreach (AttachmentPoint joint in childJoint.owner.allJoints)
        {
            Bone jointBone = Skeleton.GetBoneForSlot(joint.slot);
            jointBone.Detach(joint.transform);
            joint.transform.parent = joint.owner.transform;
        }

        child.transform.localScale = Vector3.one;

        childJoint.owner.OnRemove();

        OnLimbRemoved(childJoint.owner, slot, attachmentType);

        // stop listening to childs' add/removeArm event
        childJoint.owner.LimbAdded -= OnLimbAdded;
        childJoint.owner.LimbRemoved -= OnLimbRemoved;

        // Restore rigid body to unattached childJoint part
        childJoint.owner.ResetPhysics();
    }
开发者ID:stjahns,项目名称:INTD450,代码行数:66,代码来源:RobotComponent.cs

示例9: AttachToLevelObject

    public void AttachToLevelObject(AttachmentPoint levelAttachment)
    {
        joint = PlayerBehavior.Player.gameObject.AddComponent<DistanceJoint2D>();
        joint.anchor = transform.position - PlayerBehavior.Player.transform.position;
        joint.connectedBody = levelAttachment.collider2D.attachedRigidbody;
        joint.connectedAnchor = levelAttachment.transform.position
            - levelAttachment.collider2D.attachedRigidbody.transform.position;

        child = levelAttachment;
    }
开发者ID:stjahns,项目名称:INTD450,代码行数:10,代码来源:AttachmentPoint.cs

示例10: Attach

 /// <summary>
 /// Attach an item to an avatar at a specific attach point
 /// </summary>
 /// <param name="item">A <seealso cref="OpenMetaverse.InventoryItem"/> to attach</param>
 /// <param name="attachPoint">the <seealso cref="OpenMetaverse.AttachmentPoint"/> on the avatar 
 /// to attach the item to</param>
 public void Attach(InventoryItem item, AttachmentPoint attachPoint)
 {
     Attach(item.Guid, item.OwnerID, item.Name, item.Description, item.Permissions, item.Flags, 
         attachPoint);
 }
开发者ID:RavenB,项目名称:gridsearch,代码行数:11,代码来源:AppearanceManager.cs

示例11: SetSelectedParent

    void SetSelectedParent(AttachmentPoint point)
    {
        if (selectedParentJoint != point)
        {
            if (selectedParentJoint != null)
            {
                selectedParentJoint.selected = false;

                if (selectedParentJoint.owner != null)
                {
                    selectedParentJoint.owner.OnDestroy -= OnParentDestroyed;
                }
            }

            if (point != null)
            {
                point.selected = true;
                if (point.owner != null)
                {
                    point.owner.OnDestroy += OnParentDestroyed;
                }
                AudioSource.PlayClipAtPoint(jointHoverClip, transform.position);
            }
        }

        selectedParentJoint = point;
    }
开发者ID:stjahns,项目名称:INTD450,代码行数:27,代码来源:PlayerAttachmentController.cs

示例12: SetSelectedChild

    void SetSelectedChild(AttachmentPoint point)
    {
        if (selectedChildJoint != point)
        {
            if (selectedChildJoint != null)
            {
                selectedChildJoint.selected = false;

                if (selectedChildJoint.owner != null)
                {
                    selectedChildJoint.owner.OnDestroy -= OnChildDestroyed;
                    selectedChildJoint.owner.GetComponent<PulsingSprite>().Disable();
                }
            }

            if (point != null)
            {
                point.selected = true;
                if (point.owner != null)
                {
                    point.owner.OnDestroy += OnChildDestroyed;
                    point.owner.GetComponent<PulsingSprite>().Enable();
                }
                AudioSource.PlayClipAtPoint(jointHoverClip, transform.position);
            }
        }

        selectedChildJoint = point;
    }
开发者ID:stjahns,项目名称:INTD450,代码行数:29,代码来源:PlayerAttachmentController.cs

示例13: Attach

 /// <summary>
 /// Attach an inventory item
 /// </summary>
 /// <param name="item">Item to be attached</param>
 /// <param name="point">Attachment point</param>
 /// <param name="replace">Replace existing attachment at that point first?</param>
 public void Attach(InventoryItem item, AttachmentPoint point, bool replace)
 {
     Client.Appearance.Attach(item, point, replace);
     AddLink(item);
 }
开发者ID:Nuriat,项目名称:radegast,代码行数:11,代码来源:CurrentOutfitFolder.cs

示例14: Attach

    public void Attach(AttachmentPoint parentJoint, AttachmentPoint childJoint)
    {
        AttachmentSlot slot = parentJoint.slot;
        Bone bone = Skeleton.GetBoneForSlot(slot);

        RobotComponent child = childJoint.owner;

        // Parent to lower joint bone if it exists (for limbs)
        if (bone.LowerJoint)
        {
            bone = bone.LowerJoint;
        }

        child.currentBone = bone;
        child.Skeleton = Skeleton;

        // parent child to player object
        child.transform.parent = transform.rootParent();
        // attach child to bone
        bone.Attach(child.transform);

        if (childJoint.rigidbody2D)
        {
            // If we don't set body to kinematic, it will get will physics update that will
            // move component after attaching...
            child.rigidbody2D.isKinematic = true;
        }

        if (childJoint.owner.rigidbody2D)
        {
            Destroy(childJoint.owner.rigidbody2D);
        }

        // Parent all child joints to the bones themselves (for torso)
        foreach (AttachmentPoint joint in childJoint.owner.allJoints)
        {
            Bone jointBone = Skeleton.GetBoneForSlot(joint.slot);
            joint.bone = jointBone;
            joint.transform.parent = transform.rootParent();
            jointBone.Attach(joint.transform);
        }

        parentJoint.child = childJoint;
        childJoint.parent = parentJoint;

        childJoint.owner.parentComponent = parentJoint.owner;
        childJoint.owner.parentAttachmentPoint = parentJoint;

        if (parentJoint.connectsGround)
        {
            groundConnections.Add(childJoint.owner);
        }

        // listen to childs' add/removelimb event
        childJoint.owner.LimbAdded += OnLimbAdded;
        childJoint.owner.LimbRemoved += OnLimbRemoved;

        foreach (RobotComponent limb in child.getAllChildren())
        {
            AttachmentType type = limb.parentAttachmentPoint.attachmentType;

            if (LevelMusic.Instance)
            {
                LevelMusic.Instance.AttachLimb(limb.limbType, limb.Slot);
            }

            OnLimbAdded(limb, slot, type);
        }

        parentJoint.childTransform = childJoint.transform;

        child.OnAttach();

        child.ResetColliders();

        getRootComponent().ResetSpriteOrders();
        getRootComponent().ResetPhysics();
    }
开发者ID:stjahns,项目名称:INTD450,代码行数:78,代码来源:RobotComponent.cs

示例15: SetMText

 /// <summary>
 /// Установка параметров MText.
 /// </summary>
 /// <param name="mt">Объект MText</param>
 /// <param name="pt3">Местоположение</param>
 /// <param name="cont">Содержимое</param>
 /// <param name="th">Высота текста</param>
 /// <param name="db">База данных документа</param>
 /// <param name="ap">Точка выравнивания</param>
 /// <param name="ang">Угол поворота текста (в градусах)</param>
 public static void SetMText(MText mt, Point3d pt3, string cont, double th, Database db, AttachmentPoint ap, double ang)
 {
     mt.SetDatabaseDefaults();
     mt.Location = pt3;
     mt.Contents = cont;
     mt.TextStyleId = db.Textstyle;
     mt.TextHeight = th;
     mt.Attachment = ap;
     mt.Rotation = ang * Math.PI / 180;
 }
开发者ID:koryun08,项目名称:AutoCAD-CSharp-plug-in1,代码行数:20,代码来源:Service.cs


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