Click here to Skip to main content
15,895,606 members
Home / Discussions / C#
   

C#

 
QuestionCreate a discussion forum using C# Pin
alan20090914-Nov-09 2:56
alan20090914-Nov-09 2:56 
AnswerRe: Create a discussion forum using C# Pin
The Man from U.N.C.L.E.14-Nov-09 3:47
The Man from U.N.C.L.E.14-Nov-09 3:47 
GeneralRe: Create a discussion forum using C# Pin
OriginalGriff14-Nov-09 5:50
mveOriginalGriff14-Nov-09 5:50 
QuestionTaskDialog problem Pin
Jassim Rahma14-Nov-09 2:53
Jassim Rahma14-Nov-09 2:53 
AnswerRe: TaskDialog problem Pin
Luc Pattyn14-Nov-09 2:58
sitebuilderLuc Pattyn14-Nov-09 2:58 
GeneralRe: TaskDialog problem Pin
Jassim Rahma14-Nov-09 3:02
Jassim Rahma14-Nov-09 3:02 
GeneralRe: TaskDialog problem Pin
Dave Kreskowiak14-Nov-09 11:01
mveDave Kreskowiak14-Nov-09 11:01 
QuestionWindows 7 preview and white space Pin
SimpleData14-Nov-09 2:24
SimpleData14-Nov-09 2:24 
AnswerRe: Windows 7 preview and white space Pin
Luc Pattyn14-Nov-09 2:54
sitebuilderLuc Pattyn14-Nov-09 2:54 
GeneralRe: Windows 7 preview and white space Pin
SimpleData14-Nov-09 3:18
SimpleData14-Nov-09 3:18 
GeneralRe: Windows 7 preview and white space Pin
Luc Pattyn14-Nov-09 3:22
sitebuilderLuc Pattyn14-Nov-09 3:22 
GeneralRe: Windows 7 preview and white space Pin
SimpleData14-Nov-09 5:20
SimpleData14-Nov-09 5:20 
QuestionPrevent My Email go to bulk Pin
mahdi_h8414-Nov-09 0:28
mahdi_h8414-Nov-09 0:28 
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 

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.