Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/28/12 12:00:51 (12 years ago)
Author:
ascheibe
Message:

#1762 implemented review comments:

  • removed self disposing. The progress view now reacts if a progress is set and Finish() is now called on the progress object and not the view.
  • Moved Cancel event from ProgressView to Progress
  • throw ArgumentNullException if the parent view is null
File:
1 edited

Legend:

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

    r7928 r8145  
    4242    private ISet<TreeNode> filteredTreeNodes;
    4343    private ISet<TreeNode> nodeStore;
     44    private IProgress currentProgress;
    4445
    4546    private ISet<Resource> selectedResources;
     
    6869      imageList.Images.Add(HeuristicLab.Common.Resources.VSImageLibrary.MonitorLarge);
    6970      imageList.Images.Add(HeuristicLab.Common.Resources.VSImageLibrary.NetworkCenterLarge);
     71      progressView = new ProgressView(this);
    7072    }
    7173
     
    7476        Invoke(new Action(StartProgressView));
    7577      } else {
    76         if (progressView == null) {
    77           IProgress prog = new Progress();
    78           prog.Status = "Downloading resources. Please be patient.";
    79           progressView = new ProgressView(this, prog);
    80         }
     78        currentProgress = new Progress();
     79        currentProgress.Status = "Downloading resources. Please be patient.";
     80        progressView.Progress = currentProgress;
    8181      }
    8282    }
     
    8686        Invoke(new Action(FinishProgressView));
    8787      } else {
    88         if (progressView != null) {
    89           progressView.Finish();
    90           progressView = null;
    91           SetEnabledStateOfControls();
    92         }
     88        currentProgress.Finish();
     89        SetEnabledStateOfControls();
    9390      }
    9491    }
Note: See TracChangeset for help on using the changeset viewer.