Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/26/12 09:51:13 (12 years ago)
Author:
jkarder
Message:

#1331: merged r8086:8330 from trunk

Location:
branches/ScatterSearch (trunk integration)
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/ScatterSearch (trunk integration)

  • branches/ScatterSearch (trunk integration)/HeuristicLab.Clients.Hive.JobManager/3.3/Views/HiveResourceSelector.cs

    r8086 r8331  
    4242    private ISet<TreeNode> filteredTreeNodes;
    4343    private ISet<TreeNode> nodeStore;
     44    private Progress progress;
     45    private ProgressView progressView;
    4446
    4547    private ISet<Resource> selectedResources;
     
    4749      get { return selectedResources; }
    4850      set { selectedResources = value; }
    49     }
    50 
    51     private ProgressView progressView;
    52     public ProgressView ProgressView {
    53       get { return progressView; }
    54       set { progressView = value; }
    5551    }
    5652
     
    6864      imageList.Images.Add(HeuristicLab.Common.Resources.VSImageLibrary.MonitorLarge);
    6965      imageList.Images.Add(HeuristicLab.Common.Resources.VSImageLibrary.NetworkCenterLarge);
     66      progress = new Progress() {
     67        CanBeCanceled = false,
     68        ProgressState = ProgressState.Finished
     69      };
     70    }
     71
     72    protected override void DeregisterContentEvents() {
     73      if (progressView != null) {
     74        progressView.Content = null;
     75        progressView.Dispose();
     76        progressView = null;
     77      }
     78      base.DeregisterContentEvents();
     79    }
     80
     81    protected override void RegisterContentEvents() {
     82      base.RegisterContentEvents();
     83      progressView = new ProgressView(this, progress);
    7084    }
    7185
     
    7488        Invoke(new Action(StartProgressView));
    7589      } 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         }
     90        progress.Status = "Downloading resources. Please be patient.";
     91        progress.ProgressState = ProgressState.Started;
    8192      }
    8293    }
     
    8697        Invoke(new Action(FinishProgressView));
    8798      } else {
    88         if (progressView != null) {
    89           progressView.Finish();
    90           progressView = null;
    91           SetEnabledStateOfControls();
    92         }
     99        progress.Finish();
    93100      }
    94101    }
Note: See TracChangeset for help on using the changeset viewer.