MTSkull
Centurion
I have written a program that is kind of a wrapper for a low level program.
The Heirarchie looks something like this.
Batch file for USB port
Calls EEprom Loader
Calls Errorlevel Processor (C#)
C# GUI
Calls Bat Files for 4 usb ports in order
The gui program monitors the process to see when the eeprom loader has finished, when it has finished it reads the text files created by the Errorlevel processor, displays the results then runs the next bat file. The problem I am having is when the GUI detects that the loader has finished and starts the next batch file it should update its display to show what happened and to tell the user it has started on the next port. What happens is the gui losses focus and then never updates until the test has finished. Despite my having put this.update in the loop. The Gui window gets pushed to the back after the eeprom loader starts, so... Do i need to set the gui window to top to get it to continue updating or can I push it to the top at the end of its loop so it will update and then let it fall back down after the next loader starts.
Hopefully this is not clear as mud.
MT
The Heirarchie looks something like this.
Batch file for USB port
Calls EEprom Loader
Calls Errorlevel Processor (C#)
C# GUI
Calls Bat Files for 4 usb ports in order
The gui program monitors the process to see when the eeprom loader has finished, when it has finished it reads the text files created by the Errorlevel processor, displays the results then runs the next bat file. The problem I am having is when the GUI detects that the loader has finished and starts the next batch file it should update its display to show what happened and to tell the user it has started on the next port. What happens is the gui losses focus and then never updates until the test has finished. Despite my having put this.update in the loop. The Gui window gets pushed to the back after the eeprom loader starts, so... Do i need to set the gui window to top to get it to continue updating or can I push it to the top at the end of its loop so it will update and then let it fall back down after the next loader starts.
Hopefully this is not clear as mud.
MT
C#:
//Pseudoish code of what I am doing
for(int x=1;x<=4;x++)
{
Process.Start("USB"+x.tostring()+".bat");
BatRunning = true
While (BatRunning==true)
{
activeProcesses = Process.GetProcessesByName("cprogcfz");
if (activeProcesses.GetUpperBound(0) < 0)
break;
Thread.sleep(500);
}
this.label.text = TestResult;
this.update;
}
//Obviosly this psuedo code will not work but will hopefully give you an idea of what i am doing without posting miles of code.