Click here to Skip to main content
15,887,027 members
Home / Discussions / C#
   

C#

 
AnswerRe: Prevent My Email go to bulk Pin
Dave Kreskowiak14-Nov-09 1:46
mveDave Kreskowiak14-Nov-09 1:46 
GeneralRe: Prevent My Email go to bulk Pin
mahdi_h8414-Nov-09 1:59
mahdi_h8414-Nov-09 1:59 
GeneralRe: Prevent My Email go to bulk Pin
Not Active14-Nov-09 2:13
mentorNot Active14-Nov-09 2:13 
GeneralRe: Prevent My Email go to bulk Pin
Dave Kreskowiak14-Nov-09 10:55
mveDave Kreskowiak14-Nov-09 10:55 
GeneralRe: Prevent My Email go to bulk Pin
mahdi_h8414-Nov-09 18:49
mahdi_h8414-Nov-09 18:49 
GeneralRe: Prevent My Email go to bulk Pin
mahdi_h8414-Nov-09 21:16
mahdi_h8414-Nov-09 21:16 
GeneralRe: Prevent My Email go to bulk Pin
Dave Kreskowiak15-Nov-09 10:48
mveDave Kreskowiak15-Nov-09 10:48 
QuestionUpdating weather using Threading Pin
Etienne_12314-Nov-09 0:28
Etienne_12314-Nov-09 0:28 
Hi people

I'm using a web service to display the current weather on my main interface. At the moment I have to click a button everytime I want to update the weather, and while this is updating, my interface stalls for however long it takes to update which is usually 5 seconds. What I want to know is, is there a way to have this running on a separate thread without clicking a button and have it update continuously while still being able to work with the main interface?

Here is the code I use to update the current temperature:

string strTemperature = "";

GlobalWeatherService.GlobalWeatherSoapClient proxy = new aXYZ.GlobalWeatherService.GlobalWeatherSoapClient("GlobalWeatherSoap12", "http://www.webservicex.net/globalweather.asmx");

string weatherXml = proxy.GetWeather("Port Elizabeth", "South Africa");

StringReader reader = new StringReader(weatherXml);
XmlReader readerXml = XmlReader.Create(reader);
XmlDocument weatherXmlDoc = new XmlDocument();
weatherXmlDoc.Load(readerXml);

for (int i = 0; i < weatherXmlDoc.ChildNodes.Count; i++)
{
     for (int j = 0; j < weatherXmlDoc.ChildNodes[i].ChildNodes.Count; j++)
     {
          if (weatherXmlDoc.ChildNodes[i].ChildNodes[j].Name == "Temperature")
               strTemperature = weatherXmlDoc.ChildNodes[i].ChildNodes[j].InnerText;
     }
}

lblTemperature.Content = strTemperature;

AnswerRe: Updating weather using Threading Pin
kstls14-Nov-09 0:48
kstls14-Nov-09 0:48 
GeneralRe: Updating weather using Threading Pin
Etienne_12314-Nov-09 1:38
Etienne_12314-Nov-09 1:38 
AnswerRe: Updating weather using Threading Pin
Luc Pattyn14-Nov-09 2:09
sitebuilderLuc Pattyn14-Nov-09 2:09 
JokeRe: Updating weather using Threading Pin
Mycroft Holmes14-Nov-09 2:21
professionalMycroft Holmes14-Nov-09 2:21 
GeneralRe: Updating weather using Threading Pin
Luc Pattyn14-Nov-09 3:00
sitebuilderLuc Pattyn14-Nov-09 3:00 
AnswerRe: Updating weather using Threading [modified] Pin
Etienne_12314-Nov-09 2:33
Etienne_12314-Nov-09 2:33 
QuestionTypeAhead Pin
sparlay_pk13-Nov-09 22:56
sparlay_pk13-Nov-09 22:56 
AnswerRe: Ignore CrossPost Pin
kstls14-Nov-09 0:39
kstls14-Nov-09 0:39 
GeneralRe: Ignore CrossPost Pin
sparlay_pk14-Nov-09 0:56
sparlay_pk14-Nov-09 0:56 
GeneralRe: Ignore CrossPost Pin
kstls14-Nov-09 1:07
kstls14-Nov-09 1:07 
QuestionTABPAGE Pin
sachees12313-Nov-09 20:16
sachees12313-Nov-09 20:16 
AnswerRe: TABPAGE Pin
Shameel13-Nov-09 21:26
professionalShameel13-Nov-09 21:26 
AnswerRe: TABPAGE Pin
OriginalGriff13-Nov-09 21:56
mveOriginalGriff13-Nov-09 21:56 
GeneralRe: TABPAGE Pin
sachees12313-Nov-09 22:27
sachees12313-Nov-09 22:27 
GeneralRe: TABPAGE Pin
OriginalGriff13-Nov-09 23:36
mveOriginalGriff13-Nov-09 23:36 
GeneralRe: TABPAGE Pin
sachees12314-Nov-09 20:43
sachees12314-Nov-09 20:43 
GeneralRe: TABPAGE Pin
OriginalGriff14-Nov-09 21:51
mveOriginalGriff14-Nov-09 21:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.