Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5534 for branches


Ignore:
Timestamp:
02/22/11 03:08:43 (13 years ago)
Author:
swagner
Message:

Worked on OKB (#1174)

Location:
branches/OKB (trunk integration)
Files:
1 deleted
19 edited

Legend:

Unmodified
Added
Removed
  • branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/ServiceClient/AdministrationServiceClient.cs

    r5533 r5534  
    1010
    1111namespace HeuristicLab.Clients.OKB.Administration {
    12   using System.Runtime.Serialization;
    1312
    1413
     
    118117    private long AlgorithmClassIdField;
    119118
    120     private HeuristicLab.Clients.OKB.Administration.DataType DataTypeField;
     119    private string DataTypeNameField;
     120
     121    private string DataTypeTypeNameField;
    121122
    122123    private long PlatformIdField;
     
    136137
    137138    [System.Runtime.Serialization.DataMemberAttribute()]
    138     public HeuristicLab.Clients.OKB.Administration.DataType DataType {
    139       get {
    140         return this.DataTypeField;
    141       }
    142       set {
    143         if ((object.ReferenceEquals(this.DataTypeField, value) != true)) {
    144           this.DataTypeField = value;
    145           this.RaisePropertyChanged("DataType");
     139    public string DataTypeName {
     140      get {
     141        return this.DataTypeNameField;
     142      }
     143      set {
     144        if ((object.ReferenceEquals(this.DataTypeNameField, value) != true)) {
     145          this.DataTypeNameField = value;
     146          this.RaisePropertyChanged("DataTypeName");
     147        }
     148      }
     149    }
     150
     151    [System.Runtime.Serialization.DataMemberAttribute()]
     152    public string DataTypeTypeName {
     153      get {
     154        return this.DataTypeTypeNameField;
     155      }
     156      set {
     157        if ((object.ReferenceEquals(this.DataTypeTypeNameField, value) != true)) {
     158          this.DataTypeTypeNameField = value;
     159          this.RaisePropertyChanged("DataTypeTypeName");
    146160        }
    147161      }
     
    175189  public partial class Problem : HeuristicLab.Clients.OKB.Administration.NamedOKBItem {
    176190
    177     private HeuristicLab.Clients.OKB.Administration.DataType DataTypeField;
     191    private string DataTypeNameField;
     192
     193    private string DataTypeTypeNameField;
    178194
    179195    private long PlatformIdField;
     
    182198
    183199    [System.Runtime.Serialization.DataMemberAttribute()]
    184     public HeuristicLab.Clients.OKB.Administration.DataType DataType {
    185       get {
    186         return this.DataTypeField;
    187       }
    188       set {
    189         if ((object.ReferenceEquals(this.DataTypeField, value) != true)) {
    190           this.DataTypeField = value;
    191           this.RaisePropertyChanged("DataType");
     200    public string DataTypeName {
     201      get {
     202        return this.DataTypeNameField;
     203      }
     204      set {
     205        if ((object.ReferenceEquals(this.DataTypeNameField, value) != true)) {
     206          this.DataTypeNameField = value;
     207          this.RaisePropertyChanged("DataTypeName");
     208        }
     209      }
     210    }
     211
     212    [System.Runtime.Serialization.DataMemberAttribute()]
     213    public string DataTypeTypeName {
     214      get {
     215        return this.DataTypeTypeNameField;
     216      }
     217      set {
     218        if ((object.ReferenceEquals(this.DataTypeTypeNameField, value) != true)) {
     219          this.DataTypeTypeNameField = value;
     220          this.RaisePropertyChanged("DataTypeTypeName");
    192221        }
    193222      }
     
    221250  }
    222251
    223   [System.Diagnostics.DebuggerStepThroughAttribute()]
    224   [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    225   [System.Runtime.Serialization.DataContractAttribute(Name = "DataType", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.Administration." +
    226       "DataTransfer")]
    227   public partial class DataType : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
    228 
    229     private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
    230 
    231     private string NameField;
    232 
    233     private string TypeNameField;
    234 
    235     public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
    236       get {
    237         return this.extensionDataField;
    238       }
    239       set {
    240         this.extensionDataField = value;
    241       }
    242     }
    243 
    244     [System.Runtime.Serialization.DataMemberAttribute()]
    245     public string Name {
    246       get {
    247         return this.NameField;
    248       }
    249       set {
    250         if ((object.ReferenceEquals(this.NameField, value) != true)) {
    251           this.NameField = value;
    252           this.RaisePropertyChanged("Name");
    253         }
    254       }
    255     }
    256 
    257     [System.Runtime.Serialization.DataMemberAttribute()]
    258     public string TypeName {
    259       get {
    260         return this.TypeNameField;
    261       }
    262       set {
    263         if ((object.ReferenceEquals(this.TypeNameField, value) != true)) {
    264           this.TypeNameField = value;
    265           this.RaisePropertyChanged("TypeName");
    266         }
    267       }
    268     }
    269 
    270     public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
    271 
    272     protected void RaisePropertyChanged(string propertyName) {
    273       System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
    274       if ((propertyChanged != null)) {
    275         propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
    276       }
    277     }
    278   }
    279 
    280252  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    281253  [System.ServiceModel.ServiceContractAttribute(ConfigurationName = "HeuristicLab.Clients.OKB.Administration.IAdministrationService")]
  • branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/ServiceClient/Algorithm.cs

    r5533 r5534  
    3030      PlatformId = original.PlatformId;
    3131      AlgorithmClassId = original.AlgorithmClassId;
     32      DataTypeName = original.DataTypeName;
     33      DataTypeTypeName = original.DataTypeTypeName;
    3234    }
    3335    public Algorithm() {
     
    3537      PlatformId = 1;
    3638      AlgorithmClassId = 1;
     39      DataTypeName = "Unknown";
     40      DataTypeTypeName = "Unknown";
    3741    }
    3842
  • branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/ServiceClient/NamedOKBItem.cs

    r5533 r5534  
    3333    }
    3434    public NamedOKBItem() {
    35       Name = "New Item";
     35      Name = "New OKB Item";
    3636      Description = string.Empty;
    3737    }
  • branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/ServiceClient/Problem.cs

    r5533 r5534  
    3030      PlatformId = original.PlatformId;
    3131      ProblemClassId = original.ProblemClassId;
     32      DataTypeName = original.DataTypeName;
     33      DataTypeTypeName = original.DataTypeTypeName;
    3234    }
    3335    public Problem() {
     
    3537      PlatformId = 1;
    3638      ProblemClassId = 1;
     39      DataTypeName = "Unknown";
     40      DataTypeTypeName = "Unknown";
    3741    }
    3842
  • branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/AdministratorView.Designer.cs

    r5533 r5534  
    4949      this.platformsTabPage = new System.Windows.Forms.TabPage();
    5050      this.platformCollectionView = new HeuristicLab.Clients.OKB.Administration.PlatformCollectionView();
    51       this.dataTypesTabPage = new System.Windows.Forms.TabPage();
    5251      this.algorithmClassesTabPage = new System.Windows.Forms.TabPage();
    5352      this.algorithmClassCollectionView = new HeuristicLab.Clients.OKB.Administration.AlgorithmClassCollectionView();
     
    5554      this.algorithmCollectionView = new HeuristicLab.Clients.OKB.Administration.AlgorithmCollectionView();
    5655      this.problemClassesTabPage = new System.Windows.Forms.TabPage();
     56      this.problemClassCollectionView = new HeuristicLab.Clients.OKB.Administration.ProblemClassCollectionView();
    5757      this.problemsTabPage = new System.Windows.Forms.TabPage();
     58      this.problemCollectionView = new HeuristicLab.Clients.OKB.Administration.ProblemCollectionView();
    5859      this.refreshButton = new System.Windows.Forms.Button();
    5960      this.toolTip = new System.Windows.Forms.ToolTip(this.components);
    60       this.problemClassCollectionView = new HeuristicLab.Clients.OKB.Administration.ProblemClassCollectionView();
    61       this.problemCollectionView = new HeuristicLab.Clients.OKB.Administration.ProblemCollectionView();
    6261      this.tabControl.SuspendLayout();
    6362      this.platformsTabPage.SuspendLayout();
    64       this.dataTypesTabPage.SuspendLayout();
    6563      this.algorithmClassesTabPage.SuspendLayout();
    6664      this.algorithmsTabPage.SuspendLayout();
     
    7573                  | System.Windows.Forms.AnchorStyles.Right)));
    7674      this.tabControl.Controls.Add(this.platformsTabPage);
    77       this.tabControl.Controls.Add(this.dataTypesTabPage);
    7875      this.tabControl.Controls.Add(this.algorithmClassesTabPage);
    7976      this.tabControl.Controls.Add(this.algorithmsTabPage);
     
    110107      this.platformCollectionView.TabIndex = 0;
    111108      //
    112       // dataTypesTabPage
    113       //
    114       this.dataTypesTabPage.Location = new System.Drawing.Point(4, 22);
    115       this.dataTypesTabPage.Name = "dataTypesTabPage";
    116       this.dataTypesTabPage.Padding = new System.Windows.Forms.Padding(3);
    117       this.dataTypesTabPage.Size = new System.Drawing.Size(719, 380);
    118       this.dataTypesTabPage.TabIndex = 3;
    119       this.dataTypesTabPage.Text = "Data Types";
    120       this.dataTypesTabPage.UseVisualStyleBackColor = true;
    121       //
    122109      // algorithmClassesTabPage
    123110      //
     
    178165      this.problemClassesTabPage.UseVisualStyleBackColor = true;
    179166      //
     167      // problemClassCollectionView
     168      //
     169      this.problemClassCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     170                  | System.Windows.Forms.AnchorStyles.Left)
     171                  | System.Windows.Forms.AnchorStyles.Right)));
     172      this.problemClassCollectionView.Caption = "ProblemClassCollection View";
     173      this.problemClassCollectionView.Content = null;
     174      this.problemClassCollectionView.Location = new System.Drawing.Point(3, 3);
     175      this.problemClassCollectionView.Name = "problemClassCollectionView";
     176      this.problemClassCollectionView.ReadOnly = false;
     177      this.problemClassCollectionView.Size = new System.Drawing.Size(713, 374);
     178      this.problemClassCollectionView.TabIndex = 0;
     179      //
    180180      // problemsTabPage
    181181      //
     
    187187      this.problemsTabPage.Text = "Problems";
    188188      this.problemsTabPage.UseVisualStyleBackColor = true;
     189      //
     190      // problemCollectionView
     191      //
     192      this.problemCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     193                  | System.Windows.Forms.AnchorStyles.Left)
     194                  | System.Windows.Forms.AnchorStyles.Right)));
     195      this.problemCollectionView.Caption = "ProblemCollection View";
     196      this.problemCollectionView.Content = null;
     197      this.problemCollectionView.Location = new System.Drawing.Point(3, 3);
     198      this.problemCollectionView.Name = "problemCollectionView";
     199      this.problemCollectionView.ReadOnly = false;
     200      this.problemCollectionView.Size = new System.Drawing.Size(713, 374);
     201      this.problemCollectionView.TabIndex = 0;
    189202      //
    190203      // refreshButton
     
    199212      this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click);
    200213      //
    201       // problemClassCollectionView
    202       //
    203       this.problemClassCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    204                   | System.Windows.Forms.AnchorStyles.Left)
    205                   | System.Windows.Forms.AnchorStyles.Right)));
    206       this.problemClassCollectionView.Caption = "ProblemClassCollection View";
    207       this.problemClassCollectionView.Content = null;
    208       this.problemClassCollectionView.Location = new System.Drawing.Point(3, 3);
    209       this.problemClassCollectionView.Name = "problemClassCollectionView";
    210       this.problemClassCollectionView.ReadOnly = false;
    211       this.problemClassCollectionView.Size = new System.Drawing.Size(713, 374);
    212       this.problemClassCollectionView.TabIndex = 0;
    213       //
    214       // problemCollectionView
    215       //
    216       this.problemCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    217                   | System.Windows.Forms.AnchorStyles.Left)
    218                   | System.Windows.Forms.AnchorStyles.Right)));
    219       this.problemCollectionView.Caption = "ProblemCollection View";
    220       this.problemCollectionView.Content = null;
    221       this.problemCollectionView.Location = new System.Drawing.Point(3, 3);
    222       this.problemCollectionView.Name = "problemCollectionView";
    223       this.problemCollectionView.ReadOnly = false;
    224       this.problemCollectionView.Size = new System.Drawing.Size(713, 374);
    225       this.problemCollectionView.TabIndex = 0;
    226       //
    227214      // AdministratorView
    228215      //
     
    235222      this.tabControl.ResumeLayout(false);
    236223      this.platformsTabPage.ResumeLayout(false);
    237       this.dataTypesTabPage.ResumeLayout(false);
    238224      this.algorithmClassesTabPage.ResumeLayout(false);
    239225      this.algorithmsTabPage.ResumeLayout(false);
     
    255241    private System.Windows.Forms.TabPage platformsTabPage;
    256242    private PlatformCollectionView platformCollectionView;
    257     private System.Windows.Forms.TabPage dataTypesTabPage;
    258243    private System.Windows.Forms.TabPage problemClassesTabPage;
    259244    private System.Windows.Forms.TabPage problemsTabPage;
  • branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/AlgorithmView.Designer.cs

    r5533 r5534  
    2626    /// </summary>
    2727    private System.ComponentModel.IContainer components = null;
    28 
    29     /// <summary>
    30     /// Clean up any resources being used.
    31     /// </summary>
    32     /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
    33     protected override void Dispose(bool disposing) {
    34       if (disposing) {
    35         if (components != null) components.Dispose();
    36       }
    37       base.Dispose(disposing);
    38     }
    3928
    4029    #region Component Designer generated code
     
    4938      this.algorithmClassLabel = new System.Windows.Forms.Label();
    5039      this.algorithmClassComboBox = new System.Windows.Forms.ComboBox();
    51       this.usersListBox = new System.Windows.Forms.ListBox();
    5240      this.tabControl = new System.Windows.Forms.TabControl();
    5341      this.usersTabPage = new System.Windows.Forms.TabPage();
     42      this.usersListBox = new System.Windows.Forms.CheckedListBox();
    5443      this.storeUsersButton = new System.Windows.Forms.Button();
    5544      this.refreshUsersButton = new System.Windows.Forms.Button();
    5645      this.dataTabPage = new System.Windows.Forms.TabPage();
    57       this.parametersTabPage = new System.Windows.Forms.TabPage();
    58       this.refreshParametersButton = new System.Windows.Forms.Button();
    59       this.resultsTabPage = new System.Windows.Forms.TabPage();
    60       this.refreshResultsButton = new System.Windows.Forms.Button();
    61       this.experimentsTabPage = new System.Windows.Forms.TabPage();
    62       this.refreshExperimentsButton = new System.Windows.Forms.Button();
     46      this.dataTypeNameLabel = new System.Windows.Forms.Label();
     47      this.dataTypeGroupBox = new System.Windows.Forms.GroupBox();
     48      this.dataTypeTypeNameTextBox = new System.Windows.Forms.TextBox();
     49      this.setDataTypeButton = new System.Windows.Forms.Button();
     50      this.dataTypeNameTextBox = new System.Windows.Forms.TextBox();
     51      this.dataTypeTypeNameLabel = new System.Windows.Forms.Label();
    6352      this.tabControl.SuspendLayout();
    6453      this.usersTabPage.SuspendLayout();
    65       this.dataTabPage.SuspendLayout();
    66       this.parametersTabPage.SuspendLayout();
    67       this.resultsTabPage.SuspendLayout();
    68       this.experimentsTabPage.SuspendLayout();
     54      this.dataTypeGroupBox.SuspendLayout();
    6955      this.SuspendLayout();
    7056      //
     
    125111      this.algorithmClassComboBox.SelectedValueChanged += new System.EventHandler(this.algorithmClassComboBox_SelectedValueChanged);
    126112      //
    127       // usersListBox
    128       //
    129       this.usersListBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    130                   | System.Windows.Forms.AnchorStyles.Left)
    131                   | System.Windows.Forms.AnchorStyles.Right)));
    132       this.usersListBox.Enabled = false;
    133       this.usersListBox.FormattingEnabled = true;
    134       this.usersListBox.Location = new System.Drawing.Point(6, 36);
    135       this.usersListBox.Name = "usersListBox";
    136       this.usersListBox.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple;
    137       this.usersListBox.Size = new System.Drawing.Size(613, 225);
    138       this.usersListBox.TabIndex = 2;
    139       this.usersListBox.SelectedIndexChanged += new System.EventHandler(this.usersListBox_SelectedIndexChanged);
    140       //
    141113      // tabControl
    142114      //
     
    146118      this.tabControl.Controls.Add(this.usersTabPage);
    147119      this.tabControl.Controls.Add(this.dataTabPage);
    148       this.tabControl.Controls.Add(this.parametersTabPage);
    149       this.tabControl.Controls.Add(this.resultsTabPage);
    150       this.tabControl.Controls.Add(this.experimentsTabPage);
    151       this.tabControl.Location = new System.Drawing.Point(0, 162);
     120      this.tabControl.Location = new System.Drawing.Point(0, 239);
    152121      this.tabControl.Name = "tabControl";
    153122      this.tabControl.SelectedIndex = 0;
    154       this.tabControl.Size = new System.Drawing.Size(633, 292);
     123      this.tabControl.Size = new System.Drawing.Size(633, 206);
    155124      this.tabControl.TabIndex = 9;
    156125      //
    157126      // usersTabPage
    158127      //
     128      this.usersTabPage.Controls.Add(this.usersListBox);
    159129      this.usersTabPage.Controls.Add(this.storeUsersButton);
    160130      this.usersTabPage.Controls.Add(this.refreshUsersButton);
    161       this.usersTabPage.Controls.Add(this.usersListBox);
    162131      this.usersTabPage.Location = new System.Drawing.Point(4, 22);
    163132      this.usersTabPage.Name = "usersTabPage";
    164133      this.usersTabPage.Padding = new System.Windows.Forms.Padding(3);
    165       this.usersTabPage.Size = new System.Drawing.Size(625, 266);
     134      this.usersTabPage.Size = new System.Drawing.Size(625, 180);
    166135      this.usersTabPage.TabIndex = 0;
    167136      this.usersTabPage.Text = "Authorized Users";
    168137      this.usersTabPage.UseVisualStyleBackColor = true;
     138      //
     139      // usersListBox
     140      //
     141      this.usersListBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     142                  | System.Windows.Forms.AnchorStyles.Left)
     143                  | System.Windows.Forms.AnchorStyles.Right)));
     144      this.usersListBox.FormattingEnabled = true;
     145      this.usersListBox.Location = new System.Drawing.Point(6, 35);
     146      this.usersListBox.Name = "usersListBox";
     147      this.usersListBox.Size = new System.Drawing.Size(613, 139);
     148      this.usersListBox.TabIndex = 3;
    169149      //
    170150      // storeUsersButton
     
    195175      this.dataTabPage.Name = "dataTabPage";
    196176      this.dataTabPage.Padding = new System.Windows.Forms.Padding(3);
    197       this.dataTabPage.Size = new System.Drawing.Size(625, 266);
     177      this.dataTabPage.Size = new System.Drawing.Size(625, 180);
    198178      this.dataTabPage.TabIndex = 1;
    199179      this.dataTabPage.Text = "Platform-Specific Algorithm Data";
    200180      this.dataTabPage.UseVisualStyleBackColor = true;
    201181      //
    202       // refreshParametersButton
    203       //
    204       this.refreshParametersButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Refresh;
    205       this.refreshParametersButton.Location = new System.Drawing.Point(6, 6);
    206       this.refreshParametersButton.Name = "refreshParametersButton";
    207       this.refreshParametersButton.Size = new System.Drawing.Size(24, 24);
    208       this.refreshParametersButton.TabIndex = 0;
    209       this.refreshParametersButton.UseVisualStyleBackColor = true;
    210       //
    211       // refreshResultsButton
    212       //
    213       this.refreshResultsButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Refresh;
    214       this.refreshResultsButton.Location = new System.Drawing.Point(6, 6);
    215       this.refreshResultsButton.Name = "refreshResultsButton";
    216       this.refreshResultsButton.Size = new System.Drawing.Size(24, 24);
    217       this.refreshResultsButton.TabIndex = 0;
    218       this.refreshResultsButton.UseVisualStyleBackColor = true;
    219       //
    220       // refreshExperimentsButton
    221       //
    222       this.refreshExperimentsButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Refresh;
    223       this.refreshExperimentsButton.Location = new System.Drawing.Point(6, 6);
    224       this.refreshExperimentsButton.Name = "refreshExperimentsButton";
    225       this.refreshExperimentsButton.Size = new System.Drawing.Size(24, 24);
    226       this.refreshExperimentsButton.TabIndex = 0;
    227       this.refreshExperimentsButton.UseVisualStyleBackColor = true;
     182      // dataTypeNameLabel
     183      //
     184      this.dataTypeNameLabel.AutoSize = true;
     185      this.dataTypeNameLabel.Location = new System.Drawing.Point(6, 22);
     186      this.dataTypeNameLabel.Name = "dataTypeNameLabel";
     187      this.dataTypeNameLabel.Size = new System.Drawing.Size(38, 13);
     188      this.dataTypeNameLabel.TabIndex = 7;
     189      this.dataTypeNameLabel.Text = "&Name:";
     190      //
     191      // dataTypeGroupBox
     192      //
     193      this.dataTypeGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     194                  | System.Windows.Forms.AnchorStyles.Right)));
     195      this.dataTypeGroupBox.Controls.Add(this.dataTypeTypeNameTextBox);
     196      this.dataTypeGroupBox.Controls.Add(this.setDataTypeButton);
     197      this.dataTypeGroupBox.Controls.Add(this.dataTypeNameTextBox);
     198      this.dataTypeGroupBox.Controls.Add(this.dataTypeTypeNameLabel);
     199      this.dataTypeGroupBox.Controls.Add(this.dataTypeNameLabel);
     200      this.dataTypeGroupBox.Location = new System.Drawing.Point(0, 146);
     201      this.dataTypeGroupBox.Name = "dataTypeGroupBox";
     202      this.dataTypeGroupBox.Size = new System.Drawing.Size(633, 77);
     203      this.dataTypeGroupBox.TabIndex = 10;
     204      this.dataTypeGroupBox.TabStop = false;
     205      this.dataTypeGroupBox.Text = "Data Type";
     206      //
     207      // dataTypeTypeNameTextBox
     208      //
     209      this.dataTypeTypeNameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     210                  | System.Windows.Forms.AnchorStyles.Right)));
     211      this.dataTypeTypeNameTextBox.Location = new System.Drawing.Point(90, 45);
     212      this.dataTypeTypeNameTextBox.Name = "dataTypeTypeNameTextBox";
     213      this.dataTypeTypeNameTextBox.Size = new System.Drawing.Size(507, 20);
     214      this.dataTypeTypeNameTextBox.TabIndex = 8;
     215      this.dataTypeTypeNameTextBox.Validated += new System.EventHandler(this.dataTypeTypeNameTextBox_Validated);
     216      //
     217      // setDataTypeButton
     218      //
     219      this.setDataTypeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     220      this.setDataTypeButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Edit;
     221      this.setDataTypeButton.Location = new System.Drawing.Point(603, 29);
     222      this.setDataTypeButton.Name = "setDataTypeButton";
     223      this.setDataTypeButton.Size = new System.Drawing.Size(24, 24);
     224      this.setDataTypeButton.TabIndex = 1;
     225      this.toolTip.SetToolTip(this.setDataTypeButton, "Set Data Type");
     226      this.setDataTypeButton.UseVisualStyleBackColor = true;
     227      this.setDataTypeButton.Click += new System.EventHandler(this.setDataTypeButton_Click);
     228      //
     229      // dataTypeNameTextBox
     230      //
     231      this.dataTypeNameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     232                  | System.Windows.Forms.AnchorStyles.Right)));
     233      this.dataTypeNameTextBox.Location = new System.Drawing.Point(90, 19);
     234      this.dataTypeNameTextBox.Name = "dataTypeNameTextBox";
     235      this.dataTypeNameTextBox.Size = new System.Drawing.Size(507, 20);
     236      this.dataTypeNameTextBox.TabIndex = 8;
     237      this.dataTypeNameTextBox.Validated += new System.EventHandler(this.dataTypeNameTextBox_Validated);
     238      //
     239      // dataTypeTypeNameLabel
     240      //
     241      this.dataTypeTypeNameLabel.AutoSize = true;
     242      this.dataTypeTypeNameLabel.Location = new System.Drawing.Point(6, 48);
     243      this.dataTypeTypeNameLabel.Name = "dataTypeTypeNameLabel";
     244      this.dataTypeTypeNameLabel.Size = new System.Drawing.Size(65, 13);
     245      this.dataTypeTypeNameLabel.TabIndex = 7;
     246      this.dataTypeTypeNameLabel.Text = "&Type Name:";
    228247      //
    229248      // AlgorithmView
    230249      //
    231250      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     251      this.Controls.Add(this.dataTypeGroupBox);
    232252      this.Controls.Add(this.tabControl);
    233253      this.Controls.Add(this.platformComboBox);
     
    236256      this.Controls.Add(this.algorithmClassLabel);
    237257      this.Name = "AlgorithmView";
    238       this.Size = new System.Drawing.Size(633, 454);
     258      this.Size = new System.Drawing.Size(633, 445);
    239259      this.Controls.SetChildIndex(this.algorithmClassLabel, 0);
    240260      this.Controls.SetChildIndex(this.algorithmClassComboBox, 0);
     
    242262      this.Controls.SetChildIndex(this.platformComboBox, 0);
    243263      this.Controls.SetChildIndex(this.tabControl, 0);
     264      this.Controls.SetChildIndex(this.dataTypeGroupBox, 0);
    244265      this.Controls.SetChildIndex(this.storeButton, 0);
    245266      this.Controls.SetChildIndex(this.nameTextBox, 0);
     
    249270      this.tabControl.ResumeLayout(false);
    250271      this.usersTabPage.ResumeLayout(false);
    251       this.dataTabPage.ResumeLayout(false);
    252       this.parametersTabPage.ResumeLayout(false);
    253       this.resultsTabPage.ResumeLayout(false);
    254       this.experimentsTabPage.ResumeLayout(false);
     272      this.dataTypeGroupBox.ResumeLayout(false);
     273      this.dataTypeGroupBox.PerformLayout();
    255274      this.ResumeLayout(false);
    256275      this.PerformLayout();
     
    264283    private System.Windows.Forms.Label algorithmClassLabel;
    265284    private System.Windows.Forms.ComboBox algorithmClassComboBox;
    266     private System.Windows.Forms.ListBox usersListBox;
    267285    private System.Windows.Forms.TabControl tabControl;
    268286    private System.Windows.Forms.TabPage usersTabPage;
     
    270288    private System.Windows.Forms.Button refreshUsersButton;
    271289    private System.Windows.Forms.TabPage dataTabPage;
    272     private System.Windows.Forms.TabPage parametersTabPage;
    273     private System.Windows.Forms.TabPage resultsTabPage;
    274     private System.Windows.Forms.Button refreshParametersButton;
    275     private System.Windows.Forms.Button refreshResultsButton;
    276     private System.Windows.Forms.TabPage experimentsTabPage;
    277     private System.Windows.Forms.Button refreshExperimentsButton;
     290    private System.Windows.Forms.CheckedListBox usersListBox;
     291    private System.Windows.Forms.Label dataTypeNameLabel;
     292    private System.Windows.Forms.GroupBox dataTypeGroupBox;
     293    private System.Windows.Forms.TextBox dataTypeTypeNameTextBox;
     294    private System.Windows.Forms.TextBox dataTypeNameTextBox;
     295    private System.Windows.Forms.Label dataTypeTypeNameLabel;
     296    private System.Windows.Forms.Button setDataTypeButton;
    278297
    279298  }
  • branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/AlgorithmView.cs

    r5533 r5534  
    2525using System.Windows.Forms;
    2626using HeuristicLab.Clients.OKB.Authentication;
     27using HeuristicLab.Core.Views;
    2728using HeuristicLab.MainForm;
    2829using HeuristicLab.MainForm.WindowsForms;
     30using HeuristicLab.Optimization;
    2931
    3032namespace HeuristicLab.Clients.OKB.Administration {
     
    3436    private List<Platform> platformComboBoxValues;
    3537    private List<AlgorithmClass> algorithmClassComboBoxValues;
     38    private TypeSelectorDialog typeSelectorDialog;
    3639
    3740    public new Algorithm Content {
     
    4245    public AlgorithmView() {
    4346      InitializeComponent();
     47    }
     48
     49    protected override void Dispose(bool disposing) {
     50      if (disposing) {
     51        if (components != null) components.Dispose();
     52        if (typeSelectorDialog != null) typeSelectorDialog.Dispose();
     53      }
     54      base.Dispose(disposing);
    4455    }
    4556
     
    5768        platformComboBox.SelectedIndex = -1;
    5869        algorithmClassComboBox.SelectedIndex = -1;
     70        dataTypeNameTextBox.Text = "";
     71        dataTypeTypeNameTextBox.Text = "";
    5972      } else {
    6073        platformComboBox.SelectedItem = platformComboBoxValues.FirstOrDefault(p => p.Id == Content.PlatformId);
    6174        algorithmClassComboBox.SelectedItem = algorithmClassComboBoxValues.FirstOrDefault(a => a.Id == Content.AlgorithmClassId);
     75        dataTypeNameTextBox.Text = Content.DataTypeName;
     76        dataTypeTypeNameTextBox.Text = Content.DataTypeTypeName;
    6277      }
    6378      usersListBox.DataSource = null;
     
    6883      platformComboBox.Enabled = (Content != null) && !ReadOnly;
    6984      algorithmClassComboBox.Enabled = (Content != null) && !ReadOnly;
     85      dataTypeGroupBox.Enabled = (Content != null) && !ReadOnly;
    7086      refreshUsersButton.Enabled = Content != null;
    7187      storeUsersButton.Enabled = (usersListBox.DataSource != null) && !ReadOnly;
    7288      usersListBox.Enabled = (usersListBox.DataSource != null) && !ReadOnly;
     89
     90      bool isHL33Platform = platformComboBox.Text == "HeuristicLab 3.3";
     91      setDataTypeButton.Enabled = isHL33Platform && !ReadOnly;
     92      dataTypeNameTextBox.ReadOnly = isHL33Platform;
     93      dataTypeTypeNameTextBox.ReadOnly = isHL33Platform;
    7394    }
    7495
     
    7798        case "PlatformId":
    7899          platformComboBox.SelectedItem = platformComboBoxValues.FirstOrDefault(p => p.Id == Content.PlatformId);
     100          SetEnabledStateOfControls();
    79101          break;
    80102        case "AlgorithmClassId":
    81103          algorithmClassComboBox.SelectedItem = algorithmClassComboBoxValues.FirstOrDefault(a => a.Id == Content.AlgorithmClassId);
     104          break;
     105        case "DataTypeName":
     106          dataTypeNameTextBox.Text = Content.DataTypeName;
     107          break;
     108        case "DataTypeTypeName":
     109          dataTypeTypeNameTextBox.Text = Content.DataTypeTypeName;
    82110          break;
    83111      }
     
    97125    }
    98126
     127    private void setDataTypeButton_Click(object sender, EventArgs e) {
     128      if (typeSelectorDialog == null) {
     129        typeSelectorDialog = new TypeSelectorDialog();
     130        typeSelectorDialog.Caption = "Select Algorithm";
     131        typeSelectorDialog.TypeSelector.Caption = "Available Algorithms";
     132        typeSelectorDialog.TypeSelector.Configure(typeof(IAlgorithm), false, true);
     133      }
     134      if (typeSelectorDialog.ShowDialog(this) == DialogResult.OK) {
     135        Content.DataTypeName = typeSelectorDialog.TypeSelector.SelectedType.Name;
     136        Content.DataTypeTypeName = typeSelectorDialog.TypeSelector.SelectedType.AssemblyQualifiedName;
     137      }
     138    }
     139    private void dataTypeNameTextBox_Validated(object sender, EventArgs e) {
     140      Content.DataTypeName = dataTypeNameTextBox.Text;
     141    }
     142    private void dataTypeTypeNameTextBox_Validated(object sender, EventArgs e) {
     143      Content.DataTypeTypeName = dataTypeTypeNameTextBox.Text;
     144    }
     145
    99146    private void refreshUsersButton_Click(object sender, System.EventArgs e) {
    100147      List<Guid> ids = AdministrationClient.Instance.GetAlgorithmUsers(Content.Id);
     
    103150        usersListBox.DataSource = users;
    104151        usersListBox.DisplayMember = "Name";
    105         usersListBox.SelectedItems.Clear();
    106         foreach (Guid id in ids)
    107           usersListBox.SelectedItems.Add(users.First(u => u.Id == id));
     152        for (int i = 0; i < users.Count; i++)
     153          usersListBox.SetItemChecked(i, ids.Contains(users[i].Id));
    108154        usersListBox.Enabled = !ReadOnly;
    109155        storeUsersButton.Enabled = false;
  • branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/ProblemView.Designer.cs

    r5533 r5534  
    4949      this.problemClassLabel = new System.Windows.Forms.Label();
    5050      this.problemClassComboBox = new System.Windows.Forms.ComboBox();
    51       this.usersListBox = new System.Windows.Forms.ListBox();
    5251      this.tabControl = new System.Windows.Forms.TabControl();
    5352      this.usersTabPage = new System.Windows.Forms.TabPage();
     
    5554      this.refreshUsersButton = new System.Windows.Forms.Button();
    5655      this.dataTabPage = new System.Windows.Forms.TabPage();
     56      this.usersListBox = new System.Windows.Forms.CheckedListBox();
    5757      this.tabControl.SuspendLayout();
    5858      this.usersTabPage.SuspendLayout();
    59       this.dataTabPage.SuspendLayout();
    6059      this.SuspendLayout();
    6160      //
     
    10099      this.problemClassLabel.Location = new System.Drawing.Point(3, 111);
    101100      this.problemClassLabel.Name = "problemClassLabel";
    102       this.problemClassLabel.Size = new System.Drawing.Size(81, 13);
     101      this.problemClassLabel.Size = new System.Drawing.Size(76, 13);
    103102      this.problemClassLabel.TabIndex = 7;
    104103      this.problemClassLabel.Text = "&Problem Class:";
     
    116115      this.problemClassComboBox.SelectedValueChanged += new System.EventHandler(this.problemClassComboBox_SelectedValueChanged);
    117116      //
    118       // usersListBox
    119       //
    120       this.usersListBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    121                   | System.Windows.Forms.AnchorStyles.Left)
    122                   | System.Windows.Forms.AnchorStyles.Right)));
    123       this.usersListBox.Enabled = false;
    124       this.usersListBox.FormattingEnabled = true;
    125       this.usersListBox.Location = new System.Drawing.Point(6, 36);
    126       this.usersListBox.Name = "usersListBox";
    127       this.usersListBox.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple;
    128       this.usersListBox.Size = new System.Drawing.Size(613, 225);
    129       this.usersListBox.TabIndex = 2;
    130       this.usersListBox.SelectedIndexChanged += new System.EventHandler(this.usersListBox_SelectedIndexChanged);
    131       //
    132117      // tabControl
    133118      //
     
    140125      this.tabControl.Name = "tabControl";
    141126      this.tabControl.SelectedIndex = 0;
    142       this.tabControl.Size = new System.Drawing.Size(633, 292);
     127      this.tabControl.Size = new System.Drawing.Size(633, 283);
    143128      this.tabControl.TabIndex = 9;
    144129      //
    145130      // usersTabPage
    146131      //
     132      this.usersTabPage.Controls.Add(this.usersListBox);
    147133      this.usersTabPage.Controls.Add(this.storeUsersButton);
    148134      this.usersTabPage.Controls.Add(this.refreshUsersButton);
    149       this.usersTabPage.Controls.Add(this.usersListBox);
    150135      this.usersTabPage.Location = new System.Drawing.Point(4, 22);
    151136      this.usersTabPage.Name = "usersTabPage";
    152137      this.usersTabPage.Padding = new System.Windows.Forms.Padding(3);
    153       this.usersTabPage.Size = new System.Drawing.Size(625, 266);
     138      this.usersTabPage.Size = new System.Drawing.Size(625, 257);
    154139      this.usersTabPage.TabIndex = 0;
    155140      this.usersTabPage.Text = "Authorized Users";
     
    188173      this.dataTabPage.UseVisualStyleBackColor = true;
    189174      //
     175      // usersListBox
     176      //
     177      this.usersListBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     178                  | System.Windows.Forms.AnchorStyles.Left)
     179                  | System.Windows.Forms.AnchorStyles.Right)));
     180      this.usersListBox.FormattingEnabled = true;
     181      this.usersListBox.Location = new System.Drawing.Point(6, 36);
     182      this.usersListBox.Name = "usersListBox";
     183      this.usersListBox.Size = new System.Drawing.Size(613, 214);
     184      this.usersListBox.TabIndex = 3;
     185      //
    190186      // ProblemView
    191187      //
     
    197193      this.Controls.Add(this.problemClassLabel);
    198194      this.Name = "ProblemView";
    199       this.Size = new System.Drawing.Size(633, 454);
     195      this.Size = new System.Drawing.Size(633, 445);
    200196      this.Controls.SetChildIndex(this.problemClassLabel, 0);
    201197      this.Controls.SetChildIndex(this.problemClassComboBox, 0);
     
    210206      this.tabControl.ResumeLayout(false);
    211207      this.usersTabPage.ResumeLayout(false);
    212       this.dataTabPage.ResumeLayout(false);
    213208      this.ResumeLayout(false);
    214209      this.PerformLayout();
     
    222217    private System.Windows.Forms.Label problemClassLabel;
    223218    private System.Windows.Forms.ComboBox problemClassComboBox;
    224     private System.Windows.Forms.ListBox usersListBox;
    225219    private System.Windows.Forms.TabControl tabControl;
    226220    private System.Windows.Forms.TabPage usersTabPage;
     
    228222    private System.Windows.Forms.Button refreshUsersButton;
    229223    private System.Windows.Forms.TabPage dataTabPage;
     224    private System.Windows.Forms.CheckedListBox usersListBox;
    230225
    231226  }
  • branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/HeuristicLab.Clients.OKB-3.3.csproj

    r5533 r5534  
    189189    <None Include="HeuristicLabClientsOKBPlugin.cs.frame" />
    190190  </ItemGroup>
    191   <ItemGroup />
    192191  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    193192  <PropertyGroup>
  • branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataAccess/3.3/OKB.dbml

    r5478 r5534  
    6666      <Column Name="PlatformId" Type="System.Int64" DbType="BigInt NOT NULL" CanBeNull="false" />
    6767      <Column Name="DataTypeId" Type="System.Int64" DbType="BigInt NOT NULL" CanBeNull="false" />
    68       <Column Name="BinaryDataId" Type="System.Int64" DbType="BigInt NOT NULL" CanBeNull="false" />
     68      <Column Name="BinaryDataId" Type="System.Int64" DbType="BigInt" CanBeNull="true" />
    6969      <Column Name="Name" Type="System.String" DbType="NVarChar(200) NOT NULL" CanBeNull="false" />
    7070      <Column Name="Description" Type="System.String" DbType="NVarChar(MAX)" CanBeNull="true" />
     
    8383      <Column Name="PlatformId" Type="System.Int64" DbType="BigInt NOT NULL" CanBeNull="false" />
    8484      <Column Name="DataTypeId" Type="System.Int64" DbType="BigInt NOT NULL" CanBeNull="false" />
    85       <Column Name="BinaryDataId" Type="System.Int64" DbType="BigInt NOT NULL" CanBeNull="false" />
     85      <Column Name="BinaryDataId" Type="System.Int64" DbType="BigInt" CanBeNull="true" />
    8686      <Column Name="Name" Type="System.String" DbType="NVarChar(200) NOT NULL" CanBeNull="false" />
    8787      <Column Name="Description" Type="System.String" DbType="NVarChar(MAX)" CanBeNull="true" />
  • branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataAccess/3.3/OKB.dbml.layout

    r5478 r5534  
    6565      </nodes>
    6666    </associationConnector>
    67     <associationConnector edgePoints="[(7 : 2.39024983723958); (4.75 : 2.39024983723958)]" fixedFrom="Algorithm" fixedTo="Algorithm">
     67    <associationConnector edgePoints="[(7 : 2.39024983723958); (4.75 : 2.39024983723958)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    6868      <AssociationMoniker Name="/OKBDataContext/DataType/DataType_Algorithm" />
    6969      <nodes>
     
    9292      </nodes>
    9393    </associationConnector>
    94     <associationConnector edgePoints="[(9 : 2.39024983723958); (11.25 : 2.39024983723958)]" fixedFrom="Algorithm" fixedTo="Algorithm">
     94    <associationConnector edgePoints="[(9 : 2.39024983723958); (11.25 : 2.39024983723958)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    9595      <AssociationMoniker Name="/OKBDataContext/DataType/DataType_Problem" />
    9696      <nodes>
     
    166166      </nodes>
    167167    </associationConnector>
    168     <associationConnector edgePoints="[(7.273878302532 : 3.5112939453125); (7.273878302532 : 4)]" fixedFrom="Caller" fixedTo="Algorithm">
     168    <associationConnector edgePoints="[(7.273878302532 : 3.5112939453125); (7.273878302532 : 4)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    169169      <AssociationMoniker Name="/OKBDataContext/DataType/DataType_Value" />
    170170      <nodes>
     
    206206      </nodes>
    207207    </associationConnector>
    208     <associationConnector edgePoints="[(8.68784173221247 : 3.5112939453125); (8.68784173221247 : 4)]" fixedFrom="Caller" fixedTo="Algorithm">
     208    <associationConnector edgePoints="[(8.68784173221247 : 3.5112939453125); (8.68784173221247 : 4)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    209209      <AssociationMoniker Name="/OKBDataContext/DataType/DataType_CharacteristicValue" />
    210210      <nodes>
  • branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataAccess/3.3/OKB.designer.cs

    r5478 r5534  
    13121312    private long _DataTypeId;
    13131313   
    1314     private long _BinaryDataId;
     1314    private System.Nullable<long> _BinaryDataId;
    13151315   
    13161316    private string _Name;
     
    13421342    partial void OnDataTypeIdChanging(long value);
    13431343    partial void OnDataTypeIdChanged();
    1344     partial void OnBinaryDataIdChanging(long value);
     1344    partial void OnBinaryDataIdChanging(System.Nullable<long> value);
    13451345    partial void OnBinaryDataIdChanged();
    13461346    partial void OnNameChanging(string value);
     
    14531453    }
    14541454   
    1455     [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BinaryDataId", DbType="BigInt NOT NULL")]
    1456     public long BinaryDataId
     1455    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BinaryDataId", DbType="BigInt")]
     1456    public System.Nullable<long> BinaryDataId
    14571457    {
    14581458      get
     
    16721672          else
    16731673          {
    1674             this._BinaryDataId = default(long);
     1674            this._BinaryDataId = default(Nullable<long>);
    16751675          }
    16761676          this.SendPropertyChanged("BinaryData");
     
    17381738    private long _DataTypeId;
    17391739   
    1740     private long _BinaryDataId;
     1740    private System.Nullable<long> _BinaryDataId;
    17411741   
    17421742    private string _Name;
     
    17701770    partial void OnDataTypeIdChanging(long value);
    17711771    partial void OnDataTypeIdChanged();
    1772     partial void OnBinaryDataIdChanging(long value);
     1772    partial void OnBinaryDataIdChanging(System.Nullable<long> value);
    17731773    partial void OnBinaryDataIdChanged();
    17741774    partial void OnNameChanging(string value);
     
    18821882    }
    18831883   
    1884     [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BinaryDataId", DbType="BigInt NOT NULL")]
    1885     public long BinaryDataId
     1884    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BinaryDataId", DbType="BigInt")]
     1885    public System.Nullable<long> BinaryDataId
    18861886    {
    18871887      get
     
    21142114          else
    21152115          {
    2116             this._BinaryDataId = default(long);
     2116            this._BinaryDataId = default(Nullable<long>);
    21172117          }
    21182118          this.SendPropertyChanged("BinaryData");
  • branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataAccess/3.3/Tests/HeuristicLab.Services.OKB.DataAccess-3.3.Tests.csproj

    r5502 r5534  
    4747  </ItemGroup>
    4848  <ItemGroup>
    49     <Compile Include="DBTests.cs" />
    5049    <Compile Include="Properties\AssemblyInfo.cs" />
    5150  </ItemGroup>
  • branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Administration/AdministrationService.cs

    r5482 r5534  
    134134    public byte[] GetAlgorithmData(long algorithmId) {
    135135      using (OKBDataContext okb = new OKBDataContext()) {
    136         return okb.Algorithms.Where(x => x.Id == algorithmId).Select(x => x.BinaryData.Data.ToArray()).FirstOrDefault();
     136        var data = okb.Algorithms.Where(x => x.Id == algorithmId).Select(x => x.BinaryData).FirstOrDefault();
     137        if (data != null) return data.Data.ToArray();
     138        else return null;
    137139      }
    138140    }
     
    219221    public byte[] GetProblemData(long problemId) {
    220222      using (OKBDataContext okb = new OKBDataContext()) {
    221         return okb.Problems.Where(x => x.Id == problemId).Select(x => x.BinaryData.Data.ToArray()).FirstOrDefault();
     223        var data = okb.Problems.Where(x => x.Id == problemId).Select(x => x.BinaryData).FirstOrDefault();
     224        if (data != null) return data.Data.ToArray();
     225        else return null;
    222226      }
    223227    }
  • branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Administration/Convert.cs

    r5482 r5534  
    6262    public static DT.Algorithm ToDto(DA.Algorithm source) {
    6363      if (source == null) return null;
    64       return new DT.Algorithm { Id = source.Id, Name = source.Name, Description = source.Description, PlatformId = source.PlatformId, AlgorithmClassId = source.AlgorithmClassId, DataType = Convert.ToDto(source.DataType) };
     64      return new DT.Algorithm { Id = source.Id, Name = source.Name, Description = source.Description, PlatformId = source.PlatformId, AlgorithmClassId = source.AlgorithmClassId, DataTypeName = source.DataType.Name, DataTypeTypeName = source.DataType.TypeName };
    6565    }
    6666    public static DA.Algorithm ToEntity(DT.Algorithm source, DA.OKBDataContext okb) {
    6767      if (source == null) return null;
    68       return new DA.Algorithm { Id = source.Id, Name = source.Name, Description = source.Description, PlatformId = source.PlatformId, AlgorithmClassId = source.AlgorithmClassId, DataType = Convert.ToEntity(source.DataType, okb) };
     68      return new DA.Algorithm { Id = source.Id, Name = source.Name, Description = source.Description, PlatformId = source.PlatformId, AlgorithmClassId = source.AlgorithmClassId, DataType = Convert.ToEntity(source.DataTypeName, source.DataTypeTypeName, okb) };
    6969    }
    7070    public static void ToEntity(DT.Algorithm source, DA.Algorithm target, DA.OKBDataContext okb) {
    7171      if ((source != null) && (target != null)) {
    72         target.Id = source.Id; target.Name = source.Name; target.Description = source.Description; target.PlatformId = source.PlatformId; target.AlgorithmClassId = source.AlgorithmClassId; target.DataType = Convert.ToEntity(source.DataType, okb);
     72        target.Id = source.Id; target.Name = source.Name; target.Description = source.Description; target.PlatformId = source.PlatformId; target.AlgorithmClassId = source.AlgorithmClassId; target.DataType = Convert.ToEntity(source.DataTypeName, source.DataTypeTypeName, okb);
    7373      }
    7474    }
     
    9494    public static DT.Problem ToDto(DA.Problem source) {
    9595      if (source == null) return null;
    96       return new DT.Problem { Id = source.Id, Name = source.Name, Description = source.Description, PlatformId = source.PlatformId, ProblemClassId = source.ProblemClassId, DataType = Convert.ToDto(source.DataType) };
     96      return new DT.Problem { Id = source.Id, Name = source.Name, Description = source.Description, PlatformId = source.PlatformId, ProblemClassId = source.ProblemClassId, DataTypeName = source.DataType.Name, DataTypeTypeName = source.DataType.TypeName };
    9797    }
    9898    public static DA.Problem ToEntity(DT.Problem source, DA.OKBDataContext okb) {
    9999      if (source == null) return null;
    100       return new DA.Problem { Id = source.Id, Name = source.Name, Description = source.Description, PlatformId = source.PlatformId, ProblemClassId = source.ProblemClassId, DataType = Convert.ToEntity(source.DataType, okb) };
     100      return new DA.Problem { Id = source.Id, Name = source.Name, Description = source.Description, PlatformId = source.PlatformId, ProblemClassId = source.ProblemClassId, DataType = Convert.ToEntity(source.DataTypeName, source.DataTypeTypeName, okb) };
    101101    }
    102102    public static void ToEntity(DT.Problem source, DA.Problem target, DA.OKBDataContext okb) {
    103103      if ((source != null) && (target != null)) {
    104         target.Id = source.Id; target.Name = source.Name; target.Description = source.Description; target.PlatformId = source.PlatformId; target.ProblemClassId = source.ProblemClassId; target.DataType = Convert.ToEntity(source.DataType, okb);
     104        target.Id = source.Id; target.Name = source.Name; target.Description = source.Description; target.PlatformId = source.PlatformId; target.ProblemClassId = source.ProblemClassId; target.DataType = Convert.ToEntity(source.DataTypeName, source.DataTypeTypeName, okb);
    105105      }
    106106    }
     
    108108
    109109    #region DataType
    110     private static DT.DataType ToDto(DA.DataType source) {
    111       if (source == null) return null;
    112       return new DT.DataType { Name = source.Name, TypeName = source.TypeName };
    113     }
    114     private static DA.DataType ToEntity(DT.DataType source, DA.OKBDataContext okb) {
    115       if (source == null) return null;
    116       var entity = okb.DataTypes.Where(x => (x.Name == source.Name) && (x.TypeName == source.TypeName)).FirstOrDefault();
     110    private static DA.DataType ToEntity(string dataTypeName, string dataTypeTypeName, DA.OKBDataContext okb) {
     111      if ((dataTypeName == null) || (dataTypeTypeName == null)) return null;
     112      var entity = okb.DataTypes.Where(x => (x.Name == dataTypeName) && (x.TypeName == dataTypeTypeName)).FirstOrDefault();
    117113      if (entity == null)
    118         entity = new DA.DataType() { Id = 0, Name = source.Name, TypeName = source.TypeName };
     114        entity = new DA.DataType() { Id = 0, Name = dataTypeName, TypeName = dataTypeTypeName };
    119115      return entity;
    120116    }
  • branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Administration/DataTransfer/Algorithm.cs

    r5482 r5534  
    3030    public long AlgorithmClassId { get; set; }
    3131    [DataMember]
    32     public DataType DataType { get; set; }
     32    public string DataTypeName { get; set; }
     33    [DataMember]
     34    public string DataTypeTypeName { get; set; }
    3335  }
    3436}
  • branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Administration/DataTransfer/Problem.cs

    r5482 r5534  
    3030    public long ProblemClassId { get; set; }
    3131    [DataMember]
    32     public DataType DataType { get; set; }
     32    public string DataTypeName { get; set; }
     33    [DataMember]
     34    public string DataTypeTypeName { get; set; }
    3335  }
    3436}
  • branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/HeuristicLab.Services.OKB-3.3.csproj

    r5502 r5534  
    124124    <Compile Include="Administration\DataTransfer\Algorithm.cs" />
    125125    <Compile Include="Administration\DataTransfer\AlgorithmClass.cs" />
    126     <Compile Include="Administration\DataTransfer\DataType.cs" />
    127126    <Compile Include="Administration\DataTransfer\NamedOKBItem.cs" />
    128127    <Compile Include="Administration\DataTransfer\OKBItem.cs" />
Note: See TracChangeset for help on using the changeset viewer.