nature_net.user_controls.image_frame.show_image C# (CSharp) Метод

show_image() публичный Метод

public show_image ( object us, RunWorkerCompletedEventArgs e ) : void
us object
e System.ComponentModel.RunWorkerCompletedEventArgs
Результат void
        public void show_image(object us, RunWorkerCompletedEventArgs e)
        {
            this.the_item.Dispatcher.BeginInvoke(DispatcherPriority.Normal,
                new System.Action(() =>
                {
                    if ((int)e.Result == -1)
                        the_item.Background = new ImageBrush(configurations.img_not_found_image_pic);
                    else
                    {
                        double h = the_image.Height;//window_manager.contributions[(int)e.Result].Height;
                        double w = the_image.Width;//window_manager.contributions[(int)e.Result].Width;
                        the_item.Height = (h / w) * the_item.Width;
                        the_item.Background = new ImageBrush(the_image);//window_manager.contributions[(int)e.Result]);
                    }
                    the_item.UpdateLayout();
                }));
        }