/// <summary> /// InsertImage 在position位置处,插入图片。 /// </summary> /// <param name="image">要插入的图片</param> /// <param name="position">插入的位置</param> public void InsertImage(Image image, int position) { GifBox gif = new GifBox(); gif.BackColor = base.BackColor; gif.Image = image; this.RichEditOle.InsertControl(gif,position , 0); }
/// <summary> /// InsertImage 在position位置处,插入图片。 /// </summary> /// <param name="image">要插入的图片</param> /// <param name="position">插入的位置</param> public void InsertImage(Image image, int position) { GifBox gif = new GifBox(); gif.BackColor = base.BackColor; gif.Image = image; this.RichEditOle.InsertControl(gif, position, 0); }
/// <summary> /// InsertImage 在position位置处,插入标志为imageID图片。 /// </summary> /// <param name="position">插入的位置</param> /// <param name="imageID">图片的标志,必须大于0</param> public void InsertImage(uint imageID, int position ) { if (imageID <= 0) { throw new Exception("imageID must greater than 0."); } GifBox gif = new GifBox(); gif.BackColor = base.BackColor; gif.Image = Image.FromFile(this.imagePathGetter.GetPath(imageID)); this.RichEditOle.InsertControl(gif, position, imageID); }
/// <summary> /// InsertImage 在position位置处,插入标志为imageID图片。 /// </summary> /// <param name="position">插入的位置</param> /// <param name="imageID">图片的标志,必须大于0</param> public void InsertImage(uint imageID, int position) { if (imageID <= 0) { throw new Exception("imageID must greater than 0."); } GifBox gif = new GifBox(); gif.BackColor = base.BackColor; gif.Image = Image.FromFile(this.imagePathGetter.GetPath(imageID)); this.RichEditOle.InsertControl(gif, position, imageID); }