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; }
public virtual string GetRandomUserName() { return(UserNameCreator.getInstanse().getRandomUserName()); }