private void btnNew_Click(object sender, EventArgs e) { SourcePortEditForm editForm = new SourcePortEditForm(m_adapter, m_tabViews, m_launchType); if (m_launchType == SourcePortLaunchType.SourcePort) { editForm.SetSupportedExtensions(string.Format(".wad,{0},.deh,.bex", Util.GetPkExtensionsCsv())); } else { editForm.SetSupportedExtensions(string.Format(".wad,{0}", Util.GetPkExtensionsCsv())); } editForm.StartPosition = FormStartPosition.CenterParent; if (editForm.ShowDialog(this) == DialogResult.OK) { SourcePort sourcePort = new SourcePort(); editForm.UpdateDataSource(sourcePort); sourcePort.LaunchType = m_launchType; m_adapter.InsertSourcePort(sourcePort); ResetData(); } }