Changeset 7848
- Timestamp:
- 05/18/12 15:16:16 (13 years ago)
- Location:
- branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3
- Files:
-
- 4 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/AccessAdministrationClient.cs
r7637 r7848 45 45 46 46 public ItemList<UserGroup> Groups { get; set; } 47 public ItemList<Role> Roles { get; set; } 47 48 #endregion 48 49 … … 67 68 ExecuteActionAsync(RefreshUserGroups, exceptionCallback); 68 69 } 70 71 public void RefreshRoles() { 72 Roles = new ItemList<Role>(); 73 Roles.AddRange(CallAccessService<ItemList<Role>>(s => new ItemList<Role>(s.GetRoles()))); 74 } 75 76 public void RefreshRolesAsync(Action<Exception> exceptionCallback) { 77 ExecuteActionAsync(RefreshRoles, exceptionCallback); 78 } 79 69 80 #endregion 70 81 … … 104 115 } 105 116 117 public void StoreRoles() { 118 foreach (Role g in Roles) { 119 if (g.Modified) { 120 CallAccessService(s => s.AddRole(g)); 121 g.SetUnmodified(); 122 } 123 } 124 } 125 126 public void StoreRolesAsync(Action<Exception> exceptionCallback) { 127 ExecuteActionAsync(StoreRoles, exceptionCallback); 128 } 129 106 130 //i don't think such a generic method is a good idea 107 131 /*public static void Store(IAccessItem item) { … … 127 151 Action deleteUserGroupAction = new Action(delegate { DeleteUserGroup(u); }); 128 152 ExecuteActionAsync(deleteUserGroupAction, exceptionCallback); 153 } 154 155 public void DeleteRole(Role u) { 156 CallAccessService(s => s.DeleteRole(u)); 157 } 158 159 public void DeleteRoleAsync(Role u, Action<Exception> exceptionCallback) { 160 Action deleteRoleAction = new Action(delegate { DeleteRole(u); }); 161 ExecuteActionAsync(deleteRoleAction, exceptionCallback); 129 162 } 130 163 #endregion -
branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/HeuristicLab.Clients.Access.Administration-3.3.csproj
r7635 r7848 129 129 <Compile Include="Plugin.cs" /> 130 130 <Compile Include="Properties\AssemblyInfo.cs" /> 131 <Compile Include="Views\RefreshableRoleListView.cs"> 132 <SubType>UserControl</SubType> 133 </Compile> 134 <Compile Include="Views\RefreshableRoleListView.Designer.cs"> 135 <DependentUpon>RefreshableRoleListView.cs</DependentUpon> 136 </Compile> 137 <Compile Include="Views\RoleListView.cs"> 138 <SubType>UserControl</SubType> 139 </Compile> 140 <Compile Include="Views\RoleListView.Designer.cs"> 141 <DependentUpon>RoleListView.cs</DependentUpon> 142 </Compile> 131 143 <Compile Include="Views\UserGroupListView.cs"> 132 144 <SubType>UserControl</SubType> -
branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/RoleView.Designer.cs
r7635 r7848 39 39 // roleNameTextBox 40 40 // 41 this.roleNameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 42 | System.Windows.Forms.AnchorStyles.Right)));41 this.roleNameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 42 | System.Windows.Forms.AnchorStyles.Right))); 43 43 this.roleNameTextBox.Location = new System.Drawing.Point(75, 3); 44 44 this.roleNameTextBox.Name = "roleNameTextBox"; 45 45 this.roleNameTextBox.Size = new System.Drawing.Size(289, 20); 46 46 this.roleNameTextBox.TabIndex = 3; 47 this.roleNameTextBox.TextChanged += new System.EventHandler(this.roleNameTextBox_TextChanged); 47 48 // 48 49 // RoleView -
branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/RoleView.cs
r7635 r7848 45 45 } 46 46 } 47 48 private void roleNameTextBox_TextChanged(object sender, System.EventArgs e) { 49 if (Content.Name != roleNameTextBox.Text) 50 Content.Name = roleNameTextBox.Text; 51 } 47 52 } 48 53 } -
branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/UserAdministrationDialog.Designer.cs
r7635 r7848 29 29 this.UserGroupsTabPage = new System.Windows.Forms.TabPage(); 30 30 this.refreshableUserGroupListView = new HeuristicLab.Clients.Access.Administration.RefreshableUserGroupListView(); 31 this.rolesTabPage = new System.Windows.Forms.TabPage(); 32 this.refreshableRoleListView = new HeuristicLab.Clients.Access.Administration.RefreshableRoleListView(); 31 33 this.mainTabControl.SuspendLayout(); 32 34 this.usersTabPage.SuspendLayout(); 33 35 this.UserGroupsTabPage.SuspendLayout(); 36 this.rolesTabPage.SuspendLayout(); 34 37 this.SuspendLayout(); 35 38 // 36 39 // refreshableUserListView 37 40 // 38 this.refreshableUserListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 39 | System.Windows.Forms.AnchorStyles.Left)40 | System.Windows.Forms.AnchorStyles.Right)));41 this.refreshableUserListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 42 | System.Windows.Forms.AnchorStyles.Left) 43 | System.Windows.Forms.AnchorStyles.Right))); 41 44 this.refreshableUserListView.Caption = "View"; 42 45 this.refreshableUserListView.Content = null; … … 49 52 // mainTabControl 50 53 // 51 this.mainTabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 52 | System.Windows.Forms.AnchorStyles.Left)53 | System.Windows.Forms.AnchorStyles.Right)));54 this.mainTabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 55 | System.Windows.Forms.AnchorStyles.Left) 56 | System.Windows.Forms.AnchorStyles.Right))); 54 57 this.mainTabControl.Controls.Add(this.usersTabPage); 55 58 this.mainTabControl.Controls.Add(this.UserGroupsTabPage); 59 this.mainTabControl.Controls.Add(this.rolesTabPage); 56 60 this.mainTabControl.Location = new System.Drawing.Point(12, 12); 57 61 this.mainTabControl.Name = "mainTabControl"; … … 84 88 // refreshableUserGroupListView 85 89 // 86 this.refreshableUserGroupListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 87 | System.Windows.Forms.AnchorStyles.Left)88 | System.Windows.Forms.AnchorStyles.Right)));90 this.refreshableUserGroupListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 91 | System.Windows.Forms.AnchorStyles.Left) 92 | System.Windows.Forms.AnchorStyles.Right))); 89 93 this.refreshableUserGroupListView.Caption = "View"; 90 94 this.refreshableUserGroupListView.Content = null; … … 94 98 this.refreshableUserGroupListView.Size = new System.Drawing.Size(762, 364); 95 99 this.refreshableUserGroupListView.TabIndex = 0; 100 // 101 // rolesTabPage 102 // 103 this.rolesTabPage.Controls.Add(this.refreshableRoleListView); 104 this.rolesTabPage.Location = new System.Drawing.Point(4, 22); 105 this.rolesTabPage.Name = "rolesTabPage"; 106 this.rolesTabPage.Padding = new System.Windows.Forms.Padding(3); 107 this.rolesTabPage.Size = new System.Drawing.Size(774, 376); 108 this.rolesTabPage.TabIndex = 2; 109 this.rolesTabPage.Text = "Roles"; 110 this.rolesTabPage.UseVisualStyleBackColor = true; 111 // 112 // refreshableRoleListView 113 // 114 this.refreshableRoleListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 115 | System.Windows.Forms.AnchorStyles.Left) 116 | System.Windows.Forms.AnchorStyles.Right))); 117 this.refreshableRoleListView.Caption = "View"; 118 this.refreshableRoleListView.Content = null; 119 this.refreshableRoleListView.Location = new System.Drawing.Point(6, 6); 120 this.refreshableRoleListView.Name = "refreshableRoleListView"; 121 this.refreshableRoleListView.ReadOnly = false; 122 this.refreshableRoleListView.Size = new System.Drawing.Size(762, 364); 123 this.refreshableRoleListView.TabIndex = 0; 96 124 // 97 125 // UserAdministrationDialog … … 112 140 this.usersTabPage.ResumeLayout(false); 113 141 this.UserGroupsTabPage.ResumeLayout(false); 142 this.rolesTabPage.ResumeLayout(false); 114 143 this.ResumeLayout(false); 115 144 … … 123 152 private System.Windows.Forms.TabPage UserGroupsTabPage; 124 153 private RefreshableUserGroupListView refreshableUserGroupListView; 154 private System.Windows.Forms.TabPage rolesTabPage; 155 private RefreshableRoleListView refreshableRoleListView; 125 156 } 126 157 } -
branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/UserAdministrationDialog.cs
r7635 r7848 32 32 refreshableUserListView.Content = AccessAdministrationClient.Instance; 33 33 refreshableUserGroupListView.Content = AccessAdministrationClient.Instance; 34 refreshableRoleListView.Content = AccessAdministrationClient.Instance; 34 35 } 35 36 }
Note: See TracChangeset
for help on using the changeset viewer.