public RegionStartStop(GuiApplication app) { InitializeComponent(); m_App = app; RegionList.View = View.Details; var regionData = (Dictionary <string, string>)m_App.m_GetData?.Invoke("region-id-name-pairs"); var regionEnabled = (string[])m_App.m_GetData?.Invoke("region-ids/enabled"); var regionOnline = (string[])m_App.m_GetData?.Invoke("region-ids/online"); foreach (KeyValuePair <string, string> kvp in regionData) { ListViewItem item = new ListViewItem { Text = kvp.Key }; item.SubItems.Add(new ListViewItem.ListViewSubItem(item, kvp.Value)); item.SubItems.Add(new ListViewItem.ListViewSubItem(item, regionOnline.Contains(kvp.Key) ? "Yes" : "No")); item.SubItems.Add(new ListViewItem.ListViewSubItem(item, regionEnabled.Contains(kvp.Key) ? "Yes" : "No")); RegionList.Items.Add(item); } RegionList.Refresh(); }