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:
parent
d948be0a54
commit
abc42db1f8
1
EduNetworkBuilder/DeviceConfig.Designer.cs
generated
1
EduNetworkBuilder/DeviceConfig.Designer.cs
generated
@ -291,6 +291,7 @@
|
|||||||
this.Icon = global::EduNetworkBuilder.Properties.Resources.NBIco;
|
this.Icon = global::EduNetworkBuilder.Properties.Resources.NBIco;
|
||||||
this.Name = "DeviceConfig";
|
this.Name = "DeviceConfig";
|
||||||
this.Text = "DeviceConfig";
|
this.Text = "DeviceConfig";
|
||||||
|
this.Shown += new System.EventHandler(this.DeviceConfig_Shown);
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|
||||||
|
@ -542,5 +542,15 @@ namespace EduNetworkBuilder
|
|||||||
}
|
}
|
||||||
UpdateForm();
|
UpdateForm();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void DeviceConfig_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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
1
EduNetworkBuilder/FirewallEditor.Designer.cs
generated
1
EduNetworkBuilder/FirewallEditor.Designer.cs
generated
@ -107,6 +107,7 @@
|
|||||||
this.MinimumSize = new System.Drawing.Size(309, 250);
|
this.MinimumSize = new System.Drawing.Size(309, 250);
|
||||||
this.Name = "FirewallEditor";
|
this.Name = "FirewallEditor";
|
||||||
this.Text = "FirewallEditor";
|
this.Text = "FirewallEditor";
|
||||||
|
this.Shown += new System.EventHandler(this.FirewallEditor_Shown);
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -168,5 +168,15 @@ namespace EduNetworkBuilder
|
|||||||
lbRules.ContextMenuStrip.Show(Cursor.Position);
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
1
EduNetworkBuilder/LinkEditor.Designer.cs
generated
1
EduNetworkBuilder/LinkEditor.Designer.cs
generated
@ -121,6 +121,7 @@
|
|||||||
this.Icon = global::EduNetworkBuilder.Properties.Resources.NBIco;
|
this.Icon = global::EduNetworkBuilder.Properties.Resources.NBIco;
|
||||||
this.Name = "LinkEditor";
|
this.Name = "LinkEditor";
|
||||||
this.Text = "LinkEditor";
|
this.Text = "LinkEditor";
|
||||||
|
this.Shown += new System.EventHandler(this.LinkEditor_Shown);
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -238,5 +238,15 @@ namespace EduNetworkBuilder
|
|||||||
{
|
{
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void LinkEditor_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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
1
EduNetworkBuilder/NetTestEditor.Designer.cs
generated
1
EduNetworkBuilder/NetTestEditor.Designer.cs
generated
@ -136,6 +136,7 @@
|
|||||||
this.Name = "NetTestEditor";
|
this.Name = "NetTestEditor";
|
||||||
this.Text = "Edit a Test";
|
this.Text = "Edit a Test";
|
||||||
this.Load += new System.EventHandler(this.NetTestEditor_Load);
|
this.Load += new System.EventHandler(this.NetTestEditor_Load);
|
||||||
|
this.Shown += new System.EventHandler(this.NetTestEditor_Shown);
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|
||||||
|
@ -495,5 +495,15 @@ namespace EduNetworkBuilder
|
|||||||
UpdateForm();
|
UpdateForm();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void NetTestEditor_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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
1
EduNetworkBuilder/NetworkCardEditor.Designer.cs
generated
1
EduNetworkBuilder/NetworkCardEditor.Designer.cs
generated
@ -150,6 +150,7 @@
|
|||||||
this.Icon = global::EduNetworkBuilder.Properties.Resources.NBIco;
|
this.Icon = global::EduNetworkBuilder.Properties.Resources.NBIco;
|
||||||
this.Name = "NetworkCardEditor";
|
this.Name = "NetworkCardEditor";
|
||||||
this.Text = "NetworkCardEditor";
|
this.Text = "NetworkCardEditor";
|
||||||
|
this.Shown += new System.EventHandler(this.NetworkCardEditor_Shown);
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|
||||||
|
@ -194,5 +194,15 @@ namespace EduNetworkBuilder
|
|||||||
MyNicToEdit.TunnelEndpoint.Edit(nd, this, NB.Translate("_Endpt"));
|
MyNicToEdit.TunnelEndpoint.Edit(nd, this, NB.Translate("_Endpt"));
|
||||||
UpdateForm();
|
UpdateForm();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void NetworkCardEditor_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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
1
EduNetworkBuilder/OptionsWindow.Designer.cs
generated
1
EduNetworkBuilder/OptionsWindow.Designer.cs
generated
@ -289,6 +289,7 @@
|
|||||||
this.Controls.Add(this.btnDone);
|
this.Controls.Add(this.btnDone);
|
||||||
this.Name = "OptionsWindow";
|
this.Name = "OptionsWindow";
|
||||||
this.Text = "OptionsWindow";
|
this.Text = "OptionsWindow";
|
||||||
|
this.Shown += new System.EventHandler(this.OptionsWindow_Shown);
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|
||||||
|
@ -392,5 +392,15 @@ namespace EduNetworkBuilder
|
|||||||
cb_ColoredPackets.Checked = false;
|
cb_ColoredPackets.Checked = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OptionsWindow_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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
1
EduNetworkBuilder/VLANConfig.Designer.cs
generated
1
EduNetworkBuilder/VLANConfig.Designer.cs
generated
@ -89,6 +89,7 @@
|
|||||||
this.Controls.Add(this.dgv_VLANAssignments);
|
this.Controls.Add(this.dgv_VLANAssignments);
|
||||||
this.Name = "VLANConfig";
|
this.Name = "VLANConfig";
|
||||||
this.Text = "VLANConfig";
|
this.Text = "VLANConfig";
|
||||||
|
this.Shown += new System.EventHandler(this.VLANConfig_Shown);
|
||||||
((System.ComponentModel.ISupportInitialize)(this.dgv_VLANAssignments)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.dgv_VLANAssignments)).EndInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.dgv_VLANNames)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.dgv_VLANNames)).EndInit();
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
|
@ -433,5 +433,15 @@ namespace EduNetworkBuilder
|
|||||||
dgv_VLANAssignments.CommitEdit(DataGridViewDataErrorContexts.Commit);
|
dgv_VLANAssignments.CommitEdit(DataGridViewDataErrorContexts.Commit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void VLANConfig_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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user