private ImageSource GetThumbnail() { var image = new Image(); if (this.comment.HasViewPoint()) { BC_ViewPoint viewPoint = this.comment.GetViewPoint(); if (viewPoint.HasSnapShot()) { BC_SnapShot snapShot = viewPoint.GetSnapShot(); uint imageSize = snapShot.GetThumbnailSize(); if (snapShot.HasImage()) { var imageArray = new byte[(int)imageSize]; snapShot.GetThumbnail(imageArray, imageSize); using (var stream = new MemoryStream(imageArray)) { image.Source = BitmapFrame.Create(stream, BitmapCreateOptions.None, BitmapCacheOption.OnLoad); } } } } return(image.Source); }
internal ComponentView(BC_ViewPoint viewpoint) { this.InitializeComponent(); this.componentViewModelObject = new ComponentViewModel(viewpoint); this.DataContext = this.componentViewModelObject; }
public void SetViewPoint(BC_ViewPoint pViewPoint) { BIMcollab_CommentPINVOKE.BC_Comment_SetViewPoint(swigCPtr, BC_ViewPoint.getCPtr(pViewPoint)); if (BIMcollab_CommentPINVOKE.SWIGPendingException.Pending) { throw BIMcollab_CommentPINVOKE.SWIGPendingException.Retrieve(); } }
public BC_ViewPoint CreateViewPoint() { global::System.IntPtr cPtr = BIMcollab_CommentPINVOKE.BC_Comment_CreateViewPoint__SWIG_0(swigCPtr); BC_ViewPoint ret = (cPtr == global::System.IntPtr.Zero) ? null : new BC_ViewPoint(cPtr, false); if (BIMcollab_CommentPINVOKE.SWIGPendingException.Pending) { throw BIMcollab_CommentPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public BC_ViewPoint CreateViewPointWithSortedComponents(string viewpointGuid) { global::System.IntPtr cPtr = BIMcollab_CommentPINVOKE.BC_Comment_CreateViewPointWithSortedComponents__SWIG_1(swigCPtr, viewpointGuid); BC_ViewPoint ret = (cPtr == global::System.IntPtr.Zero) ? null : new BC_ViewPoint(cPtr, false); if (BIMcollab_CommentPINVOKE.SWIGPendingException.Pending) { throw BIMcollab_CommentPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public BC_ViewPoint CreateDuplicateViewPoint(string viewpointGuid) { global::System.IntPtr cPtr = BIMcollab_IssuePINVOKE.BC_Issue_CreateDuplicateViewPoint(swigCPtr, viewpointGuid); BC_ViewPoint ret = (cPtr == global::System.IntPtr.Zero) ? null : new BC_ViewPoint(cPtr, false); if (BIMcollab_IssuePINVOKE.SWIGPendingException.Pending) { throw BIMcollab_IssuePINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public BC_ViewPoint CreateViewPointWithSortedComponents() { global::System.IntPtr cPtr = BIMcollab_IssuePINVOKE.BC_Issue_CreateViewPointWithSortedComponents(swigCPtr); BC_ViewPoint ret = (cPtr == global::System.IntPtr.Zero) ? null : new BC_ViewPoint(cPtr, false); if (BIMcollab_IssuePINVOKE.SWIGPendingException.Pending) { throw BIMcollab_IssuePINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public BC_ViewPoint GetDefaultViewPoint() { global::System.IntPtr cPtr = BIMcollab_IssuePINVOKE.BC_Issue_GetDefaultViewPoint(swigCPtr); BC_ViewPoint ret = (cPtr == global::System.IntPtr.Zero) ? null : new BC_ViewPoint(cPtr, false); if (BIMcollab_IssuePINVOKE.SWIGPendingException.Pending) { throw BIMcollab_IssuePINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
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); }
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); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(BC_ViewPoint obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }
public ComponentViewModel(BC_ViewPoint viewpoint) { this.viewpoint = viewpoint; this.CreateComponentsList(); }