Ahoj,
může mi prosím někdo poradit, proc se mi v kodu nize nerozjede ProgressBar?
Diky za odpověď.
private void button1_Click(object sender, EventArgs e)
{
progressBar1.Style = ProgressBarStyle.Marquee;
progressBar1.MarqueeAnimationSpeed = 100;
if (ComboBox1.SelectedIndex != -1)
{
List<object> Arguments = new List<object>();
Arguments.Add(ComboBox.SelectedItem);
Arguments.Add(TextBox.Text);
Arguments.Add(TextBox.Text);
backgroundWorker1.RunWorkerAsync(Arguments);
}
}
private void DoWork(object sender, DoWorkEventArgs e)
{
List<object> GenericList = (List<object>)e.Argument;
Object object = (Glass)GenericList[0];
int cislo = GenericList[2].ToString() == string.Empty ? 1 : Convert.ToInt32(GenericList[2]);
double jinecislo = GenericList[1].ToString() == string.Empty ? 0 : Convert.ToDouble(GenericList[1]);
e.Result = Class2.Calculate(object, cislo, druhecislo);
}
private void RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
DataGridView.DataSource = (DataTable)e.Result;
progressBar1.MarqueeAnimationSpeed = 0;
}