Free cookie consent management tool by TermsFeed Policy Generator

Changeset 7893


Ignore:
Timestamp:
05/24/12 11:22:41 (13 years ago)
Author:
ascheibe
Message:

#1648 various improvements in the user administrator

Location:
branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/RefreshableRoleListView.Designer.cs

    r7848 r7893  
    2424    /// </summary>
    2525    private void InitializeComponent() {
     26      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RefreshableRoleListView));
    2627      this.roleListView = new HeuristicLab.Clients.Access.Administration.RoleListView();
    2728      this.storeButton = new System.Windows.Forms.Button();
    2829      this.SuspendLayout();
    2930      //
    30       // userListView
     31      // roleListView
    3132      //
    3233      this.roleListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    33             | System.Windows.Forms.AnchorStyles.Left)
    34             | System.Windows.Forms.AnchorStyles.Right)));
     34                  | System.Windows.Forms.AnchorStyles.Left)
     35                  | System.Windows.Forms.AnchorStyles.Right)));
    3536      this.roleListView.Caption = "UserList View";
    3637      this.roleListView.Content = null;
    3738      this.roleListView.Location = new System.Drawing.Point(3, 33);
    38       this.roleListView.Name = "userListView";
     39      this.roleListView.Name = "roleListView";
    3940      this.roleListView.ReadOnly = false;
    4041      this.roleListView.Size = new System.Drawing.Size(559, 375);
     
    4344      // storeButton
    4445      //
     46      this.storeButton.Enabled = false;
     47      this.storeButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.PublishToWeb;
    4548      this.storeButton.Location = new System.Drawing.Point(33, 3);
    46       this.storeButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.PublishToWeb;
    4749      this.storeButton.Name = "storeButton";
    4850      this.storeButton.Size = new System.Drawing.Size(24, 24);
     
    5153      this.storeButton.Click += new System.EventHandler(this.storeButton_Click);
    5254      //
    53       // RefreshableUserListView
     55      // RefreshableRoleListView
    5456      //
    5557      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     
    5759      this.Controls.Add(this.roleListView);
    5860      this.Controls.Add(this.storeButton);
    59       this.Name = "RefreshableUserListView";
     61      this.Name = "RefreshableRoleListView";
    6062      this.Size = new System.Drawing.Size(565, 411);
    6163      this.Controls.SetChildIndex(this.storeButton, 0);
  • branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/RefreshableRoleListView.cs

    r7848 r7893  
    3737        base.Content_Refreshing(sender, e);
    3838        roleListView.Enabled = false;
     39        storeButton.Enabled = false;
    3940        if (Content.Roles != null) {
    4041          Content.Roles.ItemsRemoved -= new Collections.CollectionItemsChangedEventHandler<Collections.IndexedItem<Role>>(Roles_ItemsRemoved);
     
    4950        base.Content_Refreshed(sender, e);
    5051        roleListView.Enabled = true;
     52        storeButton.Enabled = true;
    5153        roleListView.Content = Content.Roles;
    5254        if (Content.Roles != null) {
  • branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/RefreshableRoleSelectionListView.Designer.cs

    r7876 r7893  
    3131      // storeButton
    3232      //
     33      this.storeButton.Enabled = false;
    3334      this.storeButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.PublishToWeb;
    3435      this.storeButton.Location = new System.Drawing.Point(33, 3);
  • branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/RefreshableRoleSelectionListView.cs

    r7876 r7893  
    3232
    3333    public List<Role> CurrentRoles = new List<Role>();
    34     public User CurrentUser { get; set; }
     34
     35    private User currentUser;
     36    public User CurrentUser {
     37      get { return currentUser; }
     38      set {
     39        currentUser = value;
     40        roleSelectionListView.Content = null;
     41        storeButton.Enabled = false;
     42      }
     43    }
    3544
    3645    protected override void RefreshData() {
     
    5059      } else {
    5160        base.Content_Refreshing(sender, e);
     61        storeButton.Enabled = false;
    5262        roleSelectionListView.Enabled = false;
    5363      }
     
    5969      } else {
    6070        base.Content_Refreshed(sender, e);
    61         roleSelectionListView.Enabled = true;
     71        if (Content.Roles != null) {
     72          roleSelectionListView.Enabled = true;
     73          storeButton.Enabled = true;
    6274
    63         roleSelectionListView.Content = new ItemList<Role>(Content.Roles);
    64         foreach (var role in CurrentRoles) {
    65           foreach (ListViewItem lstRole in roleSelectionListView.ItemsListView.Items) {
    66             if (((Role)lstRole.Tag).Equals(role)) {
    67               lstRole.Checked = true;
     75          roleSelectionListView.Content = new ItemList<Role>(Content.Roles);
     76          foreach (var role in CurrentRoles) {
     77            foreach (ListViewItem lstRole in roleSelectionListView.ItemsListView.Items) {
     78              if (((Role)lstRole.Tag).Equals(role)) {
     79                lstRole.Checked = true;
     80              }
    6881            }
    6982          }
    7083        }
    7184      }
    72     }
    73 
    74     protected override void DeregisterContentEvents() {
    75       base.DeregisterContentEvents();
    7685    }
    7786
  • branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/RefreshableUserGroupListView.Designer.cs

    r7637 r7893  
    4444      // storeButton
    4545      //
     46      this.storeButton.Enabled = false;
    4647      this.storeButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.PublishToWeb;
    4748      this.storeButton.Location = new System.Drawing.Point(33, 3);
  • branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/RefreshableUserGroupListView.cs

    r7637 r7893  
    3737        base.Content_Refreshing(sender, e);
    3838        userGroupListView.Enabled = false;
     39        storeButton.Enabled = false;
    3940        if (Content.Groups != null) {
    4041          Content.Groups.ItemsRemoved -= new Collections.CollectionItemsChangedEventHandler<Collections.IndexedItem<UserGroup>>(Groups_ItemsRemoved);
     
    4950        base.Content_Refreshed(sender, e);
    5051        userGroupListView.Enabled = true;
     52        storeButton.Enabled = true;
    5153        userGroupListView.Content = Content.Groups;
    5254        if (Content.Groups != null) {
  • branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/RefreshableUserListView.Designer.cs

    r7637 r7893  
    4343      // storeButton
    4444      //
     45      this.storeButton.Enabled = false;
    4546      this.storeButton.Location = new System.Drawing.Point(33, 3);
    4647      this.storeButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.PublishToWeb;
  • branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/RefreshableUserListView.cs

    r7637 r7893  
    3737        base.Content_Refreshing(sender, e);
    3838        userListView.Enabled = false;
     39        storeButton.Enabled = false;
    3940        if (Content.Users != null) {
    4041          Content.Users.ItemsRemoved -= new Collections.CollectionItemsChangedEventHandler<Collections.IndexedItem<User>>(Users_ItemsRemoved);
     
    4950        base.Content_Refreshed(sender, e);
    5051        userListView.Enabled = true;
     52        storeButton.Enabled = true;
    5153        userListView.Content = Content.Users;
    5254        if (Content.Users != null) {
     
    6567    void Users_ItemsRemoved(object sender, Collections.CollectionItemsChangedEventArgs<Collections.IndexedItem<User>> e) {
    6668      foreach (var u in e.Items) {
    67         Content.DeleteUserAsync(u.Value, PluginInfrastructure.ErrorHandling.ShowErrorDialog);
     69        if (u.Value.Id != Guid.Empty) {
     70          Content.DeleteUserAsync(u.Value, PluginInfrastructure.ErrorHandling.ShowErrorDialog);
     71        }
    6872      }
    6973    }
  • branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/RoleListView.cs

    r7848 r7893  
    3232    public RoleListView() {
    3333      InitializeComponent();
     34      itemsGroupBox.Text = "Roles";
     35    }
     36
     37    protected override Role CreateItem() {
     38      var role = new Role();
     39      role.Name = "New Role";
     40      return role;
    3441    }
    3542  }
  • branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/RoleSelectionListView.cs

    r7876 r7893  
    2020#endregion
    2121
     22using System;
    2223using System.Windows.Forms;
    2324using HeuristicLab.Core;
     
    3233    public RoleSelectionListView() {
    3334      InitializeComponent();
    34       this.ItemsListView.CheckBoxes = true;
    35       this.ItemsListView.View = System.Windows.Forms.View.Details;
     35      ItemsListView.CheckBoxes = true;
     36      ItemsListView.View = System.Windows.Forms.View.Details;
     37      showDetailsCheckBox.Checked = false;
     38      itemsGroupBox.Text = "Roles";
    3639    }
    3740
     41    protected override void SetEnabledStateOfControls() {
     42      base.SetEnabledStateOfControls();
     43
     44      addButton.Enabled = false;
     45      removeButton.Enabled = false;
     46      showDetailsCheckBox.Enabled = false;
     47      moveUpButton.Enabled = false;
     48      moveDownButton.Enabled = false;
     49    }
     50
     51    protected override void itemsListView_SelectedIndexChanged(object sender, EventArgs e) {
     52      base.itemsListView_SelectedIndexChanged(sender, e);
     53      moveUpButton.Enabled = false;
     54      moveDownButton.Enabled = false;
     55      removeButton.Enabled = false;
     56    }
    3857  }
    3958}
  • branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/UserAdministrationDialog.Designer.cs

    r7848 r7893  
    4747      this.refreshableUserListView.Name = "refreshableUserListView";
    4848      this.refreshableUserListView.ReadOnly = false;
    49       this.refreshableUserListView.Size = new System.Drawing.Size(762, 364);
     49      this.refreshableUserListView.Size = new System.Drawing.Size(921, 527);
    5050      this.refreshableUserListView.TabIndex = 0;
    5151      //
     
    6161      this.mainTabControl.Name = "mainTabControl";
    6262      this.mainTabControl.SelectedIndex = 0;
    63       this.mainTabControl.Size = new System.Drawing.Size(782, 402);
     63      this.mainTabControl.Size = new System.Drawing.Size(941, 565);
    6464      this.mainTabControl.TabIndex = 1;
    6565      //
     
    7070      this.usersTabPage.Name = "usersTabPage";
    7171      this.usersTabPage.Padding = new System.Windows.Forms.Padding(3);
    72       this.usersTabPage.Size = new System.Drawing.Size(774, 376);
     72      this.usersTabPage.Size = new System.Drawing.Size(933, 539);
    7373      this.usersTabPage.TabIndex = 0;
    7474      this.usersTabPage.Text = "Users";
     
    127127      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    128128      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    129       this.ClientSize = new System.Drawing.Size(806, 426);
     129      this.ClientSize = new System.Drawing.Size(965, 589);
    130130      this.Controls.Add(this.mainTabControl);
    131131      this.MaximizeBox = false;
  • branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/UserGroupListView.cs

    r7635 r7893  
    3232    public UserGroupListView() {
    3333      InitializeComponent();
     34      itemsGroupBox.Text = "Groups";
     35    }
     36
     37    protected override UserGroup CreateItem() {
     38      var group = new UserGroup();
     39      group.Name = "New Group";
     40      return group;
    3441    }
    3542  }
  • branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/UserListView.cs

    r7614 r7893  
    3232    public UserListView() {
    3333      InitializeComponent();
     34      itemsGroupBox.Text = "Users";
     35    }
     36
     37    protected override User CreateItem() {
     38      var user = new User();
     39      user.UserName = "New User";
     40      return user;
    3441    }
    3542  }
  • branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/UserView.Designer.cs

    r7876 r7893  
    6262      this.userNameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    6363                  | System.Windows.Forms.AnchorStyles.Right)));
    64       this.userNameTextBox.Enabled = false;
    6564      this.userNameTextBox.Location = new System.Drawing.Point(76, 3);
    6665      this.userNameTextBox.Name = "userNameTextBox";
Note: See TracChangeset for help on using the changeset viewer.