Update frmPrincipal.cs

update the protection of code.