Esempio n. 1
0
        /// <summary>
        /// Converts an ole picture into a .net image
        /// </summary>
        /// <param name="picture">The ole picture</param>
        /// <returns>A .net image</returns>
        internal Image OlePictureToImage(stdole.Picture picture)
        {
            Image image = null;

            switch (picture.Type)
            {
            case Ole.PICTYPE_ICON:
                Icon icon = (Icon)Icon.FromHandle(new IntPtr(picture.Handle)).Clone();
                image = icon.ToBitmap();
                break;

            case Ole.PICTYPE_BITMAP:
                image = (Image)Image.FromHbitmap(new IntPtr(picture.Handle), new IntPtr(picture.hPal)).Clone();
                break;

            case Ole.PICTYPE_METAFILE:
            case Ole.PICTYPE_ENHMETAFILE:
                image = (Image) new Metafile(new IntPtr(picture.Handle), true).Clone();
                break;

            case Ole.PICTYPE_NONE:
            case Ole.PICTYPE_UNINITIALIZED:
                break;

            default:
                throw new Exception("Unsupported picture type: " + picture.Type.ToString());
            }
            return(image);
        }
Esempio n. 2
0
        public virtual stdole.Picture get_PictureAlphaBlended(stdole.Picture picture, stdole.Picture mask)
        {
            object[] paramsArray = Invoker.ValidateParamsArray(picture, mask);
            object   returnItem  = Invoker.PropertyGet(this, "PictureAlphaBlended", paramsArray);

            return(returnItem as stdole.Picture);
        }
Esempio n. 3
0
        public stdole.Picture GenerateSignatureLineImage(NetOffice.OfficeApi.Enums.SignatureLineImage siglnimg, NetOffice.OfficeApi.SignatureSetup psigsetup, NetOffice.OfficeApi.SignatureInfo psiginfo, object xmlDsigStream)
        {
            object[] paramsArray = Invoker.ValidateParamsArray(siglnimg, psigsetup, psiginfo, xmlDsigStream);
            object   returnItem  = Invoker.MethodReturn(this, "GenerateSignatureLineImage", paramsArray);

            stdole.Picture newObject = Factory.CreateObjectFromComProxy(this, returnItem) as stdole.Picture;
            return(newObject);
        }
Esempio n. 4
0
        public stdole.Picture Overlay(object key1, object key2)
        {
            object[] paramsArray = Invoker.ValidateParamsArray(key1, key2);
            object   returnItem  = Invoker.MethodReturn(this, "Overlay", paramsArray);

            stdole.Picture newObject = Factory.CreateObjectFromComProxy(this, returnItem) as stdole.Picture;
            return(newObject);
        }
Esempio n. 5
0
        public stdole.Picture ExtractIcon()
        {
            object[] paramsArray = null;
            object   returnItem  = Invoker.MethodReturn(this, "ExtractIcon", paramsArray);

            stdole.Picture newObject = NetOffice.Factory.CreateObjectFromComProxy(this, returnItem) as stdole.Picture;
            return(newObject);
        }
Esempio n. 6
0
        public stdole.Picture CreateDragImage()
        {
            object[] paramsArray = null;
            object   returnItem  = Invoker.MethodReturn(this, "CreateDragImage", paramsArray);

            stdole.Picture newObject = Factory.CreateObjectFromComProxy(this, returnItem) as stdole.Picture;
            return(newObject);
        }
Esempio n. 7
0
        public stdole.Picture get_PictureAlphaBlended(stdole.Picture picture, stdole.Picture mask)
        {
            object[] paramsArray = Invoker.ValidateParamsArray(picture, mask);
            object   returnItem  = Invoker.PropertyGet(this, "PictureAlphaBlended", paramsArray);

            stdole.Picture newObject = Factory.CreateObjectFromComProxy(this, returnItem) as stdole.Picture;
            return(newObject);
        }
Esempio n. 8
0
        public stdole.Picture GetCustomIcon()
        {
            object[] paramsArray = null;
            object   returnItem  = Invoker.MethodReturn(this, "GetCustomIcon", paramsArray);

            stdole.Picture newObject = Factory.CreateObjectFromComProxy(this, returnItem) as stdole.Picture;
            return(newObject);
        }
Esempio n. 9
0
        public stdole.Picture GetImageMso(string idMso, Int32 width, Int32 height)
        {
            object[] paramsArray = Invoker.ValidateParamsArray(idMso, width, height);
            object   returnItem  = Invoker.MethodReturn(this, "GetImageMso", paramsArray);

            stdole.Picture newObject = Factory.CreateObjectFromComProxy(this, returnItem) as stdole.Picture;
            return(newObject);
        }
Esempio n. 10
0
 public void SetCustomIcon(stdole.Picture picture)
 {
     Factory.ExecuteMethod(this, "SetCustomIcon", picture);
 }
Esempio n. 11
0
 public Parameter(APEIPC instance, stdole.Picture param)
 {
     Image     pictureAsImage = instance.OlePictureToImage(param);
     Parameter paramImage     = new Parameter(instance, pictureAsImage);
 }
Esempio n. 12
0
 public virtual void SetCustomIcon(stdole.Picture picture)
 {
     InvokerService.InvokeInternal.ExecuteMethod(this, "SetCustomIcon", picture);
 }
Esempio n. 13
0
 public void PictureMasked(Int32 cx1, Int32 cy1, Int32 cx2, Int32 cy2, Int32 left, Int32 top, Int32 width, Int32 height, stdole.Picture picture, stdole.Picture mask)
 {
     object[] paramsArray = Invoker.ValidateParamsArray(cx1, cy1, cx2, cy2, left, top, width, height, picture, mask);
     Invoker.Method(this, "PictureMasked", paramsArray);
 }
Esempio n. 14
0
 public stdole.Picture PictureAlphaBlended(stdole.Picture picture, stdole.Picture mask)
 {
     return(get_PictureAlphaBlended(picture, mask));
 }
Esempio n. 15
0
 public virtual void PictureMasked(Int32 cx1, Int32 cy1, Int32 cx2, Int32 cy2, Int32 left, Int32 top, Int32 width, Int32 height, stdole.Picture picture, stdole.Picture mask)
 {
     InvokerService.InvokeInternal.ExecuteMethod(this, "PictureMasked", new object[] { cx1, cy1, cx2, cy2, left, top, width, height, picture, mask });
 }
Esempio n. 16
0
 public void SetCustomIcon(stdole.Picture picture)
 {
     object[] paramsArray = Invoker.ValidateParamsArray(picture);
     Invoker.Method(this, "SetCustomIcon", paramsArray);
 }
Esempio n. 17
0
 public void PictureMasked(Int32 cx1, Int32 cy1, Int32 cx2, Int32 cy2, Int32 left, Int32 top, Int32 width, Int32 height, stdole.Picture picture, stdole.Picture mask)
 {
     Factory.ExecuteMethod(this, "PictureMasked", new object[] { cx1, cy1, cx2, cy2, left, top, width, height, picture, mask });
 }