Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/07/13 13:28:48 (11 years ago)
Author:
jkarder
Message:

#1042

  • progress management is handled internally
  • fixed ProgressView overlays so that they don't get disabled anymore
Location:
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ProgressView.cs

    r9849 r9865  
    167167        Invoke((Action)LockBackground);
    168168      } else {
    169         parentView.Enabled = false;
     169        foreach (Control c in Control.Controls)
     170          c.Enabled = false;
    170171        Enabled = true;
    171172      }
     
    175176      if (InvokeRequired) Invoke((Action)UnlockBackground);
    176177      else {
    177         parentView.Enabled = true;
     178        foreach (Control c in Control.Controls)
     179          c.Enabled = true;
    178180        Enabled = false;
    179181      }
  • trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/MainForm.cs

    r9849 r9865  
    351351    /// Adds a <see cref="ProgressView"/> to the <see cref="ContentView"/>s showing the specified content.
    352352    /// </summary>
    353     public void AddOperationProgressToContent(IContent content, IProgress progress, bool addToObjectGraphObjects = true) {
     353    public void AddOperationProgressToContent(IContent content, string progressMessage, bool addToObjectGraphObjects = true) {
    354354      if (contentProgressLookup.ContainsKey(content))
    355355        throw new ArgumentException("A progress is already registered for the specified content.", "content");
     
    362362        contentViews = views.Keys.OfType<IContentView>().Where(v => v.Content == content);
    363363
     364      var progress = new Progress(progressMessage);
    364365      foreach (var contentView in contentViews)
    365366        ProgressView.Attach(contentView, progress, true);
     
    371372    /// Adds a <see cref="ProgressView"/> to the specified view.
    372373    /// </summary>
    373     public void AddOperationProgressToView(IView view, Progress progress) {
     374    public void AddOperationProgressToView(IView view, string progressMessage) {
    374375      if (viewProgressLookup.ContainsKey(view))
    375376        throw new ArgumentException("A progress is already registered for the specified view.", "view");
    376377
     378      var progress = new Progress(progressMessage);
    377379      ProgressView.Attach(view, progress, true);
    378380      viewProgressLookup[view] = progress;
Note: See TracChangeset for help on using the changeset viewer.