c# - Add Image to Base64 Encoded ImageStream in Resources (resx) -


I am working on an old project, updating it. There is a toolstrip with a button in some part of the program, with each single image. I've found that the images are stored in a Base64 encoded ImageStream in resx for the form and can be accessed in such a way as:

  System.ComponentModel.ComponentResourceManager resources = New System. ComponentModel.ComponentResourceManager (typeof (Form1)); ... this.imageList1 = new system.window.form. Image list (this.components); ... this.toolStrip1.ImageList = this.imageList1; ... this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer) (resources.GetObject ("imageList1.ImageStream"))); ... this.toolStripButton1.ImageIndex = 0; // There are 41 images in it, so it can be between 0 and 40  

I have to add another button with a new image. How can I add an image to this stream?

I can not use the designer, because as soon as I load the form, as soon as the crash (I believe it uses a custom component with the unsafe code).

I can always just separate a new image from the processing stream, but it is that a button will be different and thus it creates problems with continuity, due to later maintenance problems. So I'm thinking that to edit the imagestream for me in any way I can use the raw base64 string but I do not know where to go from here.

  • Add an ImageList component to the text after "itemprop =" text ">
  • Add an arbitrary image to generate an "ImageStream" in the command.
  • Create resx second form in the open year. And copy "value" element.
  • Open a new monster and paste value element.
  • Open the new look.
  • Add the picture as needed.
  • Save the new form.
  • Open the resx file of the new look.
  • Copy the value element.
  • Open the resx file of the old form.
  • Paste in these new value elements

  • Comments

    Popular posts from this blog

    windows - Heroku throws SQLITE3 Read only exception -

    lex - Building a lexical Analyzer in Java -

    python - rename keys in a dictionary -