ME3Explorer.TaskPaneInfoPanel.setTool C# (CSharp) Method

setTool() public method

public setTool ( GenericWindow gen ) : void
gen GenericWindow
return void
        public void setTool(GenericWindow gen)
        {
            this.DataContext = current = gen;
            current.Disposing += Current_Disposing;
            BitmapSource bitmap = gen.GetImage();
            double scale = screenShot.Width / (bitmap.Width > bitmap.Height ? bitmap.Width : bitmap.Height);
            screenShot.Source = new TransformedBitmap(bitmap, new ScaleTransform(scale, scale));
        }