public static UserNameCreator getInstanse()
 {
     if (ms_instanse == null)
     {
         ms_instanse = new UserNameCreator();
         if (ms_instanse.OpenDatabase(System.IO.Path.Combine(Environment.CurrentDirectory, "SegmentDict") + System.IO.Path.DirectorySeparatorChar + "dict.mdb"))
         {
             return(ms_instanse);
         }
         else
         {
             throw new Exception("无法实例化新UserNameCreator对象!");
         }
     }
     else
     {
         return(ms_instanse);
     }
 }
 public static UserNameCreator getInstanse()
 {
     if (ms_instanse == null)
     {
         ms_instanse = new UserNameCreator();
         if (ms_instanse.OpenDatabase(System.IO.Path.Combine(Environment.CurrentDirectory, "SegmentDict") + System.IO.Path.DirectorySeparatorChar + "dict.mdb"))
         {
             return ms_instanse;
         }
         else
             throw new Exception("无法实例化新UserNameCreator对象!");
     }
     else
         return ms_instanse;
 }
Ejemplo n.º 3
0
 public virtual string GetRandomUserName()
 {
     return(UserNameCreator.getInstanse().getRandomUserName());
 }