using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Net; using System.Net.NetworkInformation; using System.Net.Sockets; using System.Text; using System.Windows.Forms; namespace TeslaConsole; internal class SetupPod : Form { private Pod mPod; private Pod[] mKnownPods; private IContainer components; private Label lblMacAddress; private TextBox txtMacAddress; private TextBox txtIPAddress; private Label lblIPAddress; private GroupBox gbNetwork; private TextBox txtSubnet; private Label lblSubnet; private TextBox txtDNS; private Label lblDNS; private Label lblGateway; private TextBox txtGateway; private TextBox txtPodId; private Label lblPodId; private TextBox txtPodName; private Label lblPodName; private Label lblPodType; private ComboBox cmbPodType; private Button cmdCancel; private Button cmdOK; private ErrorProvider errProvider; private TextBox txtPassphrase; private Label lblPassphrase; private ComboBox cmbSquad; private Label lblSquad; private Label lblHostName; private TextBox txtHostName; private TableLayoutPanel tblMain; private TableLayoutPanel tblButtons; private TableLayoutPanel tblNetwork; public Pod Pod { get { mPod.Name = txtPodName.Text; mPod.HostType = ((HostTypeHelper)cmbPodType.SelectedItem).HostType; mPod.IPAddress = IPAddress.Parse(txtIPAddress.Text); mPod.Subnet = IPAddress.Parse(txtSubnet.Text); if (string.IsNullOrEmpty(txtGateway.Text)) { mPod.Gateway = IPAddress.Any; } else { mPod.Gateway = IPAddress.Parse(txtGateway.Text); } if (string.IsNullOrEmpty(txtDNS.Text)) { mPod.DNS = IPAddress.Any; } else { mPod.DNS = IPAddress.Parse(txtDNS.Text); } mPod.HostName = txtHostName.Text; return mPod; } private set { mPod = value; txtPodName.Text = mPod.Name; cmbPodType.SelectedItem = (HostTypeHelper)mPod.HostType; txtPodId.Text = mPod.ID.ToString(); txtMacAddress.Text = MacAddressToString(mPod.MacAddress); txtIPAddress.Text = (mPod.IPAddress.Equals(IPAddress.Any) ? "" : mPod.IPAddress.ToString()); txtSubnet.Text = (mPod.IPAddress.Equals(IPAddress.Any) ? "" : mPod.Subnet.ToString()); txtGateway.Text = ((mPod.Gateway == IPAddress.Any) ? "" : mPod.Gateway.ToString()); txtDNS.Text = ((mPod.DNS == IPAddress.Any) ? "" : mPod.DNS.ToString()); txtHostName.Text = mPod.HostName; } } public Squad Squad => (Squad)cmbSquad.SelectedItem; public string Passphrase => txtPassphrase.Text; internal SetupPod(string requestId, Pod pod, List squads) { InitializeComponent(); cmbPodType.Items.Add((HostTypeHelper)HostType.GameMachineHostType); cmbPodType.Items.Add((HostTypeHelper)HostType.MissionReviewHostType); Text = "Configure Pod - " + requestId; Pod = pod; cmbSquad.Items.Add(new Squad(Guid.Empty, "")); List list = new List(); foreach (Squad squad in squads) { cmbSquad.Items.Add(squad); foreach (Pod pod2 in squad.Pods) { list.Add(pod2); } } cmbSquad.SelectedIndex = ((cmbSquad.Items.Count > 1) ? 1 : 0); mKnownPods = list.ToArray(); } private string MacAddressToString(byte[] macAddress) { if (macAddress.Length < 1) { return string.Empty; } StringBuilder stringBuilder = new StringBuilder(macAddress.Length * 3 - 1); stringBuilder.Append(macAddress[0].ToString("X2")); for (int i = 1; i < macAddress.Length; i++) { stringBuilder.Append('-'); stringBuilder.Append(macAddress[i].ToString("X2")); } return stringBuilder.ToString(); } private void txtPassphrase_TextChanged(object sender, EventArgs e) { int selectionStart = txtPassphrase.SelectionStart; int selectionLength = txtPassphrase.SelectionLength; txtPassphrase.Text = txtPassphrase.Text.ToUpper(); txtPassphrase.Select(selectionStart, selectionLength); } private void txtPassphrase_Validating(object sender, CancelEventArgs e) { errProvider.SetError(txtPassphrase, ""); if (txtPassphrase.Enabled && txtPassphrase.Text.Length != 5) { errProvider.SetError(txtPassphrase, "The passphrase is invalid."); e.Cancel = true; } } private void txtPodName_Validating(object sender, CancelEventArgs e) { errProvider.SetError(txtPodName, ""); if (string.IsNullOrEmpty(txtPodName.Text)) { errProvider.SetError(txtPodName, "Pod must be given a name."); e.Cancel = true; } } private bool CheckIpTextBox(TextBox textbox, bool required, CancelEventArgs e, out IPAddress address) { if (string.IsNullOrEmpty(textbox.Text)) { if (required) { errProvider.SetError(textbox, "You must enter a valid address."); e.Cancel = true; } else { errProvider.SetError(textbox, ""); } address = null; return false; } if (!IPAddress.TryParse(textbox.Text, out address) || address.ToString() != textbox.Text || address.Equals(IPAddress.Any) || address.Equals(IPAddress.Broadcast)) { errProvider.SetError(textbox, "You must enter a valid address."); e.Cancel = true; address = null; return false; } errProvider.SetError(textbox, ""); return true; } private void ValidateRequiredIP(object sender, CancelEventArgs e) { CheckIpTextBox((TextBox)sender, required: true, e, out var _); } private void ValidateOptionalIP(object sender, CancelEventArgs e) { CheckIpTextBox((TextBox)sender, required: false, e, out var _); } private void txtIPAddress_Validating(object sender, CancelEventArgs e) { if (!CheckIpTextBox((TextBox)sender, required: true, e, out var address)) { return; } Pod[] array = mKnownPods; foreach (Pod pod in array) { if (pod.IPAddress.Equals(address)) { errProvider.SetError((TextBox)sender, "The specified address is already in use."); e.Cancel = true; break; } } } private void txtHostName_Validating(object sender, CancelEventArgs e) { errProvider.SetError(txtHostName, ""); if (string.IsNullOrEmpty(txtHostName.Text)) { errProvider.SetError(txtHostName, "Pod must be given a host name."); e.Cancel = true; return; } if (txtHostName.Text.Length > 63) { errProvider.SetError(txtHostName, "The host name may not be longer than 63 characters."); e.Cancel = true; return; } string text = txtHostName.Text; foreach (char c in text) { if ((c < '0' || c > '9') && (c < 'a' || c > 'z') && (c < 'A' || c > 'Z') && c != '-' && c != '_') { errProvider.SetError(txtHostName, "The host name may only contain ASCII letters and number or the dash and underscore characters."); e.Cancel = true; return; } } Pod[] array = mKnownPods; foreach (Pod pod in array) { if (pod.HostName.Equals(txtHostName.Text, StringComparison.OrdinalIgnoreCase)) { errProvider.SetError((TextBox)sender, "The specified host name is already in use."); e.Cancel = true; break; } } } private void cmdOK_Click(object sender, EventArgs e) { if (!ValidateChildren()) { return; } IPAddress iPAddress = IPAddress.Parse(txtIPAddress.Text); IPAddress obj = IPAddress.Parse(txtSubnet.Text); if (iPAddress.AddressFamily == AddressFamily.InterNetwork) { uint num = BitConverter.ToUInt32(iPAddress.GetAddressBytes(), 0); bool flag = false; bool flag2 = false; try { NetworkInterface[] allNetworkInterfaces = NetworkInterface.GetAllNetworkInterfaces(); foreach (NetworkInterface networkInterface in allNetworkInterfaces) { try { foreach (UnicastIPAddressInformation unicastAddress in networkInterface.GetIPProperties().UnicastAddresses) { try { if (unicastAddress.Address.AddressFamily != AddressFamily.InterNetwork || unicastAddress.IPv4Mask == null) { continue; } uint num2 = BitConverter.ToUInt32(unicastAddress.Address.GetAddressBytes(), 0); uint num3 = BitConverter.ToUInt32(unicastAddress.IPv4Mask.GetAddressBytes(), 0); if ((num2 & num3) == (num & num3)) { flag = true; if (unicastAddress.IPv4Mask.Equals(obj)) { flag2 = true; } } } catch (Exception) { } } } catch (Exception) { } } } catch (Exception) { } if ((!flag && MessageBox.Show("The specified IP Address does not appear to be on any network directly attached to this console. Are you sure it is correct?", "IP Address Not Local", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) || (!flag2 && MessageBox.Show("The specified Subnet Mask does not match the subnet mask specified for this console. Are you sure it is correct?", "Subnet Mask Mismatch", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)) { return; } } base.DialogResult = DialogResult.OK; } protected override void Dispose(bool disposing) { if (disposing && components != null) { components.Dispose(); } base.Dispose(disposing); } private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.lblMacAddress = new System.Windows.Forms.Label(); this.txtMacAddress = new System.Windows.Forms.TextBox(); this.txtIPAddress = new System.Windows.Forms.TextBox(); this.lblIPAddress = new System.Windows.Forms.Label(); this.gbNetwork = new System.Windows.Forms.GroupBox(); this.lblHostName = new System.Windows.Forms.Label(); this.txtHostName = new System.Windows.Forms.TextBox(); this.txtGateway = new System.Windows.Forms.TextBox(); this.txtDNS = new System.Windows.Forms.TextBox(); this.lblDNS = new System.Windows.Forms.Label(); this.lblGateway = new System.Windows.Forms.Label(); this.txtSubnet = new System.Windows.Forms.TextBox(); this.lblSubnet = new System.Windows.Forms.Label(); this.txtPodId = new System.Windows.Forms.TextBox(); this.lblPodId = new System.Windows.Forms.Label(); this.txtPodName = new System.Windows.Forms.TextBox(); this.lblPodName = new System.Windows.Forms.Label(); this.lblPodType = new System.Windows.Forms.Label(); this.cmbPodType = new System.Windows.Forms.ComboBox(); this.cmdCancel = new System.Windows.Forms.Button(); this.cmdOK = new System.Windows.Forms.Button(); this.errProvider = new System.Windows.Forms.ErrorProvider(this.components); this.txtPassphrase = new System.Windows.Forms.TextBox(); this.lblPassphrase = new System.Windows.Forms.Label(); this.cmbSquad = new System.Windows.Forms.ComboBox(); this.lblSquad = new System.Windows.Forms.Label(); this.tblMain = new System.Windows.Forms.TableLayoutPanel(); this.tblButtons = new System.Windows.Forms.TableLayoutPanel(); this.tblNetwork = new System.Windows.Forms.TableLayoutPanel(); this.gbNetwork.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)this.errProvider).BeginInit(); this.tblMain.SuspendLayout(); this.tblButtons.SuspendLayout(); this.tblNetwork.SuspendLayout(); base.SuspendLayout(); this.lblMacAddress.Anchor = System.Windows.Forms.AnchorStyles.Right; this.lblMacAddress.AutoSize = true; this.lblMacAddress.Location = new System.Drawing.Point(18, 6); this.lblMacAddress.Name = "lblMacAddress"; this.lblMacAddress.Size = new System.Drawing.Size(74, 13); this.lblMacAddress.TabIndex = 0; this.lblMacAddress.Text = "MAC Address:"; this.txtMacAddress.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; this.txtMacAddress.Location = new System.Drawing.Point(98, 3); this.txtMacAddress.Margin = new System.Windows.Forms.Padding(3, 3, 30, 3); this.txtMacAddress.Name = "txtMacAddress"; this.txtMacAddress.ReadOnly = true; this.txtMacAddress.Size = new System.Drawing.Size(154, 20); this.txtMacAddress.TabIndex = 1; this.txtMacAddress.TabStop = false; this.txtIPAddress.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; this.txtIPAddress.Location = new System.Drawing.Point(98, 29); this.txtIPAddress.Margin = new System.Windows.Forms.Padding(3, 3, 30, 3); this.txtIPAddress.Name = "txtIPAddress"; this.txtIPAddress.Size = new System.Drawing.Size(154, 20); this.txtIPAddress.TabIndex = 3; this.txtIPAddress.Validating += new System.ComponentModel.CancelEventHandler(txtIPAddress_Validating); this.lblIPAddress.Anchor = System.Windows.Forms.AnchorStyles.Right; this.lblIPAddress.AutoSize = true; this.lblIPAddress.Location = new System.Drawing.Point(31, 32); this.lblIPAddress.Name = "lblIPAddress"; this.lblIPAddress.Size = new System.Drawing.Size(61, 13); this.lblIPAddress.TabIndex = 2; this.lblIPAddress.Text = "IP Address:"; this.gbNetwork.AutoSize = true; this.tblMain.SetColumnSpan(this.gbNetwork, 2); this.gbNetwork.Controls.Add(this.tblNetwork); this.gbNetwork.Dock = System.Windows.Forms.DockStyle.Fill; this.gbNetwork.Location = new System.Drawing.Point(3, 135); this.gbNetwork.Name = "gbNetwork"; this.gbNetwork.Size = new System.Drawing.Size(288, 175); this.gbNetwork.TabIndex = 11; this.gbNetwork.TabStop = false; this.gbNetwork.Text = "Network Setup"; this.lblHostName.Anchor = System.Windows.Forms.AnchorStyles.Right; this.lblHostName.AutoSize = true; this.lblHostName.Location = new System.Drawing.Point(29, 136); this.lblHostName.Name = "lblHostName"; this.lblHostName.Size = new System.Drawing.Size(63, 13); this.lblHostName.TabIndex = 11; this.lblHostName.Text = "Host Name:"; this.txtHostName.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; this.txtHostName.Location = new System.Drawing.Point(98, 133); this.txtHostName.Margin = new System.Windows.Forms.Padding(3, 3, 30, 3); this.txtHostName.Name = "txtHostName"; this.txtHostName.Size = new System.Drawing.Size(154, 20); this.txtHostName.TabIndex = 10; this.txtHostName.Validating += new System.ComponentModel.CancelEventHandler(txtHostName_Validating); this.txtGateway.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; this.txtGateway.Location = new System.Drawing.Point(98, 81); this.txtGateway.Margin = new System.Windows.Forms.Padding(3, 3, 30, 3); this.txtGateway.Name = "txtGateway"; this.txtGateway.Size = new System.Drawing.Size(154, 20); this.txtGateway.TabIndex = 7; this.txtGateway.Validating += new System.ComponentModel.CancelEventHandler(ValidateOptionalIP); this.txtDNS.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; this.txtDNS.Location = new System.Drawing.Point(98, 107); this.txtDNS.Margin = new System.Windows.Forms.Padding(3, 3, 30, 3); this.txtDNS.Name = "txtDNS"; this.txtDNS.Size = new System.Drawing.Size(154, 20); this.txtDNS.TabIndex = 9; this.txtDNS.Validating += new System.ComponentModel.CancelEventHandler(ValidateOptionalIP); this.lblDNS.Anchor = System.Windows.Forms.AnchorStyles.Right; this.lblDNS.AutoSize = true; this.lblDNS.Location = new System.Drawing.Point(25, 110); this.lblDNS.Name = "lblDNS"; this.lblDNS.Size = new System.Drawing.Size(67, 13); this.lblDNS.TabIndex = 8; this.lblDNS.Text = "DNS Server:"; this.lblGateway.Anchor = System.Windows.Forms.AnchorStyles.Right; this.lblGateway.AutoSize = true; this.lblGateway.Location = new System.Drawing.Point(3, 84); this.lblGateway.Name = "lblGateway"; this.lblGateway.Size = new System.Drawing.Size(89, 13); this.lblGateway.TabIndex = 6; this.lblGateway.Text = "Default Gateway:"; this.txtSubnet.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; this.txtSubnet.Location = new System.Drawing.Point(98, 55); this.txtSubnet.Margin = new System.Windows.Forms.Padding(3, 3, 30, 3); this.txtSubnet.Name = "txtSubnet"; this.txtSubnet.Size = new System.Drawing.Size(154, 20); this.txtSubnet.TabIndex = 5; this.txtSubnet.Validating += new System.ComponentModel.CancelEventHandler(ValidateRequiredIP); this.lblSubnet.Anchor = System.Windows.Forms.AnchorStyles.Right; this.lblSubnet.AutoSize = true; this.lblSubnet.Location = new System.Drawing.Point(19, 58); this.lblSubnet.Name = "lblSubnet"; this.lblSubnet.Size = new System.Drawing.Size(73, 13); this.lblSubnet.TabIndex = 4; this.lblSubnet.Text = "Subnet Mask:"; this.txtPodId.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; this.txtPodId.Location = new System.Drawing.Point(74, 3); this.txtPodId.Margin = new System.Windows.Forms.Padding(3, 3, 30, 3); this.txtPodId.Name = "txtPodId"; this.txtPodId.ReadOnly = true; this.txtPodId.Size = new System.Drawing.Size(190, 20); this.txtPodId.TabIndex = 1; this.txtPodId.TabStop = false; this.txtPodId.Text = "{1AD57794-BD4B-4593-B1FC-B7C0F5DF360D}"; this.lblPodId.Anchor = System.Windows.Forms.AnchorStyles.Right; this.lblPodId.AutoSize = true; this.lblPodId.Location = new System.Drawing.Point(25, 6); this.lblPodId.Name = "lblPodId"; this.lblPodId.Size = new System.Drawing.Size(43, 13); this.lblPodId.TabIndex = 0; this.lblPodId.Text = "Pod ID:"; this.txtPodName.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; this.txtPodName.Location = new System.Drawing.Point(74, 29); this.txtPodName.Margin = new System.Windows.Forms.Padding(3, 3, 30, 3); this.txtPodName.Name = "txtPodName"; this.txtPodName.Size = new System.Drawing.Size(190, 20); this.txtPodName.TabIndex = 3; this.txtPodName.Validating += new System.ComponentModel.CancelEventHandler(txtPodName_Validating); this.lblPodName.Anchor = System.Windows.Forms.AnchorStyles.Right; this.lblPodName.AutoSize = true; this.lblPodName.Location = new System.Drawing.Point(30, 32); this.lblPodName.Name = "lblPodName"; this.lblPodName.Size = new System.Drawing.Size(38, 13); this.lblPodName.TabIndex = 2; this.lblPodName.Text = "Name:"; this.lblPodType.Anchor = System.Windows.Forms.AnchorStyles.Right; this.lblPodType.AutoSize = true; this.lblPodType.Location = new System.Drawing.Point(34, 59); this.lblPodType.Name = "lblPodType"; this.lblPodType.Size = new System.Drawing.Size(34, 13); this.lblPodType.TabIndex = 4; this.lblPodType.Text = "Type:"; this.cmbPodType.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; this.cmbPodType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbPodType.FormattingEnabled = true; this.cmbPodType.Location = new System.Drawing.Point(74, 55); this.cmbPodType.Margin = new System.Windows.Forms.Padding(3, 3, 30, 3); this.cmbPodType.Name = "cmbPodType"; this.cmbPodType.Size = new System.Drawing.Size(190, 21); this.cmbPodType.TabIndex = 5; this.cmdCancel.Anchor = System.Windows.Forms.AnchorStyles.Right; this.cmdCancel.CausesValidation = false; this.cmdCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.cmdCancel.Location = new System.Drawing.Point(216, 3); this.cmdCancel.Name = "cmdCancel"; this.cmdCancel.Size = new System.Drawing.Size(75, 23); this.cmdCancel.TabIndex = 13; this.cmdCancel.Text = "Cancel"; this.cmdCancel.UseVisualStyleBackColor = true; this.cmdOK.Anchor = System.Windows.Forms.AnchorStyles.Right; this.cmdOK.Location = new System.Drawing.Point(135, 3); this.cmdOK.Name = "cmdOK"; this.cmdOK.Size = new System.Drawing.Size(75, 23); this.cmdOK.TabIndex = 12; this.cmdOK.Text = "OK"; this.cmdOK.UseVisualStyleBackColor = true; this.cmdOK.Click += new System.EventHandler(cmdOK_Click); this.errProvider.BlinkStyle = System.Windows.Forms.ErrorBlinkStyle.NeverBlink; this.errProvider.ContainerControl = this; this.txtPassphrase.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; this.txtPassphrase.Location = new System.Drawing.Point(74, 109); this.txtPassphrase.Margin = new System.Windows.Forms.Padding(3, 3, 30, 3); this.txtPassphrase.MaxLength = 5; this.txtPassphrase.Name = "txtPassphrase"; this.txtPassphrase.Size = new System.Drawing.Size(190, 20); this.txtPassphrase.TabIndex = 9; this.txtPassphrase.TextChanged += new System.EventHandler(txtPassphrase_TextChanged); this.txtPassphrase.Validating += new System.ComponentModel.CancelEventHandler(txtPassphrase_Validating); this.lblPassphrase.Anchor = System.Windows.Forms.AnchorStyles.Right; this.lblPassphrase.AutoSize = true; this.lblPassphrase.Location = new System.Drawing.Point(3, 112); this.lblPassphrase.Name = "lblPassphrase"; this.lblPassphrase.Size = new System.Drawing.Size(65, 13); this.lblPassphrase.TabIndex = 8; this.lblPassphrase.Text = "Passphrase:"; this.cmbSquad.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; this.cmbSquad.DisplayMember = "Name"; this.cmbSquad.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbSquad.FormattingEnabled = true; this.cmbSquad.Location = new System.Drawing.Point(74, 82); this.cmbSquad.Margin = new System.Windows.Forms.Padding(3, 3, 30, 3); this.cmbSquad.Name = "cmbSquad"; this.cmbSquad.Size = new System.Drawing.Size(190, 21); this.cmbSquad.TabIndex = 7; this.lblSquad.Anchor = System.Windows.Forms.AnchorStyles.Right; this.lblSquad.AutoSize = true; this.lblSquad.Location = new System.Drawing.Point(27, 86); this.lblSquad.Name = "lblSquad"; this.lblSquad.Size = new System.Drawing.Size(41, 13); this.lblSquad.TabIndex = 6; this.lblSquad.Text = "Squad:"; this.tblMain.ColumnCount = 2; this.tblMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tblMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100f)); this.tblMain.Controls.Add(this.lblPodId, 0, 0); this.tblMain.Controls.Add(this.txtPodId, 1, 0); this.tblMain.Controls.Add(this.lblPodName, 0, 1); this.tblMain.Controls.Add(this.txtPodName, 1, 1); this.tblMain.Controls.Add(this.lblPodType, 0, 2); this.tblMain.Controls.Add(this.cmbPodType, 1, 2); this.tblMain.Controls.Add(this.lblSquad, 0, 3); this.tblMain.Controls.Add(this.cmbSquad, 1, 3); this.tblMain.Controls.Add(this.lblPassphrase, 0, 4); this.tblMain.Controls.Add(this.txtPassphrase, 1, 4); this.tblMain.Controls.Add(this.gbNetwork, 0, 5); this.tblMain.Controls.Add(this.tblButtons, 0, 7); this.tblMain.Dock = System.Windows.Forms.DockStyle.Fill; this.tblMain.Location = new System.Drawing.Point(0, 0); this.tblMain.Name = "tblMain"; this.tblMain.RowCount = 8; this.tblMain.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tblMain.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tblMain.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tblMain.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tblMain.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tblMain.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tblMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100f)); this.tblMain.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tblMain.Size = new System.Drawing.Size(294, 347); this.tblMain.TabIndex = 14; this.tblButtons.AutoSize = true; this.tblButtons.ColumnCount = 2; this.tblMain.SetColumnSpan(this.tblButtons, 2); this.tblButtons.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100f)); this.tblButtons.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tblButtons.Controls.Add(this.cmdOK, 0, 0); this.tblButtons.Controls.Add(this.cmdCancel, 1, 0); this.tblButtons.Dock = System.Windows.Forms.DockStyle.Fill; this.tblButtons.Location = new System.Drawing.Point(0, 318); this.tblButtons.Margin = new System.Windows.Forms.Padding(0); this.tblButtons.Name = "tblButtons"; this.tblButtons.RowCount = 1; this.tblButtons.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100f)); this.tblButtons.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20f)); this.tblButtons.Size = new System.Drawing.Size(294, 29); this.tblButtons.TabIndex = 12; this.tblNetwork.AutoSize = true; this.tblNetwork.ColumnCount = 2; this.tblNetwork.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tblNetwork.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100f)); this.tblNetwork.Controls.Add(this.lblMacAddress, 0, 0); this.tblNetwork.Controls.Add(this.txtMacAddress, 1, 0); this.tblNetwork.Controls.Add(this.lblIPAddress, 0, 1); this.tblNetwork.Controls.Add(this.txtIPAddress, 1, 1); this.tblNetwork.Controls.Add(this.lblSubnet, 0, 2); this.tblNetwork.Controls.Add(this.txtSubnet, 1, 2); this.tblNetwork.Controls.Add(this.lblGateway, 0, 3); this.tblNetwork.Controls.Add(this.txtGateway, 1, 3); this.tblNetwork.Controls.Add(this.lblDNS, 0, 4); this.tblNetwork.Controls.Add(this.txtDNS, 1, 4); this.tblNetwork.Controls.Add(this.lblHostName, 0, 5); this.tblNetwork.Controls.Add(this.txtHostName, 1, 5); this.tblNetwork.Dock = System.Windows.Forms.DockStyle.Fill; this.tblNetwork.Location = new System.Drawing.Point(3, 16); this.tblNetwork.Margin = new System.Windows.Forms.Padding(0); this.tblNetwork.Name = "tblNetwork"; this.tblNetwork.RowCount = 6; this.tblNetwork.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tblNetwork.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tblNetwork.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tblNetwork.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tblNetwork.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tblNetwork.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tblNetwork.Size = new System.Drawing.Size(282, 156); this.tblNetwork.TabIndex = 12; base.AcceptButton = this.cmdOK; base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f); base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoValidate = System.Windows.Forms.AutoValidate.EnableAllowFocusChange; base.CancelButton = this.cmdCancel; base.ClientSize = new System.Drawing.Size(294, 347); base.Controls.Add(this.tblMain); base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; base.Name = "SetupPod"; base.ShowInTaskbar = false; base.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Configure Pod"; this.gbNetwork.ResumeLayout(false); this.gbNetwork.PerformLayout(); ((System.ComponentModel.ISupportInitialize)this.errProvider).EndInit(); this.tblMain.ResumeLayout(false); this.tblMain.PerformLayout(); this.tblButtons.ResumeLayout(false); this.tblNetwork.ResumeLayout(false); this.tblNetwork.PerformLayout(); base.ResumeLayout(false); } }