Changeset 7893 for branches/ClientUserManagement
- Timestamp:
- 05/24/12 11:22:41 (13 years ago)
- 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 24 24 /// </summary> 25 25 private void InitializeComponent() { 26 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RefreshableRoleListView)); 26 27 this.roleListView = new HeuristicLab.Clients.Access.Administration.RoleListView(); 27 28 this.storeButton = new System.Windows.Forms.Button(); 28 29 this.SuspendLayout(); 29 30 // 30 // userListView31 // roleListView 31 32 // 32 33 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))); 35 36 this.roleListView.Caption = "UserList View"; 36 37 this.roleListView.Content = null; 37 38 this.roleListView.Location = new System.Drawing.Point(3, 33); 38 this.roleListView.Name = " userListView";39 this.roleListView.Name = "roleListView"; 39 40 this.roleListView.ReadOnly = false; 40 41 this.roleListView.Size = new System.Drawing.Size(559, 375); … … 43 44 // storeButton 44 45 // 46 this.storeButton.Enabled = false; 47 this.storeButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.PublishToWeb; 45 48 this.storeButton.Location = new System.Drawing.Point(33, 3); 46 this.storeButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.PublishToWeb;47 49 this.storeButton.Name = "storeButton"; 48 50 this.storeButton.Size = new System.Drawing.Size(24, 24); … … 51 53 this.storeButton.Click += new System.EventHandler(this.storeButton_Click); 52 54 // 53 // Refreshable UserListView55 // RefreshableRoleListView 54 56 // 55 57 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); … … 57 59 this.Controls.Add(this.roleListView); 58 60 this.Controls.Add(this.storeButton); 59 this.Name = "Refreshable UserListView";61 this.Name = "RefreshableRoleListView"; 60 62 this.Size = new System.Drawing.Size(565, 411); 61 63 this.Controls.SetChildIndex(this.storeButton, 0); -
branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/RefreshableRoleListView.cs
r7848 r7893 37 37 base.Content_Refreshing(sender, e); 38 38 roleListView.Enabled = false; 39 storeButton.Enabled = false; 39 40 if (Content.Roles != null) { 40 41 Content.Roles.ItemsRemoved -= new Collections.CollectionItemsChangedEventHandler<Collections.IndexedItem<Role>>(Roles_ItemsRemoved); … … 49 50 base.Content_Refreshed(sender, e); 50 51 roleListView.Enabled = true; 52 storeButton.Enabled = true; 51 53 roleListView.Content = Content.Roles; 52 54 if (Content.Roles != null) { -
branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/RefreshableRoleSelectionListView.Designer.cs
r7876 r7893 31 31 // storeButton 32 32 // 33 this.storeButton.Enabled = false; 33 34 this.storeButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.PublishToWeb; 34 35 this.storeButton.Location = new System.Drawing.Point(33, 3); -
branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/RefreshableRoleSelectionListView.cs
r7876 r7893 32 32 33 33 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 } 35 44 36 45 protected override void RefreshData() { … … 50 59 } else { 51 60 base.Content_Refreshing(sender, e); 61 storeButton.Enabled = false; 52 62 roleSelectionListView.Enabled = false; 53 63 } … … 59 69 } else { 60 70 base.Content_Refreshed(sender, e); 61 roleSelectionListView.Enabled = true; 71 if (Content.Roles != null) { 72 roleSelectionListView.Enabled = true; 73 storeButton.Enabled = true; 62 74 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 } 68 81 } 69 82 } 70 83 } 71 84 } 72 }73 74 protected override void DeregisterContentEvents() {75 base.DeregisterContentEvents();76 85 } 77 86 -
branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/RefreshableUserGroupListView.Designer.cs
r7637 r7893 44 44 // storeButton 45 45 // 46 this.storeButton.Enabled = false; 46 47 this.storeButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.PublishToWeb; 47 48 this.storeButton.Location = new System.Drawing.Point(33, 3); -
branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/RefreshableUserGroupListView.cs
r7637 r7893 37 37 base.Content_Refreshing(sender, e); 38 38 userGroupListView.Enabled = false; 39 storeButton.Enabled = false; 39 40 if (Content.Groups != null) { 40 41 Content.Groups.ItemsRemoved -= new Collections.CollectionItemsChangedEventHandler<Collections.IndexedItem<UserGroup>>(Groups_ItemsRemoved); … … 49 50 base.Content_Refreshed(sender, e); 50 51 userGroupListView.Enabled = true; 52 storeButton.Enabled = true; 51 53 userGroupListView.Content = Content.Groups; 52 54 if (Content.Groups != null) { -
branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/RefreshableUserListView.Designer.cs
r7637 r7893 43 43 // storeButton 44 44 // 45 this.storeButton.Enabled = false; 45 46 this.storeButton.Location = new System.Drawing.Point(33, 3); 46 47 this.storeButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.PublishToWeb; -
branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/RefreshableUserListView.cs
r7637 r7893 37 37 base.Content_Refreshing(sender, e); 38 38 userListView.Enabled = false; 39 storeButton.Enabled = false; 39 40 if (Content.Users != null) { 40 41 Content.Users.ItemsRemoved -= new Collections.CollectionItemsChangedEventHandler<Collections.IndexedItem<User>>(Users_ItemsRemoved); … … 49 50 base.Content_Refreshed(sender, e); 50 51 userListView.Enabled = true; 52 storeButton.Enabled = true; 51 53 userListView.Content = Content.Users; 52 54 if (Content.Users != null) { … … 65 67 void Users_ItemsRemoved(object sender, Collections.CollectionItemsChangedEventArgs<Collections.IndexedItem<User>> e) { 66 68 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 } 68 72 } 69 73 } -
branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/RoleListView.cs
r7848 r7893 32 32 public RoleListView() { 33 33 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; 34 41 } 35 42 } -
branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/RoleSelectionListView.cs
r7876 r7893 20 20 #endregion 21 21 22 using System; 22 23 using System.Windows.Forms; 23 24 using HeuristicLab.Core; … … 32 33 public RoleSelectionListView() { 33 34 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"; 36 39 } 37 40 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 } 38 57 } 39 58 } -
branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/UserAdministrationDialog.Designer.cs
r7848 r7893 47 47 this.refreshableUserListView.Name = "refreshableUserListView"; 48 48 this.refreshableUserListView.ReadOnly = false; 49 this.refreshableUserListView.Size = new System.Drawing.Size( 762, 364);49 this.refreshableUserListView.Size = new System.Drawing.Size(921, 527); 50 50 this.refreshableUserListView.TabIndex = 0; 51 51 // … … 61 61 this.mainTabControl.Name = "mainTabControl"; 62 62 this.mainTabControl.SelectedIndex = 0; 63 this.mainTabControl.Size = new System.Drawing.Size( 782, 402);63 this.mainTabControl.Size = new System.Drawing.Size(941, 565); 64 64 this.mainTabControl.TabIndex = 1; 65 65 // … … 70 70 this.usersTabPage.Name = "usersTabPage"; 71 71 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); 73 73 this.usersTabPage.TabIndex = 0; 74 74 this.usersTabPage.Text = "Users"; … … 127 127 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 128 128 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); 130 130 this.Controls.Add(this.mainTabControl); 131 131 this.MaximizeBox = false; -
branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/UserGroupListView.cs
r7635 r7893 32 32 public UserGroupListView() { 33 33 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; 34 41 } 35 42 } -
branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/UserListView.cs
r7614 r7893 32 32 public UserListView() { 33 33 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; 34 41 } 35 42 } -
branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/UserView.Designer.cs
r7876 r7893 62 62 this.userNameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 63 63 | System.Windows.Forms.AnchorStyles.Right))); 64 this.userNameTextBox.Enabled = false;65 64 this.userNameTextBox.Location = new System.Drawing.Point(76, 3); 66 65 this.userNameTextBox.Name = "userNameTextBox";
Note: See TracChangeset
for help on using the changeset viewer.