V
VJ
The below 2 func is in my Main Form..
public static void Main() {
object Arr;
ThreadPool.QueueUserWorkItem(new WaitCallback(GetLatestRptData),Arr);
}
private void GetLatestRptData(object Arr1)
{
'Check update Report XML file (data1.xml).. in a location
}
After the main Form loads I display a summary page. Then the user has a
button on the summary which they can click to go to the detail page. When
the Detail Page loads it will read data1.xml. If the thread has not
completed on the main Form load & is still updating the data1.xml, I would
want to wait for the Detail page to wait & then read the data1.xml. How do I
accomplish this? Can somebody give me a skeleton of Functions that indicates
the communcication. I know i need to use AutoResetEvent, but sure of how to
place the functions
Thanks
public static void Main() {
object Arr;
ThreadPool.QueueUserWorkItem(new WaitCallback(GetLatestRptData),Arr);
}
private void GetLatestRptData(object Arr1)
{
'Check update Report XML file (data1.xml).. in a location
}
After the main Form loads I display a summary page. Then the user has a
button on the summary which they can click to go to the detail page. When
the Detail Page loads it will read data1.xml. If the thread has not
completed on the main Form load & is still updating the data1.xml, I would
want to wait for the Detail page to wait & then read the data1.xml. How do I
accomplish this? Can somebody give me a skeleton of Functions that indicates
the communcication. I know i need to use AutoResetEvent, but sure of how to
place the functions
Thanks