public static void Start()
        {
            // set up frame and menus
            Icon icon = new ImageProxy("http://some-url.com/123.png");

            Console.WriteLine($"Image icon width: {icon.GetIconWidth()}px");
            Console.WriteLine($"Image icon height: {icon.GetIconHeight()}px");

            icon.PaintIcon();

            Console.WriteLine($"Image icon width: {icon.GetIconWidth()}px");
            Console.WriteLine($"Image icon height: {icon.GetIconHeight()}px");

            icon.PaintIcon();
        }
コード例 #2
0
        private void imageComponent_Paint(object sender, PaintEventArgs e)
        {
            // Create a local version of the graphics object for the PictureBox.
            Graphics g = e.Graphics;

            // Draw a string on the PictureBox.
            icon.PaintIcon(ref imageComponent, ref g, icon.PixelWidth, icon.PixelHeight);
        }