コード例 #1
0
    public BC_Comment CreateComment()
    {
        global::System.IntPtr cPtr = BIMcollab_IssuePINVOKE.BC_Issue_CreateComment(swigCPtr);
        BC_Comment            ret  = (cPtr == global::System.IntPtr.Zero) ? null : new BC_Comment(cPtr, false);

        if (BIMcollab_IssuePINVOKE.SWIGPendingException.Pending)
        {
            throw BIMcollab_IssuePINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
コード例 #2
0
    public BC_Comment GetCommentByIndex(uint idx)
    {
        global::System.IntPtr cPtr = BIMcollab_IssuePINVOKE.BC_Issue_GetCommentByIndex(swigCPtr, idx);
        BC_Comment            ret  = (cPtr == global::System.IntPtr.Zero) ? null : new BC_Comment(cPtr, false);

        if (BIMcollab_IssuePINVOKE.SWIGPendingException.Pending)
        {
            throw BIMcollab_IssuePINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
コード例 #3
0
        public void CreateDefaultComment()
        {
            if (!this.issue.IsOperationAllowed(BC_Operation.operationIssueCreateComment))
            {
                return;
            }

            BC_Comment newComment = this.issue.CreateComment();

            newComment.SetText("<no comment>");
        }
コード例 #4
0
        private BC_ViewPoint GetViewPoint()
        {
            BC_ViewPoint viewpoint = null;

            uint numberOfComments = this.issue.GetNumberOfComments();

            if (numberOfComments == 0)
            {
                viewpoint = this.GetDefaultViewPoint();
            }
            else
            {
                BC_Comment comment = this.issue.GetCommentByIndex(0);
                viewpoint = comment.GetViewPoint();
            }

            return(viewpoint);
        }
コード例 #5
0
        private ImageSource GetIssueSnapshot()
        {
            var  image            = new Image();
            uint numberOfComments = this.issue.GetNumberOfComments();

            if (numberOfComments == 0)
            {
                return(image.Source);
            }

            uint       latestCommentIndex = numberOfComments - 1;
            BC_Comment comment            = this.issue.GetCommentByIndex(latestCommentIndex);

            if (comment.HasViewPoint())
            {
                BC_ViewPoint viewPoint = comment.GetViewPoint();

                if (viewPoint.HasSnapShot())
                {
                    BC_SnapShot snapShot = viewPoint.GetSnapShot();

                    uint imageSize = snapShot.GetImageSize();

                    if (snapShot.HasImage())
                    {
                        var imageArray = new byte[(int)imageSize];
                        snapShot.GetImage(imageArray, imageSize);

                        using (var stream = new MemoryStream(imageArray))
                        {
                            image.Source = BitmapFrame.Create(stream, BitmapCreateOptions.None, BitmapCacheOption.OnLoad);
                        }
                    }
                }
            }

            return(image.Source);
        }
コード例 #6
0
 public Comment(BC_Comment comment)
 {
     this.comment = comment;
 }
コード例 #7
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(BC_Comment obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }