Free cookie consent management tool by TermsFeed Policy Generator

Changeset 8159


Ignore:
Timestamp:
06/29/12 12:58:51 (12 years ago)
Author:
ascheibe
Message:

#1762 removed blind disabling of controls

Location:
trunk/sources
Files:
3 edited

Legend:

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

    r8156 r8159  
    149149        bool alreadyUploaded = Content.Id != Guid.Empty;
    150150        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;
    161162      }
    162163      SetEnabledStateOfExecutableButtons();
     
    451452        startButton.Enabled = pauseButton.Enabled = stopButton.Enabled = resetButton.Enabled = false;
    452453      } 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;
    456457        resetButton.Enabled = false;
    457458      }
  • trunk/sources/HeuristicLab.Clients.Hive/3.3/HiveClient.cs

    r8156 r8159  
    315315      }
    316316      finally {
     317        refreshableJob.IsProgressing = false;
    317318        refreshableJob.Progress.Finish();
    318         refreshableJob.IsProgressing = false;
    319319      }
    320320    }
     
    471471      }
    472472      finally {
     473        refreshableJob.IsProgressing = false;
    473474        refreshableJob.Progress.Finish();
    474         refreshableJob.IsProgressing = false;
    475475      }
    476476    }
  • trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Views/ProgressView.cs

    r8156 r8159  
    115115        parentView.Locked = true;
    116116        parentView.ReadOnly = true;
    117         foreach (Control c in this.parentView.Controls)
    118           c.Enabled = false;
    119117        Enabled = true;
    120118        ReadOnly = false;
     
    156154        parentView.Locked = false;
    157155        parentView.ReadOnly = false;
    158         foreach (Control c in this.parentView.Controls)
    159           c.Enabled = true;
    160156        DeregisterProgressEvents();
    161157        progress = null;
    162         this.Visible = false;
     158        Visible = false;
    163159      }
    164160    }
Note: See TracChangeset for help on using the changeset viewer.