🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
``` private void listView1_SelectedIndexChanged_1(object sender, EventArgs e) { //selected item changed if (listView1.SelectedItems.Count != 0) { int num = listView1.Items.IndexOf(listView1.SelectedItems[0]); string file = listView1.Items[num].SubItems[0].Text; if (file != "") { pictureBox2.Load(listView1.SelectedItems[0].SubItems[0].Text); switch (cbBackcolor.Text) { case "默认": pictureBox2.BackColor = Color.Black; break; case "粉红": pictureBox2.BackColor = Color.OrangeRed; break; case "绿色": pictureBox2.BackColor = Color.ForestGreen; break; case "纯黑": pictureBox2.BackColor = Color.Black; break; case "内景": pictureBox2.BackColor = Color.CornflowerBlue; break; case "儿童": pictureBox2.BackColor = Color.Cyan; break; default: pictureBox2.BackColor = Color.Black; break; } } } } ```