private void LoadKeys() { keyBox.Items.Clear(); List <string> items = new List <string>(); foreach (UI.Keys.Key key in keys.ToArray()) { items.Add(key.alias); } if (items.Count > 0) { keyBox.Items.AddRange(items.ToArray()); keyBox.SelectedIndex = 0; } }
private void LoadKeys() { UI.Win32.SuspendDrawing(this); keyList.Items.Clear(); List <ListViewItem> items = new List <ListViewItem>(); ListViewItem item; foreach (UI.Keys.Key key in keys.ToArray()) { item = new ListViewItem(key.alias); item.SubItems.Add(key.key.ToHex()); items.Add(item); } keyList.Items.AddRange(items.ToArray()); items.Clear(); UI.Win32.ResumeDrawing(this); }