Network shapes load, save, and print properly

This commit is contained in:
Tim Young 2018-02-24 17:43:45 -06:00
parent 3b0bb6358f
commit 4f59f3c3a6
2 changed files with 3 additions and 1 deletions

View File

@ -85,7 +85,7 @@ namespace EduNetworkBuilder
writer.WriteElementString("what", MyShape.ToString());
RectangleConverter converter = new RectangleConverter();
writer.WriteElementString("where", converter.ConvertToString(InArea));
writer.WriteElementString("color", WhatColor.ToString());
writer.WriteElementString("color", WhatColor.Name);
writer.WriteEndElement();
}
}

View File

@ -799,6 +799,8 @@ namespace EduNetworkBuilder
SolidBrush theBrush = new SolidBrush(SystemColors.Control);
Graphics.FromImage(TheNetImage).FillRectangle(theBrush, new Rectangle(0,0, TheNetImage.Width, TheNetImage.Height));
//re-generate the image
foreach (NetShape shape in Shapes)
shape.Draw(TheNetImage); //Draw any shapes
//Do all the links first
foreach (NetworkComponent NC in NetComponents)
{