Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

I want my GUI to be responsive even if the app is waiting for a temperature to be set. I guess I should be using some callback or async function but I'm not sure how and which function to use.

 

This is my idea of work flow

' Set temp +60°
' Wait for temperature to be stable
while temp>-20°
  ' Do Magic!

   ' Order temp Change -2°

   ' Wait for temperature to be stable

loop

There are two places in the loop where I need to wait, the first where I wait for the referece temperature to change and the second where I need to wait until the our temperature sensor reports a stable temperature.

 

Any help appreciated!

TIA

/Kejpa

Posted

Threads

 

Hi,

 

Not sure whether this really helps u. You can use the Threading in .net to do the same. If you search in this forum or in internet you will find examples of threading.

 

I am sorry i cannot search now and give a ready example but you can find it over the internet.

 

Regards

Yashasvi

Posted

Another possibility might be to set up a custom event to fire when you receive a temperature update. an OnTemperatureUpdate event or something.

 

How is your app receiving updates? Is it user input? Real time from an external device (digital thermometer)?

Posted

Thank you all for bearing with me....

Of course I should raise an event in the class where the temp is measured and have it in a separate thread.

 

I must have been really tired yesterday....

 

Thanx a bunch!

 

/Kejpa

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...