문제

I am developing a desktop window application. After form load, get some data from running machine and saved it to the ftp server in csv file and it shows that test completed. I want to run the same code which takes values and store on the sever after every one hour. How can i do it?

Console application and window service is not feasible solution because I have to show the form to the user etc.

도움이 되었습니까?

해결책

Use one of the timer classes that come with the BCL.

See Comparing the Timer Classes in the .NET Framework Class Library on MSDN.

Essentially you setup a timer with an interval (how often to fire, in your case every hour) and with a method to execute when it fires.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top