public void UpdateGuiWithList(List<CustomItemClass> itemList) { CustomItemClass listItems = new CustomItemClass(); List<CustomItemClass> itemList1 = new List<CustomItemClass>(); itemList1 = listItems.GetCustomItemList(); this.comboBox1.DataSource = itemList1; this.comboBox1.DisplayMember = "Name"; this.comboBox1.ValueMember = "Guid"; }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); // // need to populate comboBox1 from here // CustomItemClass customItem = new CustomItemClass(); List<CustomItemClass> itemList = new List<CustomItemClass>(); itemList = customItem.GetCustomItemList(); customItem.UpdateGuiWithList(itemList); }