Index: /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/ProblemView.Designer.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/ProblemView.Designer.cs	(revision 7380)
+++ /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/ProblemView.Designer.cs	(revision 7381)
@@ -34,4 +34,5 @@
     /// </summary>
     private void InitializeComponent() {
+      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ProblemView));
       this.platformLabel = new System.Windows.Forms.Label();
       this.platformComboBox = new System.Windows.Forms.ComboBox();
@@ -40,7 +41,6 @@
       this.tabControl = new System.Windows.Forms.TabControl();
       this.usersTabPage = new System.Windows.Forms.TabPage();
-      this.usersListBox = new System.Windows.Forms.CheckedListBox();
       this.storeUsersButton = new System.Windows.Forms.Button();
-      this.refreshUsersButton = new System.Windows.Forms.Button();
+      this.problemUserView = new HeuristicLab.Clients.Access.Views.RefreshableLightweightUserView();
       this.dataTabPage = new System.Windows.Forms.TabPage();
       this.noViewAvailableLabel = new System.Windows.Forms.Label();
@@ -104,5 +104,5 @@
       this.problemClassLabel.Location = new System.Drawing.Point(3, 111);
       this.problemClassLabel.Name = "problemClassLabel";
-      this.problemClassLabel.Size = new System.Drawing.Size(81, 13);
+      this.problemClassLabel.Size = new System.Drawing.Size(76, 13);
       this.problemClassLabel.TabIndex = 7;
       this.problemClassLabel.Text = "&Problem Class:";
@@ -135,7 +135,6 @@
       // usersTabPage
       // 
-      this.usersTabPage.Controls.Add(this.usersListBox);
       this.usersTabPage.Controls.Add(this.storeUsersButton);
-      this.usersTabPage.Controls.Add(this.refreshUsersButton);
+      this.usersTabPage.Controls.Add(this.problemUserView);
       this.usersTabPage.Location = new System.Drawing.Point(4, 22);
       this.usersTabPage.Name = "usersTabPage";
@@ -146,21 +145,8 @@
       this.usersTabPage.UseVisualStyleBackColor = true;
       // 
-      // usersListBox
-      // 
-      this.usersListBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
-                  | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.usersListBox.CheckOnClick = true;
-      this.usersListBox.FormattingEnabled = true;
-      this.usersListBox.Location = new System.Drawing.Point(6, 35);
-      this.usersListBox.Name = "usersListBox";
-      this.usersListBox.Size = new System.Drawing.Size(613, 139);
-      this.usersListBox.TabIndex = 2;
-      this.usersListBox.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.usersListBox_ItemCheck);
-      // 
       // storeUsersButton
       // 
       this.storeUsersButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.PublishToWeb;
-      this.storeUsersButton.Location = new System.Drawing.Point(36, 6);
+      this.storeUsersButton.Location = new System.Drawing.Point(38, 9);
       this.storeUsersButton.Name = "storeUsersButton";
       this.storeUsersButton.Size = new System.Drawing.Size(24, 24);
@@ -170,14 +156,18 @@
       this.storeUsersButton.Click += new System.EventHandler(this.storeUsersButton_Click);
       // 
-      // refreshUsersButton
-      // 
-      this.refreshUsersButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Refresh;
-      this.refreshUsersButton.Location = new System.Drawing.Point(6, 6);
-      this.refreshUsersButton.Name = "refreshUsersButton";
-      this.refreshUsersButton.Size = new System.Drawing.Size(24, 24);
-      this.refreshUsersButton.TabIndex = 0;
-      this.toolTip.SetToolTip(this.refreshUsersButton, "Refresh Authorized Users");
-      this.refreshUsersButton.UseVisualStyleBackColor = true;
-      this.refreshUsersButton.Click += new System.EventHandler(this.refreshUsersButton_Click);
+      // problemUserView
+      // 
+      this.problemUserView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                  | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.problemUserView.Caption = "RefreshableLightweightUser View";
+      this.problemUserView.Content = null;
+      this.problemUserView.FetchSelectedUsers = null;
+      this.problemUserView.Location = new System.Drawing.Point(6, 6);
+      this.problemUserView.Name = "problemUserView";
+      this.problemUserView.ReadOnly = false;
+      this.problemUserView.Size = new System.Drawing.Size(613, 168);
+      this.problemUserView.TabIndex = 2;
+      this.problemUserView.SelectedUsersChanged += new System.EventHandler(this.problemUserView_SelectedUsersChanged);
       // 
       // dataTabPage
@@ -388,7 +378,5 @@
     private System.Windows.Forms.TabPage usersTabPage;
     private System.Windows.Forms.Button storeUsersButton;
-    private System.Windows.Forms.Button refreshUsersButton;
     private System.Windows.Forms.TabPage dataTabPage;
-    private System.Windows.Forms.CheckedListBox usersListBox;
     private System.Windows.Forms.Label dataTypeNameLabel;
     private System.Windows.Forms.GroupBox dataTypeGroupBox;
@@ -405,4 +393,5 @@
     private MainForm.WindowsForms.ViewHost dataViewHost;
     private System.Windows.Forms.Label noViewAvailableLabel;
+    private Access.Views.RefreshableLightweightUserView problemUserView;
 
   }
Index: /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/ProblemView.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/ProblemView.cs	(revision 7380)
+++ /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/ProblemView.cs	(revision 7381)
@@ -25,5 +25,4 @@
 using System.Linq;
 using System.Windows.Forms;
-using HeuristicLab.Clients.OKB.Authentication;
 using HeuristicLab.Common;
 using HeuristicLab.Core.Views;
@@ -73,5 +72,4 @@
       problemClassComboBox.SelectedValueChanged += new EventHandler(problemClassComboBox_SelectedValueChanged);
 
-      usersListBox.DataSource = null;
       data = null;
       dataViewHost.Content = null;
@@ -81,4 +79,6 @@
         dataTypeNameTextBox.Text = string.Empty;
         dataTypeTypeNameTextBox.Text = string.Empty;
+        problemUserView.Content = null;
+        problemUserView.FetchSelectedUsers = null;
       } else {
         platformComboBox.SelectedItem = platformComboBoxValues.FirstOrDefault(p => p.Id == Content.PlatformId);
@@ -86,4 +86,6 @@
         dataTypeNameTextBox.Text = Content.DataTypeName;
         dataTypeTypeNameTextBox.Text = Content.DataTypeTypeName;
+        problemUserView.Content = Access.AccessClient.Instance;
+        problemUserView.FetchSelectedUsers = new Func<List<Guid>>(delegate { return AdministrationClient.GetProblemUsers(Content.Id); });
       }
     }
@@ -94,7 +96,6 @@
       problemClassComboBox.Enabled = (Content != null) && !ReadOnly;
       dataTypeGroupBox.Enabled = (Content != null) && !ReadOnly;
-      refreshUsersButton.Enabled = (Content != null) && (Content.Id != 0);
-      storeUsersButton.Enabled = (usersListBox.DataSource != null) && !ReadOnly;
-      usersListBox.Enabled = (usersListBox.DataSource != null) && !ReadOnly;
+      problemUserView.Enabled = (problemUserView.Content != null) && !ReadOnly;
+      storeUsersButton.Enabled = (problemUserView.GetCheckedUsers() != null) && !ReadOnly;
       refreshDataButton.Enabled = (Content != null) && (Content.Id != 0);
       storeDataButton.Enabled = ((data != null) || (dataViewHost.Content != null)) && !ReadOnly;
@@ -155,25 +156,7 @@
     }
 
-    private void refreshUsersButton_Click(object sender, System.EventArgs e) {
-      try {
-        List<Guid> ids = AdministrationClient.GetProblemUsers(Content.Id);
-        if (ids != null) {
-          if (AuthenticationClient.Instance.Users == null) AuthenticationClient.Instance.Refresh();
-          List<User> users = AuthenticationClient.Instance.Users.ToList();
-          usersListBox.DataSource = users;
-          usersListBox.DisplayMember = "Name";
-          for (int i = 0; i < users.Count; i++)
-            usersListBox.SetItemChecked(i, ids.Contains(users[i].Id));
-          usersListBox.Enabled = !ReadOnly;
-          storeUsersButton.Enabled = false;
-        }
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog(this, "Refresh authorized users and groups failed.", ex);
-      }
-    }
     private void storeUsersButton_Click(object sender, System.EventArgs e) {
       try {
-        AdministrationClient.UpdateProblemUsers(Content.Id, usersListBox.SelectedItems.Cast<User>().Select(u => u.Id).ToList());
+        AdministrationClient.UpdateProblemUsers(Content.Id, problemUserView.GetCheckedUsers().CheckedItems.Select(x => x.Value.Id).ToList());
         storeUsersButton.Enabled = false;
       }
@@ -182,7 +165,8 @@
       }
     }
-    private void usersListBox_ItemCheck(object sender, ItemCheckEventArgs e) {
+    private void problemUserView_SelectedUsersChanged(object sender, EventArgs e) {
       storeUsersButton.Enabled = !ReadOnly;
     }
+
 
     private void refreshDataButton_Click(object sender, EventArgs e) {
