Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/18/14 13:34:37 (10 years ago)
Author:
ascheibe
Message:

merged only Hive changes from trunk into branch

Location:
branches/HiveStatistics/sources/HeuristicLab.Clients.Hive.Views
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveStatistics/sources/HeuristicLab.Clients.Hive.Views

    • Property svn:mergeinfo set to (toggle deleted branches)
      /trunk/sources/HeuristicLab.Clients.Hive.Viewsmergedeligible
      /branches/Algorithms.GradientDescent/HeuristicLab.Clients.Hive.Views5516-5520
      /branches/Benchmarking/sources/HeuristicLab.Clients.Hive.Views6917-7005
      /branches/CloningRefactoring/HeuristicLab.Clients.Hive.Views4656-4721
      /branches/DataAnalysis Refactoring/HeuristicLab.Clients.Hive.Views5471-5808
      /branches/DataAnalysis SolutionEnsembles/HeuristicLab.Clients.Hive.Views5815-6180
      /branches/DataAnalysis/HeuristicLab.Clients.Hive.Views4458-4459,​4462,​4464
      /branches/GP.Grammar.Editor/HeuristicLab.Clients.Hive.Views6284-6795
      /branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Clients.Hive.Views5060
      /branches/NET40/sources/HeuristicLab.Clients.Hive.Views5138-5162
      /branches/ParallelEngine/HeuristicLab.Clients.Hive.Views5175-5192
      /branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Clients.Hive.Views7568-7810
      /branches/QAPAlgorithms/HeuristicLab.Clients.Hive.Views6350-6627
      /branches/Restructure trunk solution/HeuristicLab.Clients.Hive.Views6828
      /branches/RuntimeOptimizer/HeuristicLab.Clients.Hive.Views8943-9078
      /branches/ScatterSearch (trunk integration)/HeuristicLab.Clients.Hive.Views7787-8333
      /branches/SlaveShutdown/HeuristicLab.Clients.Hive.Views8944-8956
      /branches/SuccessProgressAnalysis/HeuristicLab.Clients.Hive.Views5370-5682
      /branches/Trunk/HeuristicLab.Clients.Hive.Views6829-6865
      /branches/UnloadJobs/HeuristicLab.Clients.Hive.Views9168-9215
      /branches/VNS/HeuristicLab.Clients.Hive.Views5594-5752
      /branches/histogram/HeuristicLab.Clients.Hive.Views5959-6341
  • branches/HiveStatistics/sources/HeuristicLab.Clients.Hive.Views/3.3/HiveTasks/OptimizerHiveTaskView.cs

    r11203 r11204  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    3131  [Content(typeof(OptimizerHiveTask), true)]
    3232  public partial class OptimizerHiveTaskView : HiveTaskView {
    33     private Progress progress;
    34     private ProgressView progressView;
    35 
    3633    public new OptimizerHiveTask Content {
    3734      get { return (OptimizerHiveTask)base.Content; }
     
    4542    public OptimizerHiveTaskView() {
    4643      InitializeComponent();
    47       progress = new Progress() {
    48         CanBeCanceled = false,
    49         ProgressState = ProgressState.Finished
    50       };
    5144    }
    5245
     
    6053      }
    6154    }
     55
    6256    #region Content Events
    6357    protected override void RegisterContentEvents() {
    6458      base.RegisterContentEvents();
    6559      Content.IsControllableChanged += new EventHandler(Content_IsControllableChanged);
    66       progressView = new ProgressView(this, progress);
     60      MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().AddOperationProgressToView(this, Content.Progress);
    6761    }
    6862
    6963    protected override void DeregisterContentEvents() {
    7064      Content.IsControllableChanged -= new EventHandler(Content_IsControllableChanged);
    71       if (progressView != null) {
    72         progressView.Content = null;
    73         progressView.Dispose();
    74         progressView = null;
    75       }
     65      MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this, false);
    7666      base.DeregisterContentEvents();
    7767    }
     
    8070      SetEnabledStateOfControls();
    8171    }
    82 
    8372    #endregion
    8473
     
    8776      var task = System.Threading.Tasks.Task.Factory.StartNew(ResumeTaskAsync);
    8877      task.ContinueWith((t) => {
    89         progress.Finish();
     78        Content.Progress.Finish();
    9079        ErrorHandling.ShowErrorDialog(this, "An error occured while resuming the task.", t.Exception);
    9180      }, TaskContinuationOptions.OnlyOnFaulted);
     
    9584      var task = System.Threading.Tasks.Task.Factory.StartNew(PauseTaskAsync);
    9685      task.ContinueWith((t) => {
    97         progress.Finish();
     86        Content.Progress.Finish();
    9887        ErrorHandling.ShowErrorDialog(this, "An error occured while pausing the task.", t.Exception);
    9988      }, TaskContinuationOptions.OnlyOnFaulted);
     
    10392      var task = System.Threading.Tasks.Task.Factory.StartNew(StopTaskAsync);
    10493      task.ContinueWith((t) => {
    105         progress.Finish();
     94        Content.Progress.Finish();
    10695        ErrorHandling.ShowErrorDialog(this, "An error occured while stopping the task.", t.Exception);
    10796      }, TaskContinuationOptions.OnlyOnFaulted);
     
    11099
    111100    private void PauseTaskAsync() {
    112       progress.Status = "Pausing task. Please be patient for the command to take effect.";
    113       progress.ProgressState = ProgressState.Started;
     101      Content.Progress.Start("Pausing task. Please be patient for the command to take effect.");
    114102      Content.Pause();
    115       progress.Finish();
     103      Content.Progress.Finish();
    116104    }
    117105
    118106    private void StopTaskAsync() {
    119       progress.Status = "Stopping task. Please be patient for the command to take effect.";
    120       progress.ProgressState = ProgressState.Started;
     107      Content.Progress.Start("Stopping task. Please be patient for the command to take effect.");
    121108      Content.Stop();
    122       progress.Finish();
     109      Content.Progress.Finish();
    123110    }
    124111
    125112    private void ResumeTaskAsync() {
    126       progress.Status = "Resuming task. Please be patient for the command to take effect.";
    127       progress.ProgressState = ProgressState.Started;
     113      Content.Progress.Start("Resuming task. Please be patient for the command to take effect.");
    128114      Content.Restart();
    129       progress.Finish();
     115      Content.Progress.Finish();
    130116    }
    131117
Note: See TracChangeset for help on using the changeset viewer.