using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace XrmTools { public partial class EntityBrowser : Form { public string EntityName { get; set; } public EntityBrowser(string[] entityNames) { InitializeComponent(); Array.Sort(entityNames); lstEntityNames.DataSource = entityNames; } private void lstEntityNames_DoubleClick(object sender, EventArgs e) { EntityName = (string)lstEntityNames.SelectedValue; DialogResult = DialogResult.OK; Close(); } } }