Toggle viewing of drag areas on shapes when shape selector is pressed.
This commit is contained in:
parent
d6a2a62c9b
commit
cb3a29b4ea
@ -55,7 +55,7 @@ namespace EduNetworkBuilder
|
||||
}
|
||||
if(InShapeEditMode)
|
||||
{
|
||||
int sz = 5;
|
||||
int sz = 15;
|
||||
Color edgeColor = Color.Black;
|
||||
if (FillColor == Color.Black) edgeColor = Color.White;
|
||||
coloredBrush = new SolidBrush(edgeColor);
|
||||
|
@ -70,6 +70,7 @@ namespace EduNetworkBuilder
|
||||
private List<string> BrokenItems = new List<string>();
|
||||
private List<NetShape> Shapes = new List<NetShape>(); //For storing simple shapes which are drawn on the network
|
||||
public bool IsRandomNetwork = false;
|
||||
public bool InShapeEditMode = false;
|
||||
|
||||
private List<AnimationClass> Animations = new List<AnimationClass>();
|
||||
|
||||
@ -800,7 +801,7 @@ namespace EduNetworkBuilder
|
||||
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
|
||||
shape.Draw(TheNetImage, InShapeEditMode); //Draw any shapes
|
||||
//Do all the links first
|
||||
foreach (NetworkComponent NC in NetComponents)
|
||||
{
|
||||
|
@ -741,14 +741,22 @@ namespace EduNetworkBuilder
|
||||
btn.BackColor = Color.LightGreen;
|
||||
selectedButton = btn.Name;
|
||||
lblStatus.Text = myTooltip.GetToolTip(btn);
|
||||
if (selectedButton == "btnShapes") doupdate = true;
|
||||
myNetwork.InShapeEditMode = true;
|
||||
if (selectedButton == "btnShapes") {
|
||||
myNetwork.InShapeEditMode = true;
|
||||
doupdate = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
myNetwork.InShapeEditMode = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
btn.BackColor = Button.DefaultBackColor;
|
||||
}
|
||||
}
|
||||
if (doupdate) UpdateForm();
|
||||
if (doupdate) { UpdateForm(); }
|
||||
}
|
||||
private void btnReset()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user