Network shapes load, save, and print properly
This commit is contained in:
parent
3b0bb6358f
commit
4f59f3c3a6
@ -85,7 +85,7 @@ namespace EduNetworkBuilder
|
|||||||
writer.WriteElementString("what", MyShape.ToString());
|
writer.WriteElementString("what", MyShape.ToString());
|
||||||
RectangleConverter converter = new RectangleConverter();
|
RectangleConverter converter = new RectangleConverter();
|
||||||
writer.WriteElementString("where", converter.ConvertToString(InArea));
|
writer.WriteElementString("where", converter.ConvertToString(InArea));
|
||||||
writer.WriteElementString("color", WhatColor.ToString());
|
writer.WriteElementString("color", WhatColor.Name);
|
||||||
writer.WriteEndElement();
|
writer.WriteEndElement();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -799,6 +799,8 @@ namespace EduNetworkBuilder
|
|||||||
SolidBrush theBrush = new SolidBrush(SystemColors.Control);
|
SolidBrush theBrush = new SolidBrush(SystemColors.Control);
|
||||||
Graphics.FromImage(TheNetImage).FillRectangle(theBrush, new Rectangle(0,0, TheNetImage.Width, TheNetImage.Height));
|
Graphics.FromImage(TheNetImage).FillRectangle(theBrush, new Rectangle(0,0, TheNetImage.Width, TheNetImage.Height));
|
||||||
//re-generate the image
|
//re-generate the image
|
||||||
|
foreach (NetShape shape in Shapes)
|
||||||
|
shape.Draw(TheNetImage); //Draw any shapes
|
||||||
//Do all the links first
|
//Do all the links first
|
||||||
foreach (NetworkComponent NC in NetComponents)
|
foreach (NetworkComponent NC in NetComponents)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user