示例#1
0
 private void AddNewUserCommand()
 {
     if (Users.Contains(NewUser))
     {
         OutputMessages.Add(new OutputMessage {
             Message = NewUser + " is already registered!", Level = "error"
         });
         _loggerService.Write(this, NewUser + " is already registered!", "error");
     }
     else
     {
         _loggerService.Write(this, "Add started", "debug");
         _dbService.AddUser(NewUser);
         _loggerService.Write(this, NewUser + " added!", "debug");
         OutputMessages.Add(new OutputMessage {
             Message = NewUser + " added!", Level = ""
         });
         Users.Add(NewUser);
     }
 }