Most other windows start centered in the main builder window. With multiple displays, windows would start in odd locatins and would often be lost.

This commit is contained in:
2017-02-25 10:53:23 +03:00
parent d948be0a54
commit abc42db1f8
14 changed files with 77 additions and 0 deletions

View File

@ -168,5 +168,15 @@ namespace EduNetworkBuilder
lbRules.ContextMenuStrip.Show(Cursor.Position);
}
}
private void FirewallEditor_Shown(object sender, EventArgs e)
{
BuilderWindow BW = NB.GetBuilderWin();
if (BW != null)
{
Point tLocation = new Point(BW.Location.X + ((BW.Width - Width) / 2), BW.Location.Y + ((BW.Height - Height) / 2));
Location = tLocation;
}
}
}
}