Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/18/12 11:50:59 (12 years ago)
Author:
ascheibe
Message:

#1174 worked on upload view

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/Views/OKBExperimentUploadView.cs

    r7839 r7844  
    6969      } else {
    7070        AddRuns(Content);
    71         DisplayRuns();
    7271      }
    7372    }
     
    7675      if (item is Experiment) {
    7776        runs.AddRange((item as Experiment).Runs);
     77        DisplayRuns((item as Experiment).Runs);
    7878      } else if (item is RunCollection) {
    7979        runs.AddRange((item as RunCollection));
     80        DisplayRuns((item as RunCollection));
    8081      } else if (item is IOptimizer) {
    8182        runs.AddRange((item as IOptimizer).Runs);
     83        DisplayRuns((item as IOptimizer).Runs);
    8284      } else if (item is IRun) {
    8385        runs.Add(item as IRun);
     86        RunCollection tmp = new RunCollection();
     87        tmp.Add(item as IRun);
     88        DisplayRuns(tmp);
    8489      }
    8590    }
     
    101106    }
    102107
    103     private void DisplayRuns() {
     108    private void DisplayRuns(RunCollection runs) {
    104109      if (RunCreationClient.Instance.Algorithms == null || RunCreationClient.Instance.Algorithms.Count() == 0) {
    105110        RunCreationClient.Instance.RefreshAsync(DisplayError);
    106111      } else {
    107         CreateUI();
    108       }
    109     }
    110 
    111     private void CreateUI() {
     112        CreateUI(runs);
     113      }
     114    }
     115
     116    private void CreateUI(RunCollection runs) {
    112117      if (problems.Count == 0)
    113118        problems.AddRange(RunCreationClient.Instance.Problems);
     
    128133      cmbProblem.DisplayMember = "Name";
    129134
    130       dataGridView.Rows.Clear();
    131135      foreach (IRun run in runs) {
    132136        int idx = dataGridView.Rows.Add(run.Name);
     
    184188      } else {
    185189        FinishProgressView();
    186 
    187         CreateUI();
    188190        SetEnabledStateOfControls();
    189191      }
     
    241243          progressView = null;
    242244          SetEnabledStateOfControls();
     245          ClearRuns();
    243246        }
    244247      }
     
    291294        if (e.Effect.HasFlag(DragDropEffects.Copy)) optimizer = (IItem)optimizer.Clone();
    292295        AddRuns(optimizer);
    293         DisplayRuns();
    294       }
     296      }
     297    }
     298
     299    private void clearButton_Click(object sender, EventArgs e) {
     300      ClearRuns();
    295301    }
    296302  }
Note: See TracChangeset for help on using the changeset viewer.