Merge pull request 'B2024-060-Adding-a-picture-PROMS-crashes' (#396) from B2024-060-Adding-a-picture-PROMS-crashes into Development

Ok for testing phase
This commit is contained in:
John Jenko 2024-08-27 10:33:56 -04:00
commit c6342fea49
2 changed files with 9 additions and 5 deletions

View File

@ -103,7 +103,7 @@ namespace Volian.Controls.Library
public string TbFSwd public string TbFSwd
{ {
get {return tbFSWd.Text;} 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 public string TbFSht
@ -111,7 +111,7 @@ namespace Volian.Controls.Library
get { return tbFSHt.Text; } get { return tbFSHt.Text; }
set { tbFSHt.Text = value; tbFSHt.Refresh(); _origFigureSizeRatio = float.Parse(value) / float.Parse(tbFSWd.Text); } set { tbFSHt.Text = value; tbFSHt.Refresh(); _origFigureSizeRatio = float.Parse(value) / float.Parse(tbFSWd.Text); }
} }
#endregion #endregion
#region Constructor #region Constructor
public DisplayTags() public DisplayTags()

View File

@ -256,7 +256,8 @@ namespace Volian.Controls.Library
private int _origCfgHt = 0; // keep track if original size was stored in cfg private int _origCfgHt = 0; // keep track if original size was stored in cfg
private int _origCfgWd = 0; private int _origCfgWd = 0;
private bool _pastedNew = false; // need this for flagging newly pasted image (may need to clear cfg) private bool _pastedNew = false; // need this for flagging newly pasted image (may need to clear cfg)
private DisplayTags _displayTags; private DisplayTags _displayTags = new DisplayTags();
//House myhouse = new House();
#endregion #endregion
#region Constructors #region Constructors
@ -316,8 +317,11 @@ namespace Volian.Controls.Library
} }
private void SetWidthsAndHeights(System.Drawing.Image img) private void SetWidthsAndHeights(System.Drawing.Image img)
{ {
int wd = img.Width * MyStepPanel.DPI / 72; // converts from screen resolution's DPI to image's points (72/inch) 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 ht = img.Height * MyStepPanel.DPI / 72;
if (MyItemInfo.MyContent.MyImage != null) // image is null if creating new. if (MyItemInfo.MyContent.MyImage != null) // image is null if creating new.
{ {
ImageConfig ic = new ImageConfig(MyItemInfo.MyContent.MyImage); ImageConfig ic = new ImageConfig(MyItemInfo.MyContent.MyImage);
@ -340,9 +344,9 @@ namespace Volian.Controls.Library
_displayTags.TbFSwd = wd.ToString(); _displayTags.TbFSwd = wd.ToString();
_displayTags.TbFSht = ht.ToString(); _displayTags.TbFSht = ht.ToString();
} }
} }
// the following gets called for 'NEW' images // the following gets called for 'NEW' images
private E_ImageSource InsType = E_ImageSource.None; private E_ImageSource InsType = E_ImageSource.None;
public ImageItem(ItemInfo itemInfo, StepPanel myStepPanel, EditItem myParentEditItem, ChildRelation myChildRelation, bool expand, EditItem nextEditItem, ImageItem.E_ImageSource insType, DisplayTags displayTags) public ImageItem(ItemInfo itemInfo, StepPanel myStepPanel, EditItem myParentEditItem, ChildRelation myChildRelation, bool expand, EditItem nextEditItem, ImageItem.E_ImageSource insType, DisplayTags displayTags)