示例#1
0
 public MyIIdentity(string name, string password)
 {
     if (IsValidNameAndPassword(name, password))
     {
         nameValue          = name;
         authenticatedValue = true;
         roleValue          = Microsoft.VisualBasic.ApplicationServices.BuiltInRole.Administrator;
     }
     else
     {
         nameValue          = "";
         authenticatedValue = false;
         roleValue          = Microsoft.VisualBasic.ApplicationServices.BuiltInRole.Guest;
     }
 }
示例#2
0
 public SampleIIdentity(string name, string password)
 {
     // The name is not case sensitive, but the password is.
     if (IsValidNameAndPassword(name, password))
     {
         nameValue          = name;
         authenticatedValue = true;
         roleValue          = Microsoft.VisualBasic.ApplicationServices.BuiltInRole.Administrator;
     }
     else
     {
         nameValue          = "";
         authenticatedValue = false;
         roleValue          = Microsoft.VisualBasic.ApplicationServices.BuiltInRole.Guest;
     }
 }