private void SetPlayer() { FormKey frm = new FormKey(deviceTypes[comboBox_device.SelectedIndex], deviceGuides[comboBox_device.SelectedIndex], listView1.SelectedItems[0].Text); frm.Location = new Point(this.Parent.Parent.Parent.Location.X + this.Parent.Parent.Location.X + button2.Location.X, this.Parent.Parent.Parent.Location.Y + this.Parent.Parent.Location.Y + button2.Location.Y + 30); if (frm.ShowDialog(this) == DialogResult.OK) { listView1.SelectedItems[0].SubItems[1].Text = frm.InputName; } }
private void SetAllPlayer() { for (int i = 0; i < listView1.Items.Count; i++) { FormKey frm = new FormKey(devices[comboBox_device.SelectedIndex].Type, devices[comboBox_device.SelectedIndex].InstanceGuid.ToString(), listView1.Items[i].Text); frm.Location = new Point(this.Parent.Parent.Parent.Location.X + this.Parent.Parent.Location.X + button3.Location.X, this.Parent.Parent.Parent.Location.Y + this.Parent.Parent.Location.Y + button3.Location.Y + 30); if (frm.ShowDialog(this) == DialogResult.OK) { listView1.Items[i].SubItems[1].Text = frm.InputName; } else { break; } } }
private void SetAllPlayer() { for (int i = 0; i < listView1.Items.Count; i++) { FormKey frm = new FormKey(deviceTypes[comboBox_device.SelectedIndex], deviceGuides[comboBox_device.SelectedIndex], listView1.Items[i].Text); frm.Location = new Point(this.Parent.Parent.Parent.Location.X + this.Parent.Parent.Location.X + button3.Location.X, this.Parent.Parent.Parent.Location.Y + this.Parent.Parent.Location.Y + button3.Location.Y + 30); if (frm.ShowDialog(this) == DialogResult.OK) { listView1.Items[i].SubItems[1].Text = frm.InputName; } else { break; } } }