Changeset 8159
- Timestamp:
- 06/29/12 12:58:51 (12 years ago)
- Location:
- trunk/sources
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobView.cs
r8156 r8159 149 149 bool alreadyUploaded = Content.Id != Guid.Empty; 150 150 bool jobsLoaded = Content.HiveTasks != null && Content.HiveTasks.All(x => x.Task.Id != Guid.Empty); 151 152 this.nameTextBox.ReadOnly = !Content.IsControllable || Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded; 153 this.resourceNamesTextBox.ReadOnly = !Content.IsControllable || Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded; 154 this.searchButton.Enabled = Content.IsControllable && !(Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded); 155 this.jobsTreeView.ReadOnly = !Content.IsControllable || Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded; 156 157 this.isPrivilegedCheckBox.Enabled = Content.IsAllowedPrivileged && Content.IsControllable && !(Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded); // TODO: check if user has the rights to do this 158 this.refreshAutomaticallyCheckBox.Enabled = Content.IsControllable && alreadyUploaded && jobsLoaded && Content.ExecutionState == ExecutionState.Started; 159 this.refreshButton.Enabled = Content.IsDownloadable && alreadyUploaded; 160 this.Locked = !Content.IsControllable || Content.ExecutionState == ExecutionState.Started; 151 tabControl.Enabled = !Content.IsProgressing; 152 153 this.nameTextBox.ReadOnly = !Content.IsControllable || Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded || Content.IsProgressing; 154 this.resourceNamesTextBox.ReadOnly = !Content.IsControllable || Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded || Content.IsProgressing; 155 this.searchButton.Enabled = (Content.IsControllable && !(Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded)) || !Content.IsProgressing; 156 this.jobsTreeView.ReadOnly = !Content.IsControllable || Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded || Content.IsProgressing; 157 158 this.isPrivilegedCheckBox.Enabled = Content.IsAllowedPrivileged && Content.IsControllable && !(Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded) && !Content.IsProgressing; 159 this.refreshAutomaticallyCheckBox.Enabled = Content.IsControllable && alreadyUploaded && jobsLoaded && Content.ExecutionState == ExecutionState.Started && !Content.IsProgressing; 160 this.refreshButton.Enabled = Content.IsDownloadable && alreadyUploaded && !Content.IsProgressing; 161 this.Locked = !Content.IsControllable || Content.ExecutionState == ExecutionState.Started || Content.IsProgressing; 161 162 } 162 163 SetEnabledStateOfExecutableButtons(); … … 451 452 startButton.Enabled = pauseButton.Enabled = stopButton.Enabled = resetButton.Enabled = false; 452 453 } else { 453 startButton.Enabled = Content.IsControllable && Content.HiveTasks != null && Content.HiveTasks.Count > 0 && (Content.ExecutionState == ExecutionState.Prepared || Content.ExecutionState == ExecutionState.Paused) ;454 pauseButton.Enabled = Content.IsControllable && Content.ExecutionState == ExecutionState.Started ;455 stopButton.Enabled = Content.IsControllable && Content.ExecutionState == ExecutionState.Started ;454 startButton.Enabled = Content.IsControllable && Content.HiveTasks != null && Content.HiveTasks.Count > 0 && (Content.ExecutionState == ExecutionState.Prepared || Content.ExecutionState == ExecutionState.Paused) && !Content.IsProgressing; 455 pauseButton.Enabled = Content.IsControllable && Content.ExecutionState == ExecutionState.Started && !Content.IsProgressing; 456 stopButton.Enabled = Content.IsControllable && Content.ExecutionState == ExecutionState.Started && !Content.IsProgressing; 456 457 resetButton.Enabled = false; 457 458 } -
trunk/sources/HeuristicLab.Clients.Hive/3.3/HiveClient.cs
r8156 r8159 315 315 } 316 316 finally { 317 refreshableJob.IsProgressing = false; 317 318 refreshableJob.Progress.Finish(); 318 refreshableJob.IsProgressing = false;319 319 } 320 320 } … … 471 471 } 472 472 finally { 473 refreshableJob.IsProgressing = false; 473 474 refreshableJob.Progress.Finish(); 474 refreshableJob.IsProgressing = false;475 475 } 476 476 } -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Views/ProgressView.cs
r8156 r8159 115 115 parentView.Locked = true; 116 116 parentView.ReadOnly = true; 117 foreach (Control c in this.parentView.Controls)118 c.Enabled = false;119 117 Enabled = true; 120 118 ReadOnly = false; … … 156 154 parentView.Locked = false; 157 155 parentView.ReadOnly = false; 158 foreach (Control c in this.parentView.Controls)159 c.Enabled = true;160 156 DeregisterProgressEvents(); 161 157 progress = null; 162 this.Visible = false;158 Visible = false; 163 159 } 164 160 }
Note: See TracChangeset
for help on using the changeset viewer.