diff --git a/PROMS/Volian.Controls.Library/DisplayTags.cs b/PROMS/Volian.Controls.Library/DisplayTags.cs index 1362cac9..cb822689 100644 --- a/PROMS/Volian.Controls.Library/DisplayTags.cs +++ b/PROMS/Volian.Controls.Library/DisplayTags.cs @@ -103,7 +103,7 @@ namespace Volian.Controls.Library public string TbFSwd { get {return tbFSWd.Text;} - set { tbFSWd.Text = value; tbFSWd.Refresh(); trBarFS.Value = Convert.ToInt32(value); } + set { tbFSWd.Text = value; tbFSWd.Refresh(); } // trBarFS.Value = Convert.ToInt32(value); } public string TbFSht diff --git a/PROMS/Volian.Controls.Library/ImageItem.cs b/PROMS/Volian.Controls.Library/ImageItem.cs index 0c0dc085..f5eda541 100644 --- a/PROMS/Volian.Controls.Library/ImageItem.cs +++ b/PROMS/Volian.Controls.Library/ImageItem.cs @@ -317,9 +317,13 @@ namespace Volian.Controls.Library } private void SetWidthsAndHeights(System.Drawing.Image img) { - int wd = adjustimage(img.Width); // * MyStepPanel.DPI / 72; // converts from screen resolution's DPI to image's points (72/inch) - double ht = (double)wd * aspectratio(img.Width, img.Height); + int wd = img.Width * MyStepPanel.DPI / 72; // converts from screen resolution's DPI to image's points (72/inch) + int ht = img.Height * MyStepPanel.DPI / 72; + + //int wd = adjustimage(img.Width); // * MyStepPanel.DPI / 72; // converts from screen resolution's DPI to image's points (72/inch) + + //double ht = (double)wd * aspectratio(img.Width, img.Height); //int ht = adjustimage(img.Height); // * MyStepPanel.DPI / 72; if (MyItemInfo.MyContent.MyImage != null) // image is null if creating new. @@ -327,8 +331,10 @@ namespace Volian.Controls.Library ImageConfig ic = new ImageConfig(MyItemInfo.MyContent.MyImage); if (!_pastedNew && ic != null && ic.Image_Height != 0) { - wd = adjustimage(ic.Image_Width); // * MyStepPanel.DPI / 72; - ht = (double)wd * aspectratio(img.Width, img.Height); + wd = ic.Image_Width * MyStepPanel.DPI / 72; + ht = ic.Image_Height * MyStepPanel.DPI / 72; + //wd = adjustimage(ic.Image_Width); // * MyStepPanel.DPI / 72; + //ht = (double)wd * aspectratio(img.Width, img.Height); //ht = wd * (int)aspectratio(img.Width, img.Height); //ht = adjustimage(ic.Image_Height); // * MyStepPanel.DPI / 72; }