private void BtnIn_Click(object sender, EventArgs e) { if (AwardSel.SelectedIndex < 0) return; int i = AwardSel.SelectedIndex; switch (Awardarr[i, 1]) { case "1": FrmAwardLucky1 Award1 = new FrmAwardLucky1(); Award1.PhotoBGImage = "\\images\\" + Awardarr[i, 2]; Award1.ShowAward = Awardarr[i, 0]; Award1.ShowDialog(); break; case "5": FrmAwardLucky5 Award5 = new FrmAwardLucky5(); Award5.PhotoBGImage = "\\images\\" + Awardarr[i, 2]; Award5.ShowAward = Awardarr[i, 0]; Award5.ShowDialog(); break; case "10": FrmAwardLucky10 Award10 = new FrmAwardLucky10(); Award10.PhotoBGImage = "\\images\\" + Awardarr[i, 2]; Award10.ShowAward = Awardarr[i, 0]; Award10.ShowDialog(); break; case "20": FrmAwardLucky20 Award20 = new FrmAwardLucky20(); Award20.PhotoBGImage = "\\images\\" + Awardarr[i, 2]; Award20.ShowAward = Awardarr[i, 0]; Award20.ShowDialog(); break; case "100": //系统设置 FrmSetup Frmsetup = new FrmSetup(); Frmsetup.ShowDialog(); break; case "101": //查看奖池 FrmSeed FrmSeed = new FrmSeed(); FrmSeed.ShowDialog(); break; case "102": //中奖者名单 FrmAwardList FrmAwardList = new FrmAwardList(); FrmAwardList.ShowDialog(); break; case "103": //中奖者名单 if (MessageBox.Show("确定要退出吗?", "退出确认", MessageBoxButtons.YesNo) == DialogResult.Yes) { System.Environment.Exit(0); } break; } }
private void BtnIn_Click(object sender, EventArgs e) { if (AwardSel.SelectedIndex < 0) { return; } int i = AwardSel.SelectedIndex; switch (Awardarr[i, 1]) { case "1": FrmAwardLucky1 Award1 = new FrmAwardLucky1(); Award1.PhotoBGImage = "\\images\\" + Awardarr[i, 2]; Award1.ShowAward = Awardarr[i, 0]; Award1.ShowDialog(); break; case "5": FrmAwardLucky5 Award5 = new FrmAwardLucky5(); Award5.PhotoBGImage = "\\images\\" + Awardarr[i, 2]; Award5.ShowAward = Awardarr[i, 0]; Award5.ShowDialog(); break; case "10": FrmAwardLucky10 Award10 = new FrmAwardLucky10(); Award10.PhotoBGImage = "\\images\\" + Awardarr[i, 2]; Award10.ShowAward = Awardarr[i, 0]; Award10.ShowDialog(); break; case "20": FrmAwardLucky20 Award20 = new FrmAwardLucky20(); Award20.PhotoBGImage = "\\images\\" + Awardarr[i, 2]; Award20.ShowAward = Awardarr[i, 0]; Award20.ShowDialog(); break; case "100": //系统设置 FrmSetup Frmsetup = new FrmSetup(); Frmsetup.ShowDialog(); break; case "101": //查看奖池 FrmSeed FrmSeed = new FrmSeed(); FrmSeed.ShowDialog(); break; case "102": //中奖者名单 FrmAwardList FrmAwardList = new FrmAwardList(); FrmAwardList.ShowDialog(); break; case "103": //中奖者名单 if (MessageBox.Show("确定要退出吗?", "退出确认", MessageBoxButtons.YesNo) == DialogResult.Yes) { System.Environment.Exit(0); } break; } }