- Timestamp:
- 06/19/18 15:51:41 (7 years ago)
- Location:
- branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/HeuristicLab.Clients.Hive.Administrator-3.3.csproj
r15908 r15966 132 132 </Compile> 133 133 <Compile Include="MenuItems\AdministratorMenuItem.cs" /> 134 <Compile Include="Views\ProjectJobsView.cs"> 135 <SubType>UserControl</SubType> 136 </Compile> 137 <Compile Include="Views\ProjectJobsView.Designer.cs"> 138 <DependentUpon>ProjectJobsView.cs</DependentUpon> 139 </Compile> 134 140 <Compile Include="Views\ProjectPermissionsView.cs"> 135 141 <SubType>UserControl</SubType> … … 248 254 <Private>False</Private> 249 255 </ProjectReference> 256 <ProjectReference Include="..\..\HeuristicLab.Data.Views\3.3\HeuristicLab.Data.Views-3.3.csproj"> 257 <Project>{72104A0B-90E7-42F3-9ABE-9BBBADD4B943}</Project> 258 <Name>HeuristicLab.Data.Views-3.3</Name> 259 </ProjectReference> 250 260 <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj"> 251 261 <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project> … … 283 293 <Private>False</Private> 284 294 </ProjectReference> 295 </ItemGroup> 296 <ItemGroup> 297 <EmbeddedResource Include="Views\ProjectJobsView.resx"> 298 <DependentUpon>ProjectJobsView.cs</DependentUpon> 299 </EmbeddedResource> 285 300 </ItemGroup> 286 301 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> -
branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectView.cs
r15760 r15966 28 28 using HeuristicLab.Core.Views; 29 29 using HeuristicLab.MainForm; 30 using System.Drawing; 30 31 31 32 namespace HeuristicLab.Clients.Hive.Administrator.Views { … … 35 36 private readonly object locker = new object(); 36 37 38 private Guid persistedOwnerUserId; 39 37 40 public new Project Content { 38 41 get { return (Project)base.Content; } 39 set { base.Content = value; }42 set { base.Content = value; persistedOwnerUserId = Content != null ? Content.OwnerUserId : Guid.Empty; } 40 43 } 41 44 … … 82 85 createdTextBox.Text = Content.DateCreated.ToString("ddd, dd.MM.yyyy, HH:mm:ss"); 83 86 startDateTimePicker.Value = Content.StartDate; 84 if (indefiniteCheckBox.Checked = !Content.EndDate.HasValue) { 85 endDateTimePicker.Value = startDateTimePicker.Value;86 } else {87 endDateTimePicker.Value = Content.EndDate.Value;88 }87 88 indefiniteCheckBox.Checked = !Content.EndDate.HasValue; 89 if(!indefiniteCheckBox.Checked) endDateTimePicker.Value = Content.EndDate.Value; 90 else endDateTimePicker.Value = Content.StartDate; 91 endDateTimePicker.Enabled = !indefiniteCheckBox.Checked; 89 92 } 90 93 } … … 148 151 ownerComboBox.SelectedIndexChanged -= ownerComboBox_SelectedIndexChanged; 149 152 ownerComboBox.DataSource = AccessClient.Instance.UsersAndGroups.OfType<LightweightUser>().ToList(); 150 ownerComboBox.SelectedItem = AccessClient.Instance.UsersAndGroups.FirstOrDefault(x => x.Id == Content.OwnerUserId);153 ownerComboBox.SelectedItem = AccessClient.Instance.UsersAndGroups.FirstOrDefault(x => x.Id == persistedOwnerUserId); 151 154 ownerComboBox.SelectedIndexChanged += ownerComboBox_SelectedIndexChanged; 152 155 refreshButton.Enabled = true; … … 201 204 if (Content == null) return; 202 205 var newEndDate = indefiniteCheckBox.Checked ? (DateTime?)null : Content.StartDate; 203 if (Content.EndDate != newEndDate) 206 endDateTimePicker.Enabled = !indefiniteCheckBox.Checked; 207 if (Content.EndDate != newEndDate) { 208 DeregisterContentEvents(); 204 209 Content.EndDate = newEndDate; 210 endDateTimePicker.Value = newEndDate.HasValue ? newEndDate.Value : Content.StartDate; 211 RegisterContentEvents(); 212 } 205 213 } 206 214 #endregion -
branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectsView.Designer.cs
r15953 r15966 39 39 this.resourcesTabPage = new System.Windows.Forms.TabPage(); 40 40 this.projectResourcesView = new HeuristicLab.Clients.Hive.Administrator.Views.ProjectResourcesView(); 41 this.jobsTabPage = new System.Windows.Forms.TabPage(); 42 this.projectJobsView = new HeuristicLab.Clients.Hive.Administrator.Views.ProjectJobsView(); 41 43 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 42 44 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); … … 48 50 this.permissionsTabPage.SuspendLayout(); 49 51 this.resourcesTabPage.SuspendLayout(); 52 this.jobsTabPage.SuspendLayout(); 50 53 this.SuspendLayout(); 51 54 // … … 152 155 this.tabControl.Controls.Add(this.permissionsTabPage); 153 156 this.tabControl.Controls.Add(this.resourcesTabPage); 157 this.tabControl.Controls.Add(this.jobsTabPage); 154 158 this.tabControl.Location = new System.Drawing.Point(3, 3); 155 159 this.tabControl.Name = "tabControl"; … … 225 229 this.projectResourcesView.Size = new System.Drawing.Size(571, 509); 226 230 this.projectResourcesView.TabIndex = 0; 231 // 232 // jobsTabPage 233 // 234 this.jobsTabPage.Controls.Add(this.projectJobsView); 235 this.jobsTabPage.Location = new System.Drawing.Point(4, 22); 236 this.jobsTabPage.Name = "jobsTabPage"; 237 this.jobsTabPage.Padding = new System.Windows.Forms.Padding(3); 238 this.jobsTabPage.Size = new System.Drawing.Size(577, 515); 239 this.jobsTabPage.TabIndex = 3; 240 this.jobsTabPage.Text = "Jobs"; 241 this.jobsTabPage.UseVisualStyleBackColor = true; 242 // 243 // projectJobsView 244 // 245 this.projectJobsView.Caption = "ProjectView"; 246 this.projectJobsView.Content = null; 247 this.projectJobsView.Dock = System.Windows.Forms.DockStyle.Fill; 248 this.projectJobsView.Location = new System.Drawing.Point(3, 3); 249 this.projectJobsView.Name = "projectJobsView"; 250 this.projectJobsView.ReadOnly = false; 251 this.projectJobsView.Size = new System.Drawing.Size(571, 509); 252 this.projectJobsView.TabIndex = 0; 227 253 // 228 254 // ProjectsView … … 242 268 this.permissionsTabPage.ResumeLayout(false); 243 269 this.resourcesTabPage.ResumeLayout(false); 270 this.jobsTabPage.ResumeLayout(false); 244 271 this.ResumeLayout(false); 245 272 … … 260 287 private System.Windows.Forms.ImageList imageList; 261 288 private System.Windows.Forms.TabPage resourcesTabPage; 289 private System.Windows.Forms.TabPage jobsTabPage; 262 290 private ProjectResourcesView projectResourcesView; 263 291 private ProjectPermissionsView projectPermissionsView; 292 private ProjectJobsView projectJobsView; 264 293 private System.Windows.Forms.ToolTip toolTip; 265 294 } -
branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectsView.cs
r15953 r15966 100 100 projectPermissionsView.Content = null; 101 101 projectResourcesView.Content = null; 102 projectJobsView.Content = null; 102 103 } else { 103 104 BuildProjectTree(Content); … … 115 116 projectPermissionsView.Enabled = enabled; 116 117 projectResourcesView.Enabled = enabled; 118 projectJobsView.Enabled = enabled; 117 119 } 118 120 #endregion … … 228 230 MessageBox.Show( 229 231 "Only empty projects can be deleted.", 232 "HeuristicLab Hive Administrator", 233 MessageBoxButtons.OK, 234 MessageBoxIcon.Error); 235 return; 236 } 237 238 if (HiveAdminClient.Instance.Jobs.ContainsKey(selectedProject.Id) 239 && HiveAdminClient.Instance.Jobs[selectedProject.Id] != null 240 && HiveAdminClient.Instance.Jobs[selectedProject.Id].Any()) { 241 MessageBox.Show( 242 "There are " + HiveAdminClient.Instance.Jobs[selectedProject.Id].Count + " jobs using this project and/or child-projects. It is necessary to delete them before the project.", 230 243 "HeuristicLab Hive Administrator", 231 244 MessageBoxButtons.OK, … … 442 455 projectPermissionsView.Content = project; 443 456 projectResourcesView.Content = project; 457 projectJobsView.Content = project; 444 458 445 459 bool projectIsNew = project != null && project.Id == Guid.Empty; … … 454 468 projectPermissionsView.Locked = locked; 455 469 projectResourcesView.Locked = locked; 470 projectJobsView.Locked = locked; 456 471 selectedProject = project; 457 472 }
Note: See TracChangeset
for help on using the changeset viewer.