public ForumUser(uint siteId, ushort forumId, uint userId, UserKind userKind) { _siteId = siteId; _forumId = forumId; _userId = userId; _userKind = userKind; }
public UserInfo(Guid userId, string userName, UserKind kind, Int64 altUserId) { UserId = userId; UserName = userName; Kind = kind; AltUserId = altUserId; Key = GetKey(UserId, AltUserId); }
public UserInfo(Guid userId, string userName, UserKind kind, Int64 altUserId) { UserId = userId; UserName = userName; Kind = kind; AltUserId = altUserId; Key = UserId + "/" + AltUserId; }
public User(string id, UserKind kind, string address, List <Goods> goodses, List <Coupon> coupons) { Id = id; Kind = kind; Address = address; GoodsList = goodses; CouponList = coupons; }
public static UserInfo Create(UserKind kind, Guid? userId, Int64? altUserId, string userName) { switch(kind) { case UserKind.System: return System; case UserKind.Anonymous: return Anonymous; default: Util.Check(!string.IsNullOrWhiteSpace(userName), "UserName may not be empty."); Util.Check(userId != null || altUserId != null, "Either UserId or AltUserId must not be null or empty."); var guidUserId = userId == null ? BlankUserId : userId.Value; var intAltUserId = altUserId == null ? BlankAltUserId : altUserId.Value; return new UserInfo(guidUserId, userName, UserKind.AuthenticatedUser, intAltUserId); } }
private void AddUser(UserKind userKind) { AddUser addUser = new AddUser(); addUser._Kind = (int)userKind; if (addUser.ShowDialog() == DialogResult.OK) { MessageBox.Show("设置成功."); _isUpdateUserList = true; RefreshUserList(); } }
public User(int id, string email, string nickname, string password, UserKind type, UserStatus status, UserRole role, string photo, string signature, double joinedTime, double?lastModifiedTime) { Id = id; Email = email; Nickname = nickname; Password = password; Type = type; Status = status; Role = role; Photo = photo; Signature = signature; JoinedTime = joinedTime; LastModifiedTime = lastModifiedTime; }
public static UserInfo Create(UserKind kind, Guid?userId, Int64?altUserId, string userName) { switch (kind) { case UserKind.System: return(System); case UserKind.Anonymous: return(Anonymous); default: Util.Check(!string.IsNullOrWhiteSpace(userName), "UserName may not be empty."); Util.Check(userId != null || altUserId != null, "Either UserId or AltUserId must not be null or empty."); var guidUserId = userId == null ? BlankUserId : userId.Value; var intAltUserId = altUserId == null ? BlankAltUserId : altUserId.Value; return(new UserInfo(guidUserId, userName, UserKind.AuthenticatedUser, intAltUserId)); } }
public string GetWithTwoEnumParameters([FromUri] UserKind level, UserKind kind) { return(level.ToString() + kind.ToString()); }
public string GetWithEnumParameter(UserKind scope) { return(scope.ToString()); }
private void Main_Load(object sender, EventArgs e) { // 2014-02-25: GreenRose //if (p2pAVServer == null) p2pAVServer = new P2PAVServer(54); //p2pAVServer.Start(); // menu initialize UserKind userKind = (UserKind)Users.ManagerInfo.Kind; if (Users.ManagerInfo.Kind != (int)UserKind.Manager) { menuStrip1.Items.Remove(EnvMenus); menuStrip1.Items.Remove(mailboxToolStripMenuItem); UserMenus.DropDownItems.Remove(AutoMenuItem); if (userKind != UserKind.RecommendOfficer) { UserMenus.DropDownItems.Remove(FirstBuyerMenuItem); menuStrip1.Items.Remove(GameMenus); } if (userKind != UserKind.ServiceOfficer) { menuStrip1.Items.Remove(RoomMenus); } if (userKind != UserKind.Banker) { menuStrip1.Items.Remove(ChargeMenus); } } //// server initialize //IniFileEdit serverIni = new IniFileEdit(AppDomain.CurrentDomain.BaseDirectory + "\\server.ini"); //string port = serverIni.GetIniValue("Chatting", "TcpPort"); //Server server = Server.GetInstance(); //server.AttachHandler(Users.GetInstance().NotifyOccured); //server.AttachHandler(Chat.GetInstance().NotifyOccured); //server.AttachHandler(Game.GetInstance().NotifyOccured); //server.Connect("127.0.0.1", port); // udp initialize //UdpServerClient udpServer = UdpServerClient.GetInstance(); //udpServer.AttachUdpHandler(Chat.GetInstance().NotifyUdpOccured); //udpServer.Connect(_TcpPort, 1); // timer timer1.Enabled = true; // show if (Users.ManagerInfo.Kind == (int)UserKind.Manager) { _View.MdiParent = this; _View.Show(); _LogView.MdiParent = this; _LogView.Show(); _ErrorView.MdiParent = this; _ErrorView.Show(); _TotalView.MdiParent = this; _TotalView.Show(); } }
public string GetWithTwoEnumParameters([FromUri]UserKind level, UserKind kind) { return level.ToString() + kind.ToString(); }
public string GetWithEnumParameter(UserKind scope) { return scope.ToString(); }