Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/18/13 15:08:46 (12 years ago)
Author:
ascheibe
Message:

#2015 jobs are now delete asynchronously in the hive job manager

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobView.cs

    r9219 r9223  
    166166    }
    167167
     168    protected override void OnLockedChanged() {
     169      base.OnLockedChanged();
     170      executionTimeTextBox.Enabled = !Locked;
     171      jobsTextBox.Enabled = !Locked;
     172      calculatingTextBox.Enabled = !Locked;
     173      finishedTextBox.Enabled = !Locked;
     174      tabControl.Enabled = !Locked;
     175      nameTextBox.Enabled = !Locked;
     176      resourceNamesTextBox.Enabled = !Locked;
     177      searchButton.Enabled = !Locked;
     178      jobsTreeView.Enabled = !Locked;
     179      isPrivilegedCheckBox.Enabled = !Locked;
     180      refreshAutomaticallyCheckBox.Enabled = !Locked;
     181      refreshButton.Enabled = !Locked;
     182      UnloadButton.Enabled = !Locked;
     183      startButton.Enabled = !Locked;
     184      pauseButton.Enabled = !Locked;
     185      stopButton.Enabled = !Locked;
     186      resetButton.Enabled = !Locked;
     187    }
     188
    168189    protected override void SetEnabledStateOfControls() {
    169190      base.SetEnabledStateOfControls();
    170       executionTimeTextBox.Enabled = Content != null;
    171       jobsTextBox.ReadOnly = true;
    172       calculatingTextBox.ReadOnly = true;
    173       finishedTextBox.ReadOnly = true;
    174 
    175       if (Content != null) {
    176         bool alreadyUploaded = Content.Id != Guid.Empty;
    177         bool jobsLoaded = Content.HiveTasks != null && Content.HiveTasks.All(x => x.Task.Id != Guid.Empty);
    178         tabControl.Enabled = !Content.IsProgressing;
    179 
    180         this.nameTextBox.ReadOnly = !Content.IsControllable || Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded || Content.IsProgressing;
    181         this.resourceNamesTextBox.ReadOnly = !Content.IsControllable || Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded || Content.IsProgressing;
    182         this.searchButton.Enabled = Content.IsControllable && Content.ExecutionState == ExecutionState.Prepared && !alreadyUploaded && !Content.IsProgressing;
    183         this.jobsTreeView.ReadOnly = !Content.IsControllable || Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded || Content.IsProgressing;
    184 
    185         this.isPrivilegedCheckBox.Enabled = HiveClient.Instance.IsAllowedPrivileged && Content.IsControllable && !(Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded) && !Content.IsProgressing;
    186         this.refreshAutomaticallyCheckBox.Enabled = Content.IsControllable && alreadyUploaded && jobsLoaded && Content.ExecutionState == ExecutionState.Started && !Content.IsProgressing;
    187         this.refreshButton.Enabled = Content.IsDownloadable && alreadyUploaded && !Content.IsProgressing;
    188         this.Locked = !Content.IsControllable || Content.ExecutionState == ExecutionState.Started || Content.IsProgressing;
    189 
    190         this.UnloadButton.Enabled = Content.HiveTasks != null && Content.HiveTasks.Count > 0 && alreadyUploaded && !Content.IsProgressing;
    191       }
    192       SetEnabledStateOfExecutableButtons();
    193       tabControl_SelectedIndexChanged(this, EventArgs.Empty); // ensure sharing tabpage is disabled
     191      if (!Locked) {
     192        executionTimeTextBox.Enabled = Content != null;
     193        jobsTextBox.ReadOnly = true;
     194        calculatingTextBox.ReadOnly = true;
     195        finishedTextBox.ReadOnly = true;
     196
     197        if (Content != null) {
     198          bool alreadyUploaded = Content.Id != Guid.Empty;
     199          bool jobsLoaded = Content.HiveTasks != null && Content.HiveTasks.All(x => x.Task.Id != Guid.Empty);
     200          tabControl.Enabled = !Content.IsProgressing;
     201
     202          this.nameTextBox.ReadOnly = !Content.IsControllable || Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded || Content.IsProgressing;
     203          this.resourceNamesTextBox.ReadOnly = !Content.IsControllable || Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded || Content.IsProgressing;
     204          this.searchButton.Enabled = Content.IsControllable && Content.ExecutionState == ExecutionState.Prepared && !alreadyUploaded && !Content.IsProgressing;
     205          this.jobsTreeView.ReadOnly = !Content.IsControllable || Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded || Content.IsProgressing;
     206
     207          this.isPrivilegedCheckBox.Enabled = HiveClient.Instance.IsAllowedPrivileged && Content.IsControllable && !(Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded) && !Content.IsProgressing;
     208          this.refreshAutomaticallyCheckBox.Enabled = Content.IsControllable && alreadyUploaded && jobsLoaded && Content.ExecutionState == ExecutionState.Started && !Content.IsProgressing;
     209          this.refreshButton.Enabled = Content.IsDownloadable && alreadyUploaded && !Content.IsProgressing;
     210
     211          this.UnloadButton.Enabled = Content.HiveTasks != null && Content.HiveTasks.Count > 0 && alreadyUploaded && !Content.IsProgressing;
     212        }
     213        SetEnabledStateOfExecutableButtons();
     214        tabControl_SelectedIndexChanged(this, EventArgs.Empty); // ensure sharing tabpage is disabled
     215      }
    194216    }
    195217
Note: See TracChangeset for help on using the changeset viewer.