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(); }
private void BtnGenerate_Click(object sender, EventArgs e) { lottery.Bind(dgvGenerated, bindingGenerated, lottery.Generate(1, (int)nudTotalDrawings.Value)); }