ACAT.Lib.Core.Utility.Windows.SetImage C# (CSharp) Метод

SetImage() публичный статический Метод

Sets the image in a picturebox and invalidates the picture box This is just a helper function that takes care of cross-thread invokations that would result in .NET exceptions.
public static SetImage ( PictureBox box, Image image ) : void
box System.Windows.Forms.PictureBox
image Image
Результат void
        public static void SetImage(PictureBox box, Image image)
        {
            if (box.InvokeRequired)
            {
                box.Invoke(new setImage(SetImage), box, image);
            }
            else
            {
                box.Image = image;
                box.Invalidate();
            }
        }