I've changed code from the MainWindo.cs to start thread automatically after running the application.