Changeset 6924
- Timestamp:
- 10/13/11 19:39:50 (13 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/HiveJobPermissionListView.cs
r6792 r6924 21 21 22 22 using System; 23 using System.ComponentModel; 23 24 using System.Windows.Forms; 24 25 using HeuristicLab.Core.Views; … … 44 45 return new JobPermission() { JobId = this.hiveExperimentId }; 45 46 } 47 48 protected override void RegisterContentEvents() { 49 base.RegisterContentEvents(); 50 51 if (Content != null) { 52 foreach (JobPermission permission in Content) { 53 permission.PropertyChanged += new PropertyChangedEventHandler(permission_PropertyChanged); 54 } 55 } 56 } 57 58 protected override void DeregisterContentEvents() { 59 base.DeregisterContentEvents(); 60 61 if (Content != null) { 62 foreach (JobPermission permission in Content) { 63 permission.PropertyChanged -= new PropertyChangedEventHandler(permission_PropertyChanged); 64 } 65 } 66 } 67 68 protected override void Content_ItemsAdded(object sender, Collections.CollectionItemsChangedEventArgs<JobPermission> e) { 69 base.Content_ItemsAdded(sender, e); 70 71 foreach (JobPermission permission in e.Items) { 72 permission.PropertyChanged += new PropertyChangedEventHandler(permission_PropertyChanged); 73 } 74 } 75 76 protected override void Content_ItemsRemoved(object sender, Collections.CollectionItemsChangedEventArgs<JobPermission> e) { 77 foreach (JobPermission permission in e.Items) { 78 permission.PropertyChanged -= new PropertyChangedEventHandler(permission_PropertyChanged); 79 } 80 } 81 82 protected override void Content_CollectionReset(object sender, Collections.CollectionItemsChangedEventArgs<JobPermission> e) { 83 Content_ItemsRemoved(sender, e); 84 } 85 86 void permission_PropertyChanged(object sender, PropertyChangedEventArgs e) { 87 OnContentChanged(); 88 } 46 89 } 47 90 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/HiveJobPermissionView.Designer.cs
r6792 r6924 60 60 this.usernameTextBox.Size = new System.Drawing.Size(281, 20); 61 61 this.usernameTextBox.TabIndex = 3; 62 this.usernameTextBox.Validat ed += new System.EventHandler(this.usernameTextBox_Validated);62 this.usernameTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.usernameTextBox_Validating); 63 63 // 64 64 // permissionComboBox … … 72 72 this.permissionComboBox.Size = new System.Drawing.Size(281, 21); 73 73 this.permissionComboBox.TabIndex = 4; 74 this.permissionComboBox.Validat ed += new System.EventHandler(this.permissionComboBox_Validated);74 this.permissionComboBox.Validating += new System.ComponentModel.CancelEventHandler(this.permissionComboBox_Validating); 75 75 // 76 // Hive ExperimentPermissionView76 // HiveJobPermissionView 77 77 // 78 78 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); … … 82 82 this.Controls.Add(this.permissionLabel); 83 83 this.Controls.Add(this.usernameTextBox); 84 this.Name = "Hive ExperimentPermissionView";84 this.Name = "HiveJobPermissionView"; 85 85 this.Controls.SetChildIndex(this.usernameTextBox, 0); 86 86 this.Controls.SetChildIndex(this.permissionLabel, 0); -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/HiveJobPermissionView.cs
r6792 r6924 47 47 } else { 48 48 usernameTextBox.Text = Content.GrantedUserName; 49 permissionComboBox.Selected Value= Content.Permission;49 permissionComboBox.SelectedItem = Content.Permission; 50 50 } 51 51 } … … 67 67 Content.GrantedUserName = usernameTextBox.Text; 68 68 } 69 private void usernameTextBox_Validated(object sender, System.EventArgs e) {70 71 }72 69 73 70 private void permissionComboBox_Validating(object sender, CancelEventArgs e) { 74 71 Content.Permission = (Permission)permissionComboBox.SelectedItem; 75 72 } 76 private void permissionComboBox_Validated(object sender, System.EventArgs e) {77 78 }79 73 #endregion 80 74 }
Note: See TracChangeset
for help on using the changeset viewer.