using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;namespace beyond_联动_
{public partial class Form1 : Form{public Form1(){InitializeComponent();comboBox1.Items.Add("我玩中路,谢谢");//0comboBox1.Items.Add("我玩射手,谢谢");//1comboBox1.Items.Add("我玩上路,谢谢");//2comboBox1.Items.Add("我玩打野,谢谢");//3comboBox1.Items.Add("我玩辅助,谢谢");//4}private void comboBox1_SelectedIndexChanged(object sender, EventArgs e){string a =comboBox1.SelectedItem.ToString();if (a=="我玩中路,谢谢"){comboBox2.Items.Clear();comboBox2.Items.Add("甄姬");comboBox2.Items.Add("小乔");comboBox2.Items.Add("上官婉儿");comboBox2.Items.Add("干将莫邪");comboBox2.Items.Add("墨子");}else if (a=="我玩射手,谢谢"){comboBox2.Items.Clear();comboBox2.Items.Add("后裔");comboBox2.Items.Add("鲁班七号");comboBox2.Items.Add("马可波罗");comboBox2.Items.Add("公孙离");comboBox2.Items.Add("孙尚香");}else if (a=="我玩上路,谢谢"){comboBox2.Items.Clear();comboBox2.Items.Add("白起");comboBox2.Items.Add("夏侯惇");comboBox2.Items.Add("狂铁");comboBox2.Items.Add("猪八戒");comboBox2.Items.Add("吕布");}else if (a=="我玩打野,谢谢"){comboBox2.Items.Clear();comboBox2.Items.Add("李白");comboBox2.Items.Add("韩信");comboBox2.Items.Add("玄策");comboBox2.Items.Add("露娜");comboBox2.Items.Add("耀");comboBox2.Items.Add("云中君");}else if (a=="我玩辅助,谢谢"){comboBox2.Items.Clear();comboBox2.Items.Add("瑶");comboBox2.Items.Add("张飞");comboBox2.Items.Add("廉颇");comboBox2.Items.Add("盾山");comboBox2.Items.Add("蔡文姬");}}private void comboBox2_SelectedIndexChanged(object sender, EventArgs e){string b = comboBox2.SelectedItem.ToString();if (b == "甄姬"){comboBox3.Items.Clear();comboBox3.Items.Add("冰雪圆舞曲--勇者(888)");comboBox3.Items.Add("花好人间--新春专属(488)");comboBox3.Items.Add("游园惊梦--2周年限定(限时出售)");comboBox3.Items.Add("幽恒--鼠年限定(限时出售)");}else if (b == "小乔"){comboBox3.Items.Clear();comboBox3.Items.Add("万圣前夜--伴生皮肤(288)");comboBox3.Items.Add("缤纷独角兽--史诗(888)");comboBox3.Items.Add("丁香结--勇者(限时出售)");comboBox3.Items.Add("青蛇--史诗(888)");}else if (b == "上官婉儿"){comboBox3.Items.Clear();comboBox3.Items.Add("真几把菜皮肤--传说");comboBox3.Items.Add("新年快乐皮肤--史诗");comboBox3.Items.Add("花好月圆皮肤--限定");}else if (b == "干将莫邪"){comboBox3.Items.Clear();comboBox3.Items.Add("真几把菜皮肤--传说");comboBox3.Items.Add("新年快乐皮肤--史诗");comboBox3.Items.Add("花好月圆皮肤--限定");}}private void comboBox3_SelectedIndexChanged(object sender, EventArgs e){string c = comboBox3.SelectedItem.ToString();if (c == "冰雪圆舞曲--勇者(888)"){pictureBox1.Image = Image.FromFile(@"G:\TIM\图片\mao.jpg");}else if (c == ""){pictureBox1.Image = Image.FromFile(@"G:\TIM\图片\mao.jpg");}}}
}
效果图如下: