- Timestamp:
- 07/04/19 14:47:01 (5 years ago)
- Location:
- stable
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
-
stable/HeuristicLab.Clients.Hive.Administrator
- Property svn:mergeinfo changed
/trunk/HeuristicLab.Clients.Hive.Administrator merged: 16446
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectView.cs
r17062 r17063 35 35 private readonly object locker = new object(); 36 36 37 private Guid persistedOwnerUserId;38 39 37 public new Project Content { 40 38 get { return (Project)base.Content; } 41 set { base.Content = value; persistedOwnerUserId = Content != null ? Content.OwnerUserId : Guid.Empty;}39 set { base.Content = value; } 42 40 } 43 41 … … 50 48 51 49 #region Overrides 52 protected override void OnClosing(FormClosingEventArgs e) {53 AccessClient.Instance.Refreshed -= AccessClient_Instance_Refreshed;54 AccessClient.Instance.Refreshing -= AccessClient_Instance_Refreshing;55 base.OnClosing(e);56 }57 58 50 protected override void RegisterContentEvents() { 59 51 base.RegisterContentEvents(); … … 106 98 var users = AccessClient.Instance.UsersAndGroups.OfType<LightweightUser>(); 107 99 if (!Content.ParentProjectId.HasValue) users = users.Where(x => x.Roles.Select(y => y.Name).Contains(HiveRoles.Administrator)); 108 ownerComboBox.DataSource = users.ToList(); 109 ownerComboBox.SelectedItem = users.FirstOrDefault(x => x.Id == Content.OwnerUserId); 100 var projectOwnerId = Content.OwnerUserId; 101 ownerComboBox.DataSource = users.OrderBy(x => x.UserName).ToList(); 102 ownerComboBox.SelectedItem = users.FirstOrDefault(x => x.Id == projectOwnerId); 110 103 ownerComboBox.SelectedIndexChanged += ownerComboBox_SelectedIndexChanged; 111 104 … … 180 173 var users = AccessClient.Instance.UsersAndGroups.OfType<LightweightUser>(); 181 174 if (Content != null && !Content.ParentProjectId.HasValue) users = users.Where(x => x.Roles.Select(y => y.Name).Contains(HiveRoles.Administrator)); 182 ownerComboBox.DataSource = users. ToList();175 ownerComboBox.DataSource = users.OrderBy(x => x.UserName).ToList(); 183 176 ownerComboBox.SelectedIndexChanged += ownerComboBox_SelectedIndexChanged; 184 177 }); 178 } 179 180 private void ProjectView_Disposed(object sender, EventArgs e) { 181 AccessClient.Instance.Refreshed -= AccessClient_Instance_Refreshed; 182 AccessClient.Instance.Refreshing -= AccessClient_Instance_Refreshing; 185 183 } 186 184
Note: See TracChangeset
for help on using the changeset viewer.