it's my first time to write a windows service,and some codes are from internet.