Esempio n. 1
0
 public int Enter(User user)
 {
     var requestId = Interlocked.Increment(ref freeRequestId);
     pendingInRequests.InQueue(
         new Cortege3<IClientCallback, RequestCode, List<object>>(
             OperationContext.Current.GetCallbackChannel<IClientCallback>(), RequestCode.Enter,
             new List<object> {requestId, user}), lockTimeout);
     return requestId;
 }
Esempio n. 2
0
 public void SetUser(User user)
 {
     var values = new List<Cortege2<string, string>>();
     values.Add(new Cortege2<string, string>("ID", user.ID.ToString()));
     values.Add(new Cortege2<string, string>("Логин", user.Login));
     values.Add(new Cortege2<string, string>("Фамилия", user.Surname));
     values.Add(new Cortege2<string, string>("Имя", user.Name));
     values.Add(new Cortege2<string, string>("Отчество", user.Patronym));
     values.Add(new Cortege2<string, string>("Title", user.Title));
     values.Add(new Cortege2<string, string>("О себе", user.Description));
     userInfoFastGrid.DataBind(values);
 }
Esempio n. 3
0
 public RoomForm(int userId)
 {
     InitializeComponent();
     ownerComboBox.Items.Add(new User {Name = "(нет)", ID = 0});
     foreach (var user in AllUsers.Instance.GetAllUsers())
         ownerComboBox.Items.Add(user);
     currentUser = AllUsers.Instance.GetAllUsers().FirstOrDefault(u => u.ID == userId);
     if (currentUser == null)
         return;
     ownerComboBox.SelectedItem = currentUser;
     var admin = ((int) currentUser.RoleMask & (int) UserRole.Administrator) != 0;
     if (admin)
     {
         ownerComboBox.Enabled = true;
         isBoundCheckBox.Enabled = true;
     }
 }
Esempio n. 4
0
 public ServerUser(User user)
     : base(user)
 {
 }
Esempio n. 5
0
 public int Enter(User user)
 {
     currentUserId = user.ID;
     return chatSender.Enter(user);
 }
Esempio n. 6
0
 public User(User user)
     : this((PlatformUser)user)
 {
 }