- Timestamp:
- 03/20/12 13:39:59 (13 years ago)
- Location:
- branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/UserGroupView.Designer.cs
r7637 r7639 28 28 this.groupNameTextBox = new System.Windows.Forms.TextBox(); 29 29 this.idTextBox = new System.Windows.Forms.TextBox(); 30 this.refreshableLightweightUserView = new HeuristicLab.Clients.Access.Views.RefreshableLightweightUserView(); 31 this.storeButton = new System.Windows.Forms.Button(); 30 32 this.SuspendLayout(); 31 33 // … … 50 52 // groupNameTextBox 51 53 // 52 this.groupNameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 53 | System.Windows.Forms.AnchorStyles.Right)));54 this.groupNameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 55 | System.Windows.Forms.AnchorStyles.Right))); 54 56 this.groupNameTextBox.Location = new System.Drawing.Point(79, 3); 55 57 this.groupNameTextBox.Name = "groupNameTextBox"; 56 this.groupNameTextBox.Size = new System.Drawing.Size( 282, 20);58 this.groupNameTextBox.Size = new System.Drawing.Size(675, 20); 57 59 this.groupNameTextBox.TabIndex = 2; 58 60 this.groupNameTextBox.TextChanged += new System.EventHandler(this.groupNameTextBox_TextChanged); … … 60 62 // idTextBox 61 63 // 62 this.idTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 63 | System.Windows.Forms.AnchorStyles.Right)));64 this.idTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 65 | System.Windows.Forms.AnchorStyles.Right))); 64 66 this.idTextBox.Enabled = false; 65 67 this.idTextBox.Location = new System.Drawing.Point(79, 29); 66 68 this.idTextBox.Name = "idTextBox"; 67 this.idTextBox.Size = new System.Drawing.Size( 282, 20);69 this.idTextBox.Size = new System.Drawing.Size(675, 20); 68 70 this.idTextBox.TabIndex = 3; 71 // 72 // refreshableLightweightUserView 73 // 74 this.refreshableLightweightUserView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 75 | System.Windows.Forms.AnchorStyles.Left) 76 | System.Windows.Forms.AnchorStyles.Right))); 77 this.refreshableLightweightUserView.Caption = "RefreshableLightweightUser View"; 78 this.refreshableLightweightUserView.Content = null; 79 this.refreshableLightweightUserView.FetchSelectedUsers = null; 80 this.refreshableLightweightUserView.Location = new System.Drawing.Point(0, 55); 81 this.refreshableLightweightUserView.Name = "refreshableLightweightUserView"; 82 this.refreshableLightweightUserView.ReadOnly = false; 83 this.refreshableLightweightUserView.Size = new System.Drawing.Size(754, 282); 84 this.refreshableLightweightUserView.TabIndex = 4; 85 // 86 // storeButton 87 // 88 this.storeButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.PublishToWeb; 89 this.storeButton.Location = new System.Drawing.Point(31, 58); 90 this.storeButton.Name = "storeButton"; 91 this.storeButton.Size = new System.Drawing.Size(24, 24); 92 this.storeButton.TabIndex = 5; 93 this.storeButton.UseVisualStyleBackColor = true; 94 this.storeButton.Click += new System.EventHandler(this.storeButton_Click); 69 95 // 70 96 // UserGroupView … … 72 98 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 73 99 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 100 this.Controls.Add(this.storeButton); 101 this.Controls.Add(this.refreshableLightweightUserView); 74 102 this.Controls.Add(this.idTextBox); 75 103 this.Controls.Add(this.groupNameTextBox); … … 77 105 this.Controls.Add(this.label1); 78 106 this.Name = "UserGroupView"; 79 this.Size = new System.Drawing.Size( 364, 54);107 this.Size = new System.Drawing.Size(757, 340); 80 108 this.ResumeLayout(false); 81 109 this.PerformLayout(); … … 89 117 private System.Windows.Forms.TextBox groupNameTextBox; 90 118 private System.Windows.Forms.TextBox idTextBox; 119 private Views.RefreshableLightweightUserView refreshableLightweightUserView; 120 private System.Windows.Forms.Button storeButton; 91 121 } 92 122 } -
branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/UserGroupView.cs
r7637 r7639 20 20 #endregion 21 21 22 using System; 23 using System.Collections.Generic; 22 24 using HeuristicLab.Core.Views; 23 25 using HeuristicLab.MainForm; … … 42 44 groupNameTextBox.Clear(); 43 45 idTextBox.Clear(); 46 47 refreshableLightweightUserView.Content = null; 48 refreshableLightweightUserView.FetchSelectedUsers = null; 44 49 } else { 45 50 groupNameTextBox.Text = Content.Name; 46 51 idTextBox.Text = Content.Id.ToString(); 52 53 refreshableLightweightUserView.Content = Access.AccessClient.Instance; 54 refreshableLightweightUserView.FetchSelectedUsers = new Func<List<Guid>>(delegate { return AccessAdministrationClient.CallAccessService<List<Guid>>(s => s.GetUserGroupIdsOfGroup(Content.Id)); }); 47 55 } 48 56 } … … 52 60 Content.Name = this.groupNameTextBox.Text; 53 61 } 62 63 private void storeButton_Click(object sender, EventArgs e) { 64 Action storeAction = new Action(delegate { 65 foreach (var ug in refreshableLightweightUserView.GetCheckedUsers()) { 66 AccessAdministrationClient.CallAccessService(s => s.AddUserGroupBaseToGroup(ug, Content)); 67 } 68 }); 69 70 Action deleteAction = new Action(delegate { 71 foreach (var ug in refreshableLightweightUserView.GetDeletedUsers()) { 72 AccessAdministrationClient.CallAccessService(s => s.RemoveUserGroupBaseFromGroup(ug, Content)); 73 } 74 }); 75 76 AccessAdministrationClient.Instance.ExecuteActionAsync(storeAction, PluginInfrastructure.ErrorHandling.ShowErrorDialog); 77 AccessAdministrationClient.Instance.ExecuteActionAsync(deleteAction, PluginInfrastructure.ErrorHandling.ShowErrorDialog); 78 } 54 79 } 55 80 }
Note: See TracChangeset
for help on using the changeset viewer.