how can i add the serial number function to my project
and that serial could acces for one time like any professional software
Generating a serial number isn't enough; one needs to be able to validate it. That means that you'd need a number that contains a hash, a number that can be calculated, or a number (or sequence of letters) that can be tracked (say, using a database).
If you're unsure what to do, google for "Licensing example C#".