public FrmBet_11x5(string lname) { InitializeComponent(); this.BackgroundImage = global::LotteryGameApp.Properties.Resources.bg; this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.Text = lname + "十一选五"; lblLname.Text = this.Text; switch (lname) { case "山东": lottery = EntitiesTool.GetLotteryDic()["sd11x5"]; lblLname2.Text = string.Format(lblLname2.Text, "SHANDONG", 10, 87); break; case "江西": lblLname2.Text = string.Format(lblLname2.Text, "JIANGXI", 10, 84); lottery = EntitiesTool.GetLotteryDic()["jx11x5"]; break; case "广东": lblLname2.Text = string.Format(lblLname2.Text, "GUANGDONG", 10, 84); lottery = EntitiesTool.GetLotteryDic()["gd11x5"]; break; case "多乐": lottery = EntitiesTool.GetLotteryDic()["1m_11x5"]; lblLname2.Text = string.Format(lblLname2.Text, "DUOLE", lottery.BetweenMinute, lottery.ExceptOneDay); break; } }
private void btnStart_Click(object sender, EventArgs e) { if (dgvLottery.SelectedRows.Count > 0) { lblLNo.Text = "*,*,*,*,*"; Lottery = EntitiesTool.GetLotteryDic()[dgvLottery.SelectedRows[0].Cells["LotteryCode"].Value.ToString()]; LotteryOpenOffcialInfoDAL.InitialTodayInfo(Lottery); NextExcept = LotteryOpenOffcialInfoDAL.NextOpenNo(Lottery.Id); gbLotteryInfo.Text = string.Format("{0} 第XXX期 开奖号码", Lottery.LotteryName); if (NextExcept != null) { tsRemainderTime = NextExcept.ScheduleOpenTime - EntitiesTool.GetDateTimeNow(); gbLotteryTime.Text = string.Format("距离{0}期开奖", NextExcept.Expect); lblYKJH.Text = "预开奖号:" + NextExcept.ScheduleOpenCode; LastExcept = LotteryOpenInfoDAL.LastOpenNo(Lottery.Id); if (LastExcept != null) { gbLotteryInfo.Text = string.Format("{0} 第{1}期 开奖号码", Lottery.LotteryName, LastExcept.Expect); lblLNo.Text = LastExcept.OpenCode; } btnStart.Enabled = false; } } }
private void dgvLottery_CellClick(object sender, DataGridViewCellEventArgs e) { Lottery = EntitiesTool.GetLotteryDic()[dgvLottery.SelectedRows[0].Cells["LotteryCode"].Value.ToString()]; }