public AddNetwork(ConnectionWindow CW, bool EM) { InitializeComponent(); Parent = CW; EditMode = EM; if (EM) { NameBox.Text = Parent.NetworkList.SelectedItems[0].SubItems[0].Text; IPAddressBox.Text = Parent.NetworkList.SelectedItems[0].SubItems[1].Text; PortBox.Value = Convert.ToInt32(Parent.NetworkList.SelectedItems[0].SubItems[2].Text); } }
// Loads connection window immediately private void MainForm_Shown(object sender, EventArgs e) { ConnectionWindow ConWin = new ConnectionWindow(this); ConWin.ShowDialog(); }
// Deals with settings toolstrip private void hostingOptionsToolStripMenuItem_Click(object sender, EventArgs e) { ConnectionWindow ConWin = new ConnectionWindow(this); ConWin.ShowDialog(); }