Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4558


Ignore:
Timestamp:
10/06/10 02:51:43 (14 years ago)
Author:
swagner
Message:

Worked on OKB (#1174)

Location:
branches/OKB
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/OKB/HeuristicLab.Clients.OKB-3.3/OKBExperiment.cs

    r4553 r4558  
    4343    }
    4444
    45     [Storable]
    46     private long AlgorithmId { get; set; }
    47     [Storable]
     45    private long algorithmId;
     46    public long AlgorithmId {
     47      get { return algorithmId; }
     48      private set {
     49        if (algorithmId != value) {
     50          algorithmId = value;
     51          OnAlgorithmIdChanged();
     52        }
     53      }
     54    }
    4855    private IAlgorithm algorithm;
    4956    private IAlgorithm Algorithm {
     
    5360        algorithm = value;
    5461        RegisterAlgorithmEvents();
    55         if (algorithm != null) algorithm.Problem = Problem;
    56         OnChanged();
    57       }
    58     }
    59     [Storable]
    60     private long ProblemId { get; set; }
    61     [Storable]
     62        if ((algorithm != null) && (problem != null)) {
     63          algorithm.Problem = problem;
     64          algorithm.Prepare(true);
     65        }
     66      }
     67    }
     68    private long problemId;
     69    public long ProblemId {
     70      get { return problemId; }
     71      private set {
     72        if (problemId != value) {
     73          problemId = value;
     74          OnProblemIdChanged();
     75        }
     76      }
     77    }
    6278    private IProblem problem;
    63     public IProblem Problem {
     79    private IProblem Problem {
    6480      get { return problem; }
    65       private set {
     81      set {
    6682        problem = value;
    67         if (Algorithm != null) Algorithm.Problem = problem;
    68         OnChanged();
     83        if ((algorithm != null) && (problem != null)) {
     84          algorithm.Problem = problem;
     85          algorithm.Prepare(true);
     86        }
    6987      }
    7088    }
     
    7290    public ExecutionState ExecutionState {
    7391      get {
    74         if (Algorithm != null) return Algorithm.ExecutionState;
     92        if ((Algorithm != null) && (Problem != null)) return Algorithm.ExecutionState;
    7593        else return ExecutionState.Stopped;
    7694      }
     
    82100      }
    83101    }
    84     public IKeyedItemCollection<string, IParameter> Parameters {
     102    public IKeyedItemCollection<string, IParameter> AlgorithmParameters {
    85103      get {
    86104        if (Algorithm != null) return Algorithm.Parameters;
     
    88106      }
    89107    }
     108    public IKeyedItemCollection<string, IParameter> ProblemParameters {
     109      get {
     110        if (Problem != null) return Problem.Parameters;
     111        else return null;
     112      }
     113    }
    90114    public ResultCollection Results {
    91115      get {
     
    100124      }
    101125    }
     126
     127    #region Persistence Properties
     128    [Storable(Name = "AlgorithmId")]
     129    private long AlgorithmIdPersistence {
     130      get { return algorithmId; }
     131      set { algorithmId = value; }
     132    }
     133    [Storable(Name = "Algorithm")]
     134    private IAlgorithm AlgorithmPersistence {
     135      get { return Algorithm; }
     136      set { Algorithm = value; }
     137    }
     138    [Storable(Name = "ProblemId")]
     139    private long ProblemIdPersistence {
     140      get { return problemId; }
     141      set { problemId = value; }
     142    }
     143    [Storable(Name = "Problem")]
     144    private IProblem ProblemPersistence {
     145      get { return Problem; }
     146      set { Problem = value; }
     147    }
     148    #endregion
    102149
    103150    public OKBExperiment()
     
    107154    }
    108155    [StorableConstructor]
    109     private OKBExperiment(bool deserializing)
    110       : base(deserializing) {
     156    private OKBExperiment(bool deserializing) : base(deserializing) { }
     157
     158    [StorableHook(HookType.AfterDeserialization)]
     159    private void Initialize() {
    111160      RegisterAlgorithmEvents();
    112161    }
     
    114163    public void Load(Algorithm algorithm) {
    115164      if (algorithm == null) {
     165        Algorithm = null;
    116166        AlgorithmId = 0;
    117         Algorithm = null;
    118167      } else {
    119         AlgorithmId = algorithm.Id;
    120         AlgorithmData algorithmData = OKBClient.Instance.GetAlgorithmData(algorithm.Id);
    121 
    122         using (MemoryStream stream = new MemoryStream(algorithmData.Data)) {
    123           Algorithm = XmlParser.Deserialize<IAlgorithm>(stream);
     168        try {
     169          if (AlgorithmId != algorithm.Id) {
     170            AlgorithmData algorithmData = OKBClient.Instance.GetAlgorithmData(algorithm.Id);
     171            using (MemoryStream stream = new MemoryStream(algorithmData.Data)) {
     172              Algorithm = XmlParser.Deserialize<IAlgorithm>(stream);
     173            }
     174          }
     175          AlgorithmId = algorithm.Id;
     176        }
     177        catch (Exception ex) {
     178          Algorithm = null;
     179          AlgorithmId = 0;
     180          OnExceptionOccurred(ex);
    124181        }
    125182      }
     
    127184    public void Load(Problem problem) {
    128185      if (problem == null) {
     186        Problem = null;
    129187        ProblemId = 0;
    130         Problem = null;
    131188      } else {
    132         ProblemId = problem.Id;
    133         ProblemData problemData = OKBClient.Instance.GetProblemData(problem.Id);
    134 
    135         using (MemoryStream stream = new MemoryStream(problemData.Data)) {
    136           Problem = XmlParser.Deserialize<IProblem>(stream);
     189        try {
     190          if (ProblemId != problem.Id) {
     191            ProblemData problemData = OKBClient.Instance.GetProblemData(problem.Id);
     192            using (MemoryStream stream = new MemoryStream(problemData.Data)) {
     193              Problem = XmlParser.Deserialize<IProblem>(stream);
     194            }
     195          }
     196          ProblemId = problem.Id;
     197        }
     198        catch (Exception ex) {
     199          Problem = null;
     200          ProblemId = 0;
     201          OnExceptionOccurred(ex);
    137202        }
    138203      }
     
    156221
    157222    #region Events
    158     public event EventHandler Changed;
    159     private void OnChanged() {
    160       EventHandler handler = Changed;
     223    public event EventHandler AlgorithmIdChanged;
     224    private void OnAlgorithmIdChanged() {
     225      EventHandler handler = AlgorithmIdChanged;
     226      if (handler != null) handler(this, EventArgs.Empty);
     227    }
     228    public event EventHandler ProblemIdChanged;
     229    private void OnProblemIdChanged() {
     230      EventHandler handler = ProblemIdChanged;
    161231      if (handler != null) handler(this, EventArgs.Empty);
    162232    }
     
    199269    private void RegisterAlgorithmEvents() {
    200270      if (Algorithm != null) {
    201         Algorithm.ExceptionOccurred += new EventHandler<EventArgs<Exception>>(Algorithm_ExceptionOccurred);
    202         Algorithm.ExecutionStateChanged += new EventHandler(Algorithm_ExecutionStateChanged);
    203         Algorithm.ExecutionTimeChanged += new EventHandler(Algorithm_ExecutionTimeChanged);
    204         Algorithm.ItemImageChanged += new EventHandler(Algorithm_ItemImageChanged);
    205         Algorithm.Paused += new EventHandler(Algorithm_Paused);
    206         Algorithm.Prepared += new EventHandler(Algorithm_Prepared);
    207         Algorithm.Started += new EventHandler(Algorithm_Started);
    208         Algorithm.Stopped += new EventHandler(Algorithm_Stopped);
     271        Algorithm.ExceptionOccurred += new EventHandler<EventArgs<Exception>>(algorithm_ExceptionOccurred);
     272        Algorithm.ExecutionStateChanged += new EventHandler(algorithm_ExecutionStateChanged);
     273        Algorithm.ExecutionTimeChanged += new EventHandler(algorithm_ExecutionTimeChanged);
     274        Algorithm.ItemImageChanged += new EventHandler(algorithm_ItemImageChanged);
     275        Algorithm.Paused += new EventHandler(algorithm_Paused);
     276        Algorithm.Prepared += new EventHandler(algorithm_Prepared);
     277        Algorithm.Started += new EventHandler(algorithm_Started);
     278        Algorithm.Stopped += new EventHandler(algorithm_Stopped);
    209279      }
    210280    }
    211281    private void DeregisterAlgorithmEvents() {
    212282      if (Algorithm != null) {
    213         Algorithm.ExceptionOccurred -= new EventHandler<EventArgs<Exception>>(Algorithm_ExceptionOccurred);
    214         Algorithm.ExecutionStateChanged -= new EventHandler(Algorithm_ExecutionStateChanged);
    215         Algorithm.ExecutionTimeChanged -= new EventHandler(Algorithm_ExecutionTimeChanged);
    216         Algorithm.ItemImageChanged -= new EventHandler(Algorithm_ItemImageChanged);
    217         Algorithm.Paused -= new EventHandler(Algorithm_Paused);
    218         Algorithm.Prepared -= new EventHandler(Algorithm_Prepared);
    219         Algorithm.Started -= new EventHandler(Algorithm_Started);
    220         Algorithm.Stopped -= new EventHandler(Algorithm_Stopped);
    221       }
    222     }
    223     private void Algorithm_ExceptionOccurred(object sender, EventArgs<Exception> e) {
     283        Algorithm.ExceptionOccurred -= new EventHandler<EventArgs<Exception>>(algorithm_ExceptionOccurred);
     284        Algorithm.ExecutionStateChanged -= new EventHandler(algorithm_ExecutionStateChanged);
     285        Algorithm.ExecutionTimeChanged -= new EventHandler(algorithm_ExecutionTimeChanged);
     286        Algorithm.ItemImageChanged -= new EventHandler(algorithm_ItemImageChanged);
     287        Algorithm.Paused -= new EventHandler(algorithm_Paused);
     288        Algorithm.Prepared -= new EventHandler(algorithm_Prepared);
     289        Algorithm.Started -= new EventHandler(algorithm_Started);
     290        Algorithm.Stopped -= new EventHandler(algorithm_Stopped);
     291      }
     292    }
     293    private void algorithm_ExceptionOccurred(object sender, EventArgs<Exception> e) {
    224294      OnExceptionOccurred(e.Value);
    225295    }
    226     private void Algorithm_ExecutionStateChanged(object sender, EventArgs e) {
     296    private void algorithm_ExecutionStateChanged(object sender, EventArgs e) {
    227297      OnExecutionStateChanged();
    228298    }
    229     private void Algorithm_ExecutionTimeChanged(object sender, EventArgs e) {
     299    private void algorithm_ExecutionTimeChanged(object sender, EventArgs e) {
    230300      OnExecutionTimeChanged();
    231301    }
    232     private void Algorithm_ItemImageChanged(object sender, EventArgs e) {
     302    private void algorithm_ItemImageChanged(object sender, EventArgs e) {
    233303      OnItemImageChanged();
    234304    }
    235     private void Algorithm_Paused(object sender, EventArgs e) {
     305    private void algorithm_Paused(object sender, EventArgs e) {
    236306      OnPaused();
    237307    }
    238     private void Algorithm_Prepared(object sender, EventArgs e) {
     308    private void algorithm_Prepared(object sender, EventArgs e) {
    239309      OnPrepared();
    240310    }
    241     private void Algorithm_Started(object sender, EventArgs e) {
     311    private void algorithm_Started(object sender, EventArgs e) {
    242312      OnStarted();
    243313    }
    244     private void Algorithm_Stopped(object sender, EventArgs e) {
     314    private void algorithm_Stopped(object sender, EventArgs e) {
    245315      OnStopped();
    246316    }
  • branches/OKB/HeuristicLab.Clients.OKB-3.3/Views/AlgorithmDataView.cs

    r4549 r4558  
    2121
    2222using System;
     23using System.Collections.Generic;
    2324using System.ComponentModel;
    2425using System.IO;
     
    3738  [Content(typeof(AlgorithmData), true)]
    3839  public partial class AlgorithmDataView : AsynchronousContentView {
     40    private List<DataType> dataTypeComboBoxValues;
     41
    3942    private long algorithmId;
    4043    public long AlgorithmId {
     
    6063    protected override void OnInitialized(System.EventArgs e) {
    6164      base.OnInitialized(e);
    62       dataTypeComboBox.DataSource = OKBClient.Instance.DataTypes.ToList();
     65      dataTypeComboBoxValues = OKBClient.Instance.DataTypes.ToList();
     66      dataTypeComboBox.DataSource = dataTypeComboBoxValues;
    6367      dataTypeComboBox.SelectedIndex = -1;
    6468    }
     
    8084        noViewAvailableLabel.Visible = false;
    8185      } else {
    82         dataTypeComboBox.SelectedItem = OKBClient.Instance.DataTypes.FirstOrDefault(d => d.Id == Content.DataTypeId);
     86        dataTypeComboBox.SelectedItem = dataTypeComboBoxValues.FirstOrDefault(d => d.Id == Content.DataTypeId);
    8387
    8488        using (MemoryStream stream = new MemoryStream(Content.Data)) {
     
    111115      switch (e.PropertyName) {
    112116        case "DataTypeId":
    113           dataTypeComboBox.SelectedItem = OKBClient.Instance.DataTypes.FirstOrDefault(d => d.Id == Content.DataTypeId);
     117          dataTypeComboBox.SelectedItem = dataTypeComboBoxValues.FirstOrDefault(d => d.Id == Content.DataTypeId);
    114118          break;
    115119      }
     
    159163              dataType.Store();
    160164              OKBClient.Instance.DataTypes.Add(dataType);
    161               dataTypeComboBox.DataSource = OKBClient.Instance.DataTypes.OrderBy(d => d.Name).ToList();
     165              dataTypeComboBoxValues = OKBClient.Instance.DataTypes.OrderBy(d => d.Name).ToList();
     166              dataTypeComboBox.DataSource = dataTypeComboBoxValues;
    162167            }
    163168            dataTypeComboBox.SelectedItem = dataType;
     
    191196              dataType.Store();
    192197              OKBClient.Instance.DataTypes.Add(dataType);
    193               dataTypeComboBox.DataSource = OKBClient.Instance.DataTypes.OrderBy(d => d.Name).ToList();
     198              dataTypeComboBoxValues = OKBClient.Instance.DataTypes.OrderBy(d => d.Name).ToList();
     199              dataTypeComboBox.DataSource = dataTypeComboBoxValues;
    194200            }
    195201            dataTypeComboBox.SelectedItem = dataType;
  • branches/OKB/HeuristicLab.Clients.OKB-3.3/Views/AlgorithmView.cs

    r4549 r4558  
    3131  [Content(typeof(Algorithm), true)]
    3232  public partial class AlgorithmView : NamedOKBItemView {
     33    private List<Platform> platformComboBoxValues;
     34    private List<AlgorithmClass> algorithmClassComboBoxValues;
     35
    3336    public new Algorithm Content {
    3437      get { return (Algorithm)base.Content; }
     
    4245    protected override void OnInitialized(System.EventArgs e) {
    4346      base.OnInitialized(e);
    44       platformComboBox.DataSource = OKBClient.Instance.Platforms.ToList();
    45       algorithmClassComboBox.DataSource = OKBClient.Instance.AlgorithmClasses.ToList();
     47      platformComboBoxValues = OKBClient.Instance.Platforms.ToList();
     48      platformComboBox.DataSource = platformComboBoxValues;
     49      algorithmClassComboBoxValues = OKBClient.Instance.AlgorithmClasses.ToList();
     50      algorithmClassComboBox.DataSource = algorithmClassComboBoxValues;
    4651    }
    4752
     
    5358        algorithmDataView.AlgorithmId = 0;
    5459      } else {
    55         platformComboBox.SelectedItem = OKBClient.Instance.Platforms.FirstOrDefault(p => p.Id == Content.PlatformId);
    56         algorithmClassComboBox.SelectedItem = OKBClient.Instance.AlgorithmClasses.FirstOrDefault(a => a.Id == Content.AlgorithmClassId);
     60        platformComboBox.SelectedItem = platformComboBoxValues.FirstOrDefault(p => p.Id == Content.PlatformId);
     61        algorithmClassComboBox.SelectedItem = algorithmClassComboBoxValues.FirstOrDefault(a => a.Id == Content.AlgorithmClassId);
    5762        algorithmDataView.AlgorithmId = Content.Id;
    5863      }
     
    7782          break;
    7883        case "PlatformId":
    79           platformComboBox.SelectedItem = OKBClient.Instance.Platforms.FirstOrDefault(p => p.Id == Content.PlatformId);
     84          platformComboBox.SelectedItem = platformComboBoxValues.FirstOrDefault(p => p.Id == Content.PlatformId);
    8085          break;
    8186        case "AlgorithmClassId":
    82           algorithmClassComboBox.SelectedItem = OKBClient.Instance.AlgorithmClasses.FirstOrDefault(a => a.Id == Content.AlgorithmClassId);
     87          algorithmClassComboBox.SelectedItem = algorithmClassComboBoxValues.FirstOrDefault(a => a.Id == Content.AlgorithmClassId);
    8388          break;
    8489      }
  • branches/OKB/HeuristicLab.Clients.OKB-3.3/Views/DataTypeView.cs

    r4549 r4558  
    2121
    2222using System;
     23using System.Collections.Generic;
    2324using System.Linq;
    2425using System.Windows.Forms;
     
    3031  [Content(typeof(DataType), true)]
    3132  public partial class DataTypeView : OKBItemView {
     33    private List<Platform> platformComboBoxValues;
     34
    3235    public new DataType Content {
    3336      get { return (DataType)base.Content; }
     
    4144    protected override void OnInitialized(System.EventArgs e) {
    4245      base.OnInitialized(e);
    43       platformComboBox.DataSource = OKBClient.Instance.Platforms.ToList();
     46      platformComboBoxValues = OKBClient.Instance.Platforms.ToList();
     47      platformComboBox.DataSource = platformComboBoxValues;
    4448    }
    4549
     
    5761        nameTextBox.Text = Content.Name;
    5862        sqlNameComboBox.Text = Content.SqlName;
    59         platformComboBox.SelectedItem = OKBClient.Instance.Platforms.FirstOrDefault(p => p.Id == Content.PlatformId);
     63        platformComboBox.SelectedItem = platformComboBoxValues.FirstOrDefault(p => p.Id == Content.PlatformId);
    6064        Caption = Content.Name;
    6165      }
     
    8084          break;
    8185        case "PlatformId":
    82           platformComboBox.SelectedItem = OKBClient.Instance.Platforms.FirstOrDefault(p => p.Id == Content.PlatformId);
     86          platformComboBox.SelectedItem = platformComboBoxValues.FirstOrDefault(p => p.Id == Content.PlatformId);
    8387          break;
    8488      }
  • branches/OKB/HeuristicLab.Clients.OKB-3.3/Views/OKBExperimentView.Designer.cs

    r4549 r4558  
    5757      this.executionTimeTextBox = new System.Windows.Forms.TextBox();
    5858      this.tabControl = new System.Windows.Forms.TabControl();
    59       this.problemTabPage = new System.Windows.Forms.TabPage();
    60       this.parametersTabPage = new System.Windows.Forms.TabPage();
     59      this.problemParametersTabPage = new System.Windows.Forms.TabPage();
     60      this.algorithmParametersTabPage = new System.Windows.Forms.TabPage();
    6161      this.resultsTabPage = new System.Windows.Forms.TabPage();
    6262      this.runsTabPage = new System.Windows.Forms.TabPage();
    63       this.problemViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
    64       this.parametersViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
     63      this.problemParametersViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
     64      this.algorithmParametersViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
    6565      this.resultsViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
    6666      this.runsViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
    6767      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    6868      this.tabControl.SuspendLayout();
    69       this.problemTabPage.SuspendLayout();
    70       this.parametersTabPage.SuspendLayout();
     69      this.problemParametersTabPage.SuspendLayout();
     70      this.algorithmParametersTabPage.SuspendLayout();
    7171      this.resultsTabPage.SuspendLayout();
    7272      this.runsTabPage.SuspendLayout();
     
    203203                  | System.Windows.Forms.AnchorStyles.Left)
    204204                  | System.Windows.Forms.AnchorStyles.Right)));
    205       this.tabControl.Controls.Add(this.problemTabPage);
    206       this.tabControl.Controls.Add(this.parametersTabPage);
     205      this.tabControl.Controls.Add(this.problemParametersTabPage);
     206      this.tabControl.Controls.Add(this.algorithmParametersTabPage);
    207207      this.tabControl.Controls.Add(this.resultsTabPage);
    208208      this.tabControl.Controls.Add(this.runsTabPage);
     
    213213      this.tabControl.TabIndex = 9;
    214214      //
    215       // problemTabPage
    216       //
    217       this.problemTabPage.Controls.Add(this.problemViewHost);
    218       this.problemTabPage.Location = new System.Drawing.Point(4, 22);
    219       this.problemTabPage.Name = "problemTabPage";
    220       this.problemTabPage.Padding = new System.Windows.Forms.Padding(3);
    221       this.problemTabPage.Size = new System.Drawing.Size(702, 282);
    222       this.problemTabPage.TabIndex = 0;
    223       this.problemTabPage.Text = "Problem";
    224       this.problemTabPage.UseVisualStyleBackColor = true;
    225       //
    226       // parametersTabPage
    227       //
    228       this.parametersTabPage.Controls.Add(this.parametersViewHost);
    229       this.parametersTabPage.Location = new System.Drawing.Point(4, 22);
    230       this.parametersTabPage.Name = "parametersTabPage";
    231       this.parametersTabPage.Padding = new System.Windows.Forms.Padding(3);
    232       this.parametersTabPage.Size = new System.Drawing.Size(702, 282);
    233       this.parametersTabPage.TabIndex = 1;
    234       this.parametersTabPage.Text = "Parameters";
    235       this.parametersTabPage.UseVisualStyleBackColor = true;
     215      // problemParametersTabPage
     216      //
     217      this.problemParametersTabPage.Controls.Add(this.problemParametersViewHost);
     218      this.problemParametersTabPage.Location = new System.Drawing.Point(4, 22);
     219      this.problemParametersTabPage.Name = "problemParametersTabPage";
     220      this.problemParametersTabPage.Padding = new System.Windows.Forms.Padding(3);
     221      this.problemParametersTabPage.Size = new System.Drawing.Size(702, 282);
     222      this.problemParametersTabPage.TabIndex = 0;
     223      this.problemParametersTabPage.Text = "Problem Parameters";
     224      this.problemParametersTabPage.UseVisualStyleBackColor = true;
     225      //
     226      // algorithmParametersTabPage
     227      //
     228      this.algorithmParametersTabPage.Controls.Add(this.algorithmParametersViewHost);
     229      this.algorithmParametersTabPage.Location = new System.Drawing.Point(4, 22);
     230      this.algorithmParametersTabPage.Name = "algorithmParametersTabPage";
     231      this.algorithmParametersTabPage.Padding = new System.Windows.Forms.Padding(3);
     232      this.algorithmParametersTabPage.Size = new System.Drawing.Size(702, 282);
     233      this.algorithmParametersTabPage.TabIndex = 1;
     234      this.algorithmParametersTabPage.Text = "Algorithm Parameters";
     235      this.algorithmParametersTabPage.UseVisualStyleBackColor = true;
    236236      //
    237237      // resultsTabPage
     
    255255      this.runsTabPage.UseVisualStyleBackColor = true;
    256256      //
    257       // problemViewHost
    258       //
    259       this.problemViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    260                   | System.Windows.Forms.AnchorStyles.Left)
    261                   | System.Windows.Forms.AnchorStyles.Right)));
    262       this.problemViewHost.Caption = "View";
    263       this.problemViewHost.Content = null;
    264       this.problemViewHost.Location = new System.Drawing.Point(6, 6);
    265       this.problemViewHost.Name = "problemViewHost";
    266       this.problemViewHost.ReadOnly = false;
    267       this.problemViewHost.Size = new System.Drawing.Size(690, 270);
    268       this.problemViewHost.TabIndex = 0;
    269       this.problemViewHost.ViewType = null;
    270       //
    271       // parametersViewHost
    272       //
    273       this.parametersViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    274                   | System.Windows.Forms.AnchorStyles.Left)
    275                   | System.Windows.Forms.AnchorStyles.Right)));
    276       this.parametersViewHost.Caption = "View";
    277       this.parametersViewHost.Content = null;
    278       this.parametersViewHost.Location = new System.Drawing.Point(6, 6);
    279       this.parametersViewHost.Name = "parametersViewHost";
    280       this.parametersViewHost.ReadOnly = false;
    281       this.parametersViewHost.Size = new System.Drawing.Size(690, 270);
    282       this.parametersViewHost.TabIndex = 1;
    283       this.parametersViewHost.ViewType = null;
     257      // problemParametersViewHost
     258      //
     259      this.problemParametersViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     260                  | System.Windows.Forms.AnchorStyles.Left)
     261                  | System.Windows.Forms.AnchorStyles.Right)));
     262      this.problemParametersViewHost.Caption = "View";
     263      this.problemParametersViewHost.Content = null;
     264      this.problemParametersViewHost.Location = new System.Drawing.Point(6, 6);
     265      this.problemParametersViewHost.Name = "problemParametersViewHost";
     266      this.problemParametersViewHost.ReadOnly = false;
     267      this.problemParametersViewHost.Size = new System.Drawing.Size(690, 270);
     268      this.problemParametersViewHost.TabIndex = 0;
     269      this.problemParametersViewHost.ViewType = null;
     270      //
     271      // algorithmParametersViewHost
     272      //
     273      this.algorithmParametersViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     274                  | System.Windows.Forms.AnchorStyles.Left)
     275                  | System.Windows.Forms.AnchorStyles.Right)));
     276      this.algorithmParametersViewHost.Caption = "View";
     277      this.algorithmParametersViewHost.Content = null;
     278      this.algorithmParametersViewHost.Location = new System.Drawing.Point(6, 6);
     279      this.algorithmParametersViewHost.Name = "algorithmParametersViewHost";
     280      this.algorithmParametersViewHost.ReadOnly = false;
     281      this.algorithmParametersViewHost.Size = new System.Drawing.Size(690, 270);
     282      this.algorithmParametersViewHost.TabIndex = 1;
     283      this.algorithmParametersViewHost.ViewType = null;
    284284      //
    285285      // resultsViewHost
     
    347347      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    348348      this.tabControl.ResumeLayout(false);
    349       this.problemTabPage.ResumeLayout(false);
    350       this.parametersTabPage.ResumeLayout(false);
     349      this.problemParametersTabPage.ResumeLayout(false);
     350      this.algorithmParametersTabPage.ResumeLayout(false);
    351351      this.resultsTabPage.ResumeLayout(false);
    352352      this.runsTabPage.ResumeLayout(false);
     
    370370    private System.Windows.Forms.TextBox executionTimeTextBox;
    371371    private System.Windows.Forms.TabControl tabControl;
    372     private System.Windows.Forms.TabPage problemTabPage;
    373     private System.Windows.Forms.TabPage parametersTabPage;
    374     private MainForm.WindowsForms.ViewHost problemViewHost;
    375     private MainForm.WindowsForms.ViewHost parametersViewHost;
     372    private System.Windows.Forms.TabPage problemParametersTabPage;
     373    private System.Windows.Forms.TabPage algorithmParametersTabPage;
     374    private MainForm.WindowsForms.ViewHost problemParametersViewHost;
     375    private MainForm.WindowsForms.ViewHost algorithmParametersViewHost;
    376376    private System.Windows.Forms.TabPage resultsTabPage;
    377377    private MainForm.WindowsForms.ViewHost resultsViewHost;
  • branches/OKB/HeuristicLab.Clients.OKB-3.3/Views/OKBExperimentView.cs

    r4553 r4558  
    4747      OKBClient.Instance.Refreshing += new EventHandler(OKBClient_Refreshing);
    4848      OKBClient.Instance.Refreshed += new EventHandler(OKBClient_Refreshed);
     49      // TODO: do not forget to deregister events
    4950      PopulateComboBoxes();
    5051    }
    5152
    5253    protected override void DeregisterContentEvents() {
    53       Content.Changed -= new EventHandler(Content_Changed);
     54      Content.AlgorithmIdChanged -= new EventHandler(Content_AlgorithmIdChanged);
     55      Content.ProblemIdChanged -= new EventHandler(Content_ProblemIdChanged);
    5456      Content.ExceptionOccurred -= new EventHandler<EventArgs<Exception>>(Content_ExceptionOccurred);
    5557      Content.ExecutionStateChanged -= new EventHandler(Content_ExecutionStateChanged);
     
    6365    protected override void RegisterContentEvents() {
    6466      base.RegisterContentEvents();
    65       Content.Changed += new EventHandler(Content_Changed);
     67      Content.AlgorithmIdChanged += new EventHandler(Content_AlgorithmIdChanged);
     68      Content.ProblemIdChanged += new EventHandler(Content_ProblemIdChanged);
    6669      Content.ExceptionOccurred += new EventHandler<EventArgs<Exception>>(Content_ExceptionOccurred);
    6770      Content.ExecutionStateChanged += new EventHandler(Content_ExecutionStateChanged);
     
    7679      base.OnContentChanged();
    7780      if (Content == null) {
    78         problemViewHost.Content = null;
    79         parametersViewHost.Content = null;
     81        algorithmComboBox.SelectedIndex = -1;
     82        problemComboBox.SelectedIndex = -1;
     83        problemParametersViewHost.Content = null;
     84        algorithmParametersViewHost.Content = null;
    8085        resultsViewHost.Content = null;
    8186        runsViewHost.Content = null;
    8287        executionTimeTextBox.Text = "-";
    8388      } else {
    84         problemViewHost.Content = Content.Problem;
    85         parametersViewHost.Content = Content.Parameters;
     89        algorithmComboBox.SelectedItem = OKBClient.Instance.Algorithms.FirstOrDefault(x => x.Id == Content.AlgorithmId);
     90        problemComboBox.SelectedItem = OKBClient.Instance.Problems.FirstOrDefault(x => x.Id == Content.ProblemId);
     91        problemParametersViewHost.Content = Content.ProblemParameters;
     92        algorithmParametersViewHost.Content = Content.AlgorithmParameters;
    8693        resultsViewHost.Content = Content.Results;
    8794        runsViewHost.Content = Content.Runs;
     
    99106
    100107    private void PopulateComboBoxes() {
     108      algorithmComboBox.DataSource = null;
     109      problemComboBox.DataSource = null;
    101110      Platform platform = OKBClient.Instance.Platforms.FirstOrDefault(x => x.Name == "HeuristicLab 3.3");
    102111      if (platform != null) {
    103112        algorithmComboBox.DataSource = OKBClient.Instance.Algorithms.Where(x => x.PlatformId == platform.Id).ToList();
    104113        algorithmComboBox.DisplayMember = "Name";
    105         algorithmComboBox.SelectedIndex = -1;
    106114        problemComboBox.DataSource = OKBClient.Instance.Problems.Where(x => x.PlatformId == platform.Id).ToList();
    107115        problemComboBox.DisplayMember = "Name";
    108         problemComboBox.SelectedIndex = -1;
    109116      }
    110117    }
     
    120127      } else {
    121128        Cursor = Cursors.AppStarting;
    122         Enabled = false;
     129        algorithmComboBox.Enabled = problemComboBox.Enabled = tabControl.Enabled = prepareButton.Enabled = startButton.Enabled = pauseButton.Enabled = stopButton.Enabled = executionTimeTextBox.Enabled = false;
    123130      }
    124131    }
     
    128135      } else {
    129136        PopulateComboBoxes();
    130         Enabled = true;
     137        SetEnabledStateOfControls();
    131138        Cursor = Cursors.Default;
    132139      }
     
    134141
    135142    #region Content Events
    136     private void Content_Changed(object sender, EventArgs e) {
    137       OnContentChanged();
    138       SetEnabledStateOfControls();
     143    private void Content_AlgorithmIdChanged(object sender, EventArgs e) {
     144      if (InvokeRequired)
     145        Invoke(new EventHandler(Content_AlgorithmIdChanged), sender, e);
     146      else {
     147        algorithmComboBox.SelectedItem = OKBClient.Instance.Algorithms.FirstOrDefault(x => x.Id == Content.AlgorithmId);
     148        algorithmParametersViewHost.Content = Content.AlgorithmParameters;
     149        resultsViewHost.Content = Content.Results;
     150        runsViewHost.Content = Content.Runs;
     151        executionTimeTextBox.Text = Content.ExecutionTime.ToString();
     152        SetEnabledStateOfExecutableButtons();
     153      }
     154    }
     155    private void Content_ProblemIdChanged(object sender, EventArgs e) {
     156      if (InvokeRequired)
     157        Invoke(new EventHandler(Content_ProblemIdChanged), sender, e);
     158      else {
     159        problemComboBox.SelectedItem = OKBClient.Instance.Problems.FirstOrDefault(x => x.Id == Content.ProblemId);
     160        problemParametersViewHost.Content = Content.ProblemParameters;
     161        SetEnabledStateOfExecutableButtons();
     162      }
    139163    }
    140164    private void Content_ExceptionOccurred(object sender, EventArgs<Exception> e) {
     
    219243    #region Helpers
    220244    private void SetEnabledStateOfExecutableButtons() {
    221       if (Content == null) {
     245      if ((Content == null) || (Content.AlgorithmId == 0) || (Content.ProblemId == 0)) {
    222246        startButton.Enabled = pauseButton.Enabled = stopButton.Enabled = prepareButton.Enabled = false;
    223247      } else {
  • branches/OKB/HeuristicLab.Clients.OKB-3.3/Views/ProblemDataView.cs

    r4549 r4558  
    2121
    2222using System;
     23using System.Collections.Generic;
    2324using System.ComponentModel;
    2425using System.IO;
     
    3738  [Content(typeof(ProblemData), true)]
    3839  public partial class ProblemDataView : AsynchronousContentView {
     40    private List<DataType> dataTypeComboBoxValues;
     41
    3942    private long problemId;
    4043    public long ProblemId {
     
    6063    protected override void OnInitialized(System.EventArgs e) {
    6164      base.OnInitialized(e);
    62       dataTypeComboBox.DataSource = OKBClient.Instance.DataTypes.ToList();
     65      dataTypeComboBoxValues = OKBClient.Instance.DataTypes.ToList();
     66      dataTypeComboBox.DataSource = dataTypeComboBoxValues;
    6367      dataTypeComboBox.SelectedIndex = -1;
    6468    }
     
    8084        noViewAvailableLabel.Visible = false;
    8185      } else {
    82         dataTypeComboBox.SelectedItem = OKBClient.Instance.DataTypes.FirstOrDefault(d => d.Id == Content.DataTypeId);
     86        dataTypeComboBox.SelectedItem = dataTypeComboBoxValues.FirstOrDefault(d => d.Id == Content.DataTypeId);
    8387
    8488        using (MemoryStream stream = new MemoryStream(Content.Data)) {
     
    111115      switch (e.PropertyName) {
    112116        case "DataTypeId":
    113           dataTypeComboBox.SelectedItem = OKBClient.Instance.DataTypes.FirstOrDefault(d => d.Id == Content.DataTypeId);
     117          dataTypeComboBox.SelectedItem = dataTypeComboBoxValues.FirstOrDefault(d => d.Id == Content.DataTypeId);
    114118          break;
    115119      }
     
    158162              dataType.Store();
    159163              OKBClient.Instance.DataTypes.Add(dataType);
    160               dataTypeComboBox.DataSource = OKBClient.Instance.DataTypes.OrderBy(d => d.Name).ToList();
     164              dataTypeComboBoxValues = OKBClient.Instance.DataTypes.OrderBy(d => d.Name).ToList();
     165              dataTypeComboBox.DataSource = dataTypeComboBoxValues;
    161166            }
    162167            dataTypeComboBox.SelectedItem = dataType;
     
    190195              dataType.Store();
    191196              OKBClient.Instance.DataTypes.Add(dataType);
    192               dataTypeComboBox.DataSource = OKBClient.Instance.DataTypes.OrderBy(d => d.Name).ToList();
     197              dataTypeComboBoxValues = OKBClient.Instance.DataTypes.OrderBy(d => d.Name).ToList();
     198              dataTypeComboBox.DataSource = dataTypeComboBoxValues;
    193199            }
    194200            dataTypeComboBox.SelectedItem = dataType;
  • branches/OKB/HeuristicLab.Clients.OKB-3.3/Views/ProblemView.cs

    r4549 r4558  
    3131  [Content(typeof(Problem), true)]
    3232  public partial class ProblemView : NamedOKBItemView {
     33    private List<Platform> platformComboBoxValues;
     34    private List<ProblemClass> problemClassComboBoxValues;
     35
    3336    public new Problem Content {
    3437      get { return (Problem)base.Content; }
     
    4245    protected override void OnInitialized(System.EventArgs e) {
    4346      base.OnInitialized(e);
    44       platformComboBox.DataSource = OKBClient.Instance.Platforms.ToList();
    45       problemClassComboBox.DataSource = OKBClient.Instance.ProblemClasses.ToList();
     47      platformComboBoxValues = OKBClient.Instance.Platforms.ToList();
     48      platformComboBox.DataSource = platformComboBoxValues;
     49      problemClassComboBoxValues = OKBClient.Instance.ProblemClasses.ToList();
     50      problemClassComboBox.DataSource = problemClassComboBoxValues;
    4651    }
    4752
     
    5358        problemDataView.ProblemId = 0;
    5459      } else {
    55         platformComboBox.SelectedItem = OKBClient.Instance.Platforms.FirstOrDefault(p => p.Id == Content.PlatformId);
    56         problemClassComboBox.SelectedItem = OKBClient.Instance.ProblemClasses.FirstOrDefault(a => a.Id == Content.ProblemClassId);
     60        platformComboBox.SelectedItem = platformComboBoxValues.FirstOrDefault(p => p.Id == Content.PlatformId);
     61        problemClassComboBox.SelectedItem = problemClassComboBoxValues.FirstOrDefault(a => a.Id == Content.ProblemClassId);
    5762        problemDataView.ProblemId = Content.Id;
    5863      }
     
    7782          break;
    7883        case "PlatformId":
    79           platformComboBox.SelectedItem = OKBClient.Instance.Platforms.FirstOrDefault(p => p.Id == Content.PlatformId);
     84          platformComboBox.SelectedItem = platformComboBoxValues.FirstOrDefault(p => p.Id == Content.PlatformId);
    8085          break;
    8186        case "ProblemClassId":
    82           problemClassComboBox.SelectedItem = OKBClient.Instance.ProblemClasses.FirstOrDefault(a => a.Id == Content.ProblemClassId);
     87          problemClassComboBox.SelectedItem = problemClassComboBoxValues.FirstOrDefault(a => a.Id == Content.ProblemClassId);
    8388          break;
    8489      }
  • branches/OKB/HeuristicLab.OKB.sln

    r4480 r4558  
    22Microsoft Visual Studio Solution File, Format Version 11.00
    33# Visual Studio 2010
    4 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.OKB.ParameterTable-3.3", "HeuristicLab.OKB.ParameterTable\HeuristicLab.OKB.ParameterTable-3.3.csproj", "{009C72FD-CE2D-4027-87A2-4151B03D2E8F}"
    5 EndProject
    6 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.MainForm.WPF-3.3", "HeuristicLab.MainForm.WPF\HeuristicLab.MainForm.WPF-3.3.csproj", "{1DBC4D60-0064-4A53-B48C-63D144A67B07}"
    7 EndProject
    8 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.OKB.Cockpit-3.3", "HeuristicLab.OKB.Cockpit\HeuristicLab.OKB.Cockpit-3.3.csproj", "{52567721-66A9-4411-9ED6-48DE37732868}"
    9 EndProject
    10 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.AvalonDock-1.2.2691.0", "HeuristicLab.AvalonDock\HeuristicLab.AvalonDock-1.2.2691.0.csproj", "{D86DEAB6-61EA-4008-B2AB-8D8CD5665023}"
    11 EndProject
    12 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.OKB.Cockpit.Admin-3.3", "HeuristicLab.OKB.Cockpit.Admin\HeuristicLab.OKB.Cockpit.Admin-3.3.csproj", "{9AADAE96-361F-48F0-B9B0-31B7DACD0492}"
    13 EndProject
    14 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.OKB.Cockpit.Query-3.3", "HeuristicLab.OKB.Cockpit.Query\HeuristicLab.OKB.Cockpit.Query-3.3.csproj", "{AD85761D-D716-45D4-96E0-5AEF6BD3DE59}"
    15 EndProject
    16 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.OKB.Client-3.3", "HeuristicLab.OKB.Client\HeuristicLab.OKB.Client-3.3.csproj", "{B157FAB7-9B6D-4BAE-ACF2-C6FB7D22EBBD}"
    17 EndProject
    18 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.BackgroundProcessing-3.3", "HeuristicLab.BackgroundProcessing\HeuristicLab.BackgroundProcessing-3.3.csproj", "{589BECAE-69B0-4EB1-8C06-C073531762B7}"
    19 EndProject
    20 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.OKB.AlgorithmHost-3.3", "HeuristicLab.OKB.AlgorithmHost\HeuristicLab.OKB.AlgorithmHost-3.3.csproj", "{7B60CBDC-E7E3-4610-91E2-7CE831A02D35}"
    21 EndProject
    22 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.OKB.Cockpit.Admin.ItemEditor-3.3", "HeuristicLab.OKB.Cockpit.Admin.ItemEditor\HeuristicLab.OKB.Cockpit.Admin.ItemEditor-3.3.csproj", "{CFBF2410-99A1-44EC-BFEA-F1AD4C3DA622}"
    23 EndProject
    244Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{9E843318-7235-4B2B-81A7-160FDDADD9E1}"
    255  ProjectSection(SolutionItems) = preProject
     
    3212EndProject
    3313Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services.OKB.DataAccess-3.3", "HeuristicLab.Services.OKB.DataAccess\3.3\HeuristicLab.Services.OKB.DataAccess-3.3.csproj", "{E36BE58F-F3CE-40BB-9AB3-9F9E30AD5CCF}"
    34 EndProject
    35 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services.OKB.AttributeSelection-3.3", "HeuristicLab.Services.OKB.AttributeSelection\3.3\HeuristicLab.Services.OKB.AttributeSelection-3.3.csproj", "{E80A68DB-D6E1-4395-ABF0-AFE09E4DEF8B}"
    3614EndProject
    3715Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services.OKB-3.3", "HeuristicLab.Services.OKB\3.3\HeuristicLab.Services.OKB-3.3.csproj", "{766DA4B7-2A0E-4CDE-8F90-93D8B1AD62CF}"
     
    4927  EndGlobalSection
    5028  GlobalSection(ProjectConfigurationPlatforms) = postSolution
    51     {009C72FD-CE2D-4027-87A2-4151B03D2E8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    52     {009C72FD-CE2D-4027-87A2-4151B03D2E8F}.Debug|Any CPU.Build.0 = Debug|Any CPU
    53     {009C72FD-CE2D-4027-87A2-4151B03D2E8F}.Debug|x64.ActiveCfg = Debug|x64
    54     {009C72FD-CE2D-4027-87A2-4151B03D2E8F}.Debug|x64.Build.0 = Debug|x64
    55     {009C72FD-CE2D-4027-87A2-4151B03D2E8F}.Debug|x86.ActiveCfg = Debug|x86
    56     {009C72FD-CE2D-4027-87A2-4151B03D2E8F}.Debug|x86.Build.0 = Debug|x86
    57     {009C72FD-CE2D-4027-87A2-4151B03D2E8F}.Release|Any CPU.ActiveCfg = Release|Any CPU
    58     {009C72FD-CE2D-4027-87A2-4151B03D2E8F}.Release|Any CPU.Build.0 = Release|Any CPU
    59     {009C72FD-CE2D-4027-87A2-4151B03D2E8F}.Release|x64.ActiveCfg = Release|x64
    60     {009C72FD-CE2D-4027-87A2-4151B03D2E8F}.Release|x64.Build.0 = Release|x64
    61     {009C72FD-CE2D-4027-87A2-4151B03D2E8F}.Release|x86.ActiveCfg = Release|x86
    62     {009C72FD-CE2D-4027-87A2-4151B03D2E8F}.Release|x86.Build.0 = Release|x86
    63     {1DBC4D60-0064-4A53-B48C-63D144A67B07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    64     {1DBC4D60-0064-4A53-B48C-63D144A67B07}.Debug|Any CPU.Build.0 = Debug|Any CPU
    65     {1DBC4D60-0064-4A53-B48C-63D144A67B07}.Debug|x64.ActiveCfg = Debug|x64
    66     {1DBC4D60-0064-4A53-B48C-63D144A67B07}.Debug|x64.Build.0 = Debug|x64
    67     {1DBC4D60-0064-4A53-B48C-63D144A67B07}.Debug|x86.ActiveCfg = Debug|x86
    68     {1DBC4D60-0064-4A53-B48C-63D144A67B07}.Debug|x86.Build.0 = Debug|x86
    69     {1DBC4D60-0064-4A53-B48C-63D144A67B07}.Release|Any CPU.ActiveCfg = Release|Any CPU
    70     {1DBC4D60-0064-4A53-B48C-63D144A67B07}.Release|Any CPU.Build.0 = Release|Any CPU
    71     {1DBC4D60-0064-4A53-B48C-63D144A67B07}.Release|x64.ActiveCfg = Release|x64
    72     {1DBC4D60-0064-4A53-B48C-63D144A67B07}.Release|x64.Build.0 = Release|x64
    73     {1DBC4D60-0064-4A53-B48C-63D144A67B07}.Release|x86.ActiveCfg = Release|x86
    74     {1DBC4D60-0064-4A53-B48C-63D144A67B07}.Release|x86.Build.0 = Release|x86
    75     {52567721-66A9-4411-9ED6-48DE37732868}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    76     {52567721-66A9-4411-9ED6-48DE37732868}.Debug|Any CPU.Build.0 = Debug|Any CPU
    77     {52567721-66A9-4411-9ED6-48DE37732868}.Debug|x64.ActiveCfg = Debug|x64
    78     {52567721-66A9-4411-9ED6-48DE37732868}.Debug|x64.Build.0 = Debug|x64
    79     {52567721-66A9-4411-9ED6-48DE37732868}.Debug|x86.ActiveCfg = Debug|x86
    80     {52567721-66A9-4411-9ED6-48DE37732868}.Debug|x86.Build.0 = Debug|x86
    81     {52567721-66A9-4411-9ED6-48DE37732868}.Release|Any CPU.ActiveCfg = Release|Any CPU
    82     {52567721-66A9-4411-9ED6-48DE37732868}.Release|Any CPU.Build.0 = Release|Any CPU
    83     {52567721-66A9-4411-9ED6-48DE37732868}.Release|x64.ActiveCfg = Release|x64
    84     {52567721-66A9-4411-9ED6-48DE37732868}.Release|x64.Build.0 = Release|x64
    85     {52567721-66A9-4411-9ED6-48DE37732868}.Release|x86.ActiveCfg = Release|x86
    86     {52567721-66A9-4411-9ED6-48DE37732868}.Release|x86.Build.0 = Release|x86
    87     {D86DEAB6-61EA-4008-B2AB-8D8CD5665023}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    88     {D86DEAB6-61EA-4008-B2AB-8D8CD5665023}.Debug|Any CPU.Build.0 = Debug|Any CPU
    89     {D86DEAB6-61EA-4008-B2AB-8D8CD5665023}.Debug|x64.ActiveCfg = Debug|x64
    90     {D86DEAB6-61EA-4008-B2AB-8D8CD5665023}.Debug|x64.Build.0 = Debug|x64
    91     {D86DEAB6-61EA-4008-B2AB-8D8CD5665023}.Debug|x86.ActiveCfg = Debug|x86
    92     {D86DEAB6-61EA-4008-B2AB-8D8CD5665023}.Debug|x86.Build.0 = Debug|x86
    93     {D86DEAB6-61EA-4008-B2AB-8D8CD5665023}.Release|Any CPU.ActiveCfg = Release|Any CPU
    94     {D86DEAB6-61EA-4008-B2AB-8D8CD5665023}.Release|Any CPU.Build.0 = Release|Any CPU
    95     {D86DEAB6-61EA-4008-B2AB-8D8CD5665023}.Release|x64.ActiveCfg = Release|x64
    96     {D86DEAB6-61EA-4008-B2AB-8D8CD5665023}.Release|x64.Build.0 = Release|x64
    97     {D86DEAB6-61EA-4008-B2AB-8D8CD5665023}.Release|x86.ActiveCfg = Release|x86
    98     {D86DEAB6-61EA-4008-B2AB-8D8CD5665023}.Release|x86.Build.0 = Release|x86
    99     {9AADAE96-361F-48F0-B9B0-31B7DACD0492}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    100     {9AADAE96-361F-48F0-B9B0-31B7DACD0492}.Debug|Any CPU.Build.0 = Debug|Any CPU
    101     {9AADAE96-361F-48F0-B9B0-31B7DACD0492}.Debug|x64.ActiveCfg = Debug|x64
    102     {9AADAE96-361F-48F0-B9B0-31B7DACD0492}.Debug|x64.Build.0 = Debug|x64
    103     {9AADAE96-361F-48F0-B9B0-31B7DACD0492}.Debug|x86.ActiveCfg = Debug|x86
    104     {9AADAE96-361F-48F0-B9B0-31B7DACD0492}.Debug|x86.Build.0 = Debug|x86
    105     {9AADAE96-361F-48F0-B9B0-31B7DACD0492}.Release|Any CPU.ActiveCfg = Release|Any CPU
    106     {9AADAE96-361F-48F0-B9B0-31B7DACD0492}.Release|Any CPU.Build.0 = Release|Any CPU
    107     {9AADAE96-361F-48F0-B9B0-31B7DACD0492}.Release|x64.ActiveCfg = Release|x64
    108     {9AADAE96-361F-48F0-B9B0-31B7DACD0492}.Release|x64.Build.0 = Release|x64
    109     {9AADAE96-361F-48F0-B9B0-31B7DACD0492}.Release|x86.ActiveCfg = Release|x86
    110     {9AADAE96-361F-48F0-B9B0-31B7DACD0492}.Release|x86.Build.0 = Release|x86
    111     {AD85761D-D716-45D4-96E0-5AEF6BD3DE59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    112     {AD85761D-D716-45D4-96E0-5AEF6BD3DE59}.Debug|Any CPU.Build.0 = Debug|Any CPU
    113     {AD85761D-D716-45D4-96E0-5AEF6BD3DE59}.Debug|x64.ActiveCfg = Debug|x64
    114     {AD85761D-D716-45D4-96E0-5AEF6BD3DE59}.Debug|x64.Build.0 = Debug|x64
    115     {AD85761D-D716-45D4-96E0-5AEF6BD3DE59}.Debug|x86.ActiveCfg = Debug|x86
    116     {AD85761D-D716-45D4-96E0-5AEF6BD3DE59}.Debug|x86.Build.0 = Debug|x86
    117     {AD85761D-D716-45D4-96E0-5AEF6BD3DE59}.Release|Any CPU.ActiveCfg = Release|Any CPU
    118     {AD85761D-D716-45D4-96E0-5AEF6BD3DE59}.Release|Any CPU.Build.0 = Release|Any CPU
    119     {AD85761D-D716-45D4-96E0-5AEF6BD3DE59}.Release|x64.ActiveCfg = Release|x64
    120     {AD85761D-D716-45D4-96E0-5AEF6BD3DE59}.Release|x64.Build.0 = Release|x64
    121     {AD85761D-D716-45D4-96E0-5AEF6BD3DE59}.Release|x86.ActiveCfg = Release|x86
    122     {AD85761D-D716-45D4-96E0-5AEF6BD3DE59}.Release|x86.Build.0 = Release|x86
    123     {B157FAB7-9B6D-4BAE-ACF2-C6FB7D22EBBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    124     {B157FAB7-9B6D-4BAE-ACF2-C6FB7D22EBBD}.Debug|Any CPU.Build.0 = Debug|Any CPU
    125     {B157FAB7-9B6D-4BAE-ACF2-C6FB7D22EBBD}.Debug|x64.ActiveCfg = Debug|x64
    126     {B157FAB7-9B6D-4BAE-ACF2-C6FB7D22EBBD}.Debug|x64.Build.0 = Debug|x64
    127     {B157FAB7-9B6D-4BAE-ACF2-C6FB7D22EBBD}.Debug|x86.ActiveCfg = Debug|x86
    128     {B157FAB7-9B6D-4BAE-ACF2-C6FB7D22EBBD}.Debug|x86.Build.0 = Debug|x86
    129     {B157FAB7-9B6D-4BAE-ACF2-C6FB7D22EBBD}.Release|Any CPU.ActiveCfg = Release|Any CPU
    130     {B157FAB7-9B6D-4BAE-ACF2-C6FB7D22EBBD}.Release|Any CPU.Build.0 = Release|Any CPU
    131     {B157FAB7-9B6D-4BAE-ACF2-C6FB7D22EBBD}.Release|x64.ActiveCfg = Release|x64
    132     {B157FAB7-9B6D-4BAE-ACF2-C6FB7D22EBBD}.Release|x64.Build.0 = Release|x64
    133     {B157FAB7-9B6D-4BAE-ACF2-C6FB7D22EBBD}.Release|x86.ActiveCfg = Release|x86
    134     {B157FAB7-9B6D-4BAE-ACF2-C6FB7D22EBBD}.Release|x86.Build.0 = Release|x86
    135     {589BECAE-69B0-4EB1-8C06-C073531762B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    136     {589BECAE-69B0-4EB1-8C06-C073531762B7}.Debug|Any CPU.Build.0 = Debug|Any CPU
    137     {589BECAE-69B0-4EB1-8C06-C073531762B7}.Debug|x64.ActiveCfg = Debug|x64
    138     {589BECAE-69B0-4EB1-8C06-C073531762B7}.Debug|x64.Build.0 = Debug|x64
    139     {589BECAE-69B0-4EB1-8C06-C073531762B7}.Debug|x86.ActiveCfg = Debug|x86
    140     {589BECAE-69B0-4EB1-8C06-C073531762B7}.Debug|x86.Build.0 = Debug|x86
    141     {589BECAE-69B0-4EB1-8C06-C073531762B7}.Release|Any CPU.ActiveCfg = Release|Any CPU
    142     {589BECAE-69B0-4EB1-8C06-C073531762B7}.Release|Any CPU.Build.0 = Release|Any CPU
    143     {589BECAE-69B0-4EB1-8C06-C073531762B7}.Release|x64.ActiveCfg = Release|x64
    144     {589BECAE-69B0-4EB1-8C06-C073531762B7}.Release|x64.Build.0 = Release|x64
    145     {589BECAE-69B0-4EB1-8C06-C073531762B7}.Release|x86.ActiveCfg = Release|x86
    146     {589BECAE-69B0-4EB1-8C06-C073531762B7}.Release|x86.Build.0 = Release|x86
    147     {7B60CBDC-E7E3-4610-91E2-7CE831A02D35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    148     {7B60CBDC-E7E3-4610-91E2-7CE831A02D35}.Debug|Any CPU.Build.0 = Debug|Any CPU
    149     {7B60CBDC-E7E3-4610-91E2-7CE831A02D35}.Debug|x64.ActiveCfg = Debug|x64
    150     {7B60CBDC-E7E3-4610-91E2-7CE831A02D35}.Debug|x64.Build.0 = Debug|x64
    151     {7B60CBDC-E7E3-4610-91E2-7CE831A02D35}.Debug|x86.ActiveCfg = Debug|x86
    152     {7B60CBDC-E7E3-4610-91E2-7CE831A02D35}.Debug|x86.Build.0 = Debug|x86
    153     {7B60CBDC-E7E3-4610-91E2-7CE831A02D35}.Release|Any CPU.ActiveCfg = Release|Any CPU
    154     {7B60CBDC-E7E3-4610-91E2-7CE831A02D35}.Release|Any CPU.Build.0 = Release|Any CPU
    155     {7B60CBDC-E7E3-4610-91E2-7CE831A02D35}.Release|x64.ActiveCfg = Release|x64
    156     {7B60CBDC-E7E3-4610-91E2-7CE831A02D35}.Release|x64.Build.0 = Release|x64
    157     {7B60CBDC-E7E3-4610-91E2-7CE831A02D35}.Release|x86.ActiveCfg = Release|x86
    158     {7B60CBDC-E7E3-4610-91E2-7CE831A02D35}.Release|x86.Build.0 = Release|x86
    159     {CFBF2410-99A1-44EC-BFEA-F1AD4C3DA622}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    160     {CFBF2410-99A1-44EC-BFEA-F1AD4C3DA622}.Debug|Any CPU.Build.0 = Debug|Any CPU
    161     {CFBF2410-99A1-44EC-BFEA-F1AD4C3DA622}.Debug|x64.ActiveCfg = Debug|x64
    162     {CFBF2410-99A1-44EC-BFEA-F1AD4C3DA622}.Debug|x64.Build.0 = Debug|x64
    163     {CFBF2410-99A1-44EC-BFEA-F1AD4C3DA622}.Debug|x86.ActiveCfg = Debug|x86
    164     {CFBF2410-99A1-44EC-BFEA-F1AD4C3DA622}.Debug|x86.Build.0 = Debug|x86
    165     {CFBF2410-99A1-44EC-BFEA-F1AD4C3DA622}.Release|Any CPU.ActiveCfg = Release|Any CPU
    166     {CFBF2410-99A1-44EC-BFEA-F1AD4C3DA622}.Release|Any CPU.Build.0 = Release|Any CPU
    167     {CFBF2410-99A1-44EC-BFEA-F1AD4C3DA622}.Release|x64.ActiveCfg = Release|x64
    168     {CFBF2410-99A1-44EC-BFEA-F1AD4C3DA622}.Release|x64.Build.0 = Release|x64
    169     {CFBF2410-99A1-44EC-BFEA-F1AD4C3DA622}.Release|x86.ActiveCfg = Release|x86
    170     {CFBF2410-99A1-44EC-BFEA-F1AD4C3DA622}.Release|x86.Build.0 = Release|x86
    17129    {73857A9C-9706-4B72-8D9C-210B5B6A5691}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    17230    {73857A9C-9706-4B72-8D9C-210B5B6A5691}.Debug|Any CPU.Build.0 = Debug|Any CPU
     
    19755    {E36BE58F-F3CE-40BB-9AB3-9F9E30AD5CCF}.Release|x86.ActiveCfg = Release|x86
    19856    {E36BE58F-F3CE-40BB-9AB3-9F9E30AD5CCF}.Release|x86.Build.0 = Release|x86
    199     {E80A68DB-D6E1-4395-ABF0-AFE09E4DEF8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    200     {E80A68DB-D6E1-4395-ABF0-AFE09E4DEF8B}.Debug|Any CPU.Build.0 = Debug|Any CPU
    201     {E80A68DB-D6E1-4395-ABF0-AFE09E4DEF8B}.Debug|x64.ActiveCfg = Debug|x64
    202     {E80A68DB-D6E1-4395-ABF0-AFE09E4DEF8B}.Debug|x64.Build.0 = Debug|x64
    203     {E80A68DB-D6E1-4395-ABF0-AFE09E4DEF8B}.Debug|x86.ActiveCfg = Debug|x86
    204     {E80A68DB-D6E1-4395-ABF0-AFE09E4DEF8B}.Debug|x86.Build.0 = Debug|x86
    205     {E80A68DB-D6E1-4395-ABF0-AFE09E4DEF8B}.Release|Any CPU.ActiveCfg = Release|Any CPU
    206     {E80A68DB-D6E1-4395-ABF0-AFE09E4DEF8B}.Release|Any CPU.Build.0 = Release|Any CPU
    207     {E80A68DB-D6E1-4395-ABF0-AFE09E4DEF8B}.Release|x64.ActiveCfg = Release|x64
    208     {E80A68DB-D6E1-4395-ABF0-AFE09E4DEF8B}.Release|x64.Build.0 = Release|x64
    209     {E80A68DB-D6E1-4395-ABF0-AFE09E4DEF8B}.Release|x86.ActiveCfg = Release|x86
    210     {E80A68DB-D6E1-4395-ABF0-AFE09E4DEF8B}.Release|x86.Build.0 = Release|x86
    21157    {766DA4B7-2A0E-4CDE-8F90-93D8B1AD62CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    21258    {766DA4B7-2A0E-4CDE-8F90-93D8B1AD62CF}.Debug|Any CPU.Build.0 = Debug|Any CPU
  • branches/OKB/HeuristicLab.Services.OKB.DataAccess/3.3/Tests/UnitTest.cs

    r4384 r4558  
    2020#endregion
    2121
    22 using System;
    23 using System.Text;
    24 using System.Collections.Generic;
    25 using System.Linq;
    26 using System.Data.Linq;
     22using HeuristicLab.Services.OKB.DataAccess;
    2723using Microsoft.VisualStudio.TestTools.UnitTesting;
    28 using HeuristicLab.Services.OKB.DataAccess;
    2924
    3025namespace HeuristicLab.Services.OKB.DataAccess_33.Tests {
     
    8580        okb.Algorithms.DeleteAllOnSubmit(okb.Algorithms);
    8681        okb.Problems.DeleteAllOnSubmit(okb.Problems);
    87         okb.SolutionRepresentations.DeleteAllOnSubmit(okb.SolutionRepresentations);
    8882        okb.ProblemClasses.DeleteAllOnSubmit(okb.ProblemClasses);
    8983        okb.AlgorithmClasses.DeleteAllOnSubmit(okb.AlgorithmClasses);
     
    9185        AlgorithmClass ac = new AlgorithmClass() { Name = "AlgorithmClass" };
    9286        ProblemClass pc = new ProblemClass() { Name = "ProblemClass" };
    93         SolutionRepresentation sr = new SolutionRepresentation() { Name = "SolutionRepresentation" };
    9487        Algorithm a = new Algorithm() { Name = "Alg", AlgorithmClass = ac, PlatformId = 1 };
    95         Problem p = new Problem() { Name = "Prb", ProblemClass = pc, SolutionRepresentation = sr, PlatformId = 1 };
     88        Problem p = new Problem() { Name = "Prb", ProblemClass = pc, PlatformId = 1 };
    9689        Experiment e = new Experiment() { Algorithm = a, Problem = p };
    9790        AlgorithmParameter ap = new AlgorithmParameter() { Name = "Param", Algorithm = a, DataTypeId = 1 };
Note: See TracChangeset for help on using the changeset viewer.