예제 #1
0
 private void LoadAndBindNumbers()
 {
     tslblLotteryName.Text = string.Format("Loading {0}'s numbers from file", cbxLotteries.SelectedText);
     lottery = CreateLottery(cbxLotteries.SelectedIndex);
     toolStripProgressBar.Value = 0;
     lottery.LoadNumbers(toolStripProgressBar);
     lottery.Bind(dgvDrawings, bindingSource);
     gbxSpecialNumber.Text      = lottery.ColumnSpecs.GetColumSpec(ColumnHeader.SpecialNumber.ToString()).Header;
     gbxSpecialPlay.Text        = lottery.ColumnSpecs.GetColumSpec(ColumnHeader.SpecialPlay.ToString()).Header;
     tslblLotteryName.Text      = string.Empty;
     toolStripProgressBar.Value = 0;
     UpdateNumberOccurrences();
     CleanGeneratedNumbers();
 }
예제 #2
0
 private void BtnGenerate_Click(object sender, EventArgs e)
 {
     lottery.Bind(dgvGenerated, bindingGenerated, lottery.Generate(1, (int)nudTotalDrawings.Value));
 }