private void backgroundWorker1_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e) { ISteps ladder = new Steps(); ladder.LogFolder = new DirectoryInfo(textBox_workfolder.Text); ladder.LogEnabled = checkBox_log.Checked; var step = (int)e.Argument; if (step == 1) { int sidst = ladder.GetDaisyXML(new FileInfo(textBox_workfolder.Text + @"\dataextract"), Convert.ToInt16(textBox_sidsthentet.Text)); ApexSettings.UpdateApexSetting("sidsthentet", sidst.ToString()); } if (step == 2) { ladder.TransformDaisy2APEX(new DirectoryInfo(textBox_workfolder.Text), new DirectoryInfo(textBox_outputfolder.Text)); } if (step == 3) ladder.ValidateAPEXFile(new FileInfo(textBox_outputfolder.Text + @"\" + textBox_sidsthentet.Text)); if (step == 4) PackFiles(); }