backgroundworker - Background worker within a function in c# wpf -
I have made a simple GUI in C # YPF (sorry I can not show a GUI because my reputation is below 10). This includes rich text boxes and some other controls umm ... read this application a file When reading the file while using a background worker, the file content will appear in the Rich Textbox line from the line. The function that reads the file is like this: public int parse_persoFile2 (string fname, backgroundWorker worker, DoWorkEventArgs e) {if (fname == null) return -1; System.IO.StreamReader ifs; Ifs = new system. IO.StreamRender (FNN); Int max = (int) e.Argument; Int p = 0; While (ifs.Peek ()! = -1) {string tempData = ifs.ReadLine (); If (tempData.Contains ("CMD = 5107") || tempData.Contains ("CMD = 5106") || tempData.Contains ("CMD = 5102")) {//field.AppendText (tempData.Remove (tempData final Index ('\\'). Remove (0, 4) + "\ r \ n"); //field.AppendText("--------\r\n "); //System.Threading .hread.Sleep (500); St...