- Timestamp:
- 10/09/10 13:27:57 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OKB/HeuristicLab.Clients.OKB-3.3/Views/AlgorithmDataView.cs
r4558 r4587 157 157 if (Content == null) Content = new AlgorithmData { AlgorithmId = AlgorithmId }; 158 158 viewHost.Content = (IContent)dialog.TypeSelector.CreateInstanceOfSelectedType(); 159 DataType dataType = OKBClient.Instance.DataTypes.FirstOrDefault(d => d.Name == viewHost.Content.GetType().AssemblyQualifiedName); 160 if (dataType == null) { 161 dataType = new DataType { Name = viewHost.Content.GetType().AssemblyQualifiedName, SqlName = "varbinary" }; 162 dataType.PlatformId = OKBClient.Instance.Platforms.FirstOrDefault(p => p.Name == "HeuristicLab 3.3").Id; 163 dataType.Store(); 164 OKBClient.Instance.DataTypes.Add(dataType); 165 dataTypeComboBoxValues = OKBClient.Instance.DataTypes.OrderBy(d => d.Name).ToList(); 166 dataTypeComboBox.DataSource = dataTypeComboBoxValues; 167 } 159 DataType dataType = OKBClient.Instance.ConvertToDataType(viewHost.Content.GetType()); 160 dataTypeComboBoxValues = OKBClient.Instance.DataTypes.OrderBy(d => d.Name).ToList(); 161 dataTypeComboBox.DataSource = dataTypeComboBoxValues; 168 162 dataTypeComboBox.SelectedItem = dataType; 169 163 fileTextBox.Text = "-"; … … 190 184 viewHost.Content = algorithm; 191 185 noViewAvailableLabel.Visible = false; 192 DataType dataType = OKBClient.Instance.DataTypes.FirstOrDefault(d => d.Name == viewHost.Content.GetType().AssemblyQualifiedName); 193 if (dataType == null) { 194 dataType = new DataType { Name = viewHost.Content.GetType().AssemblyQualifiedName, SqlName = "varbinary" }; 195 dataType.PlatformId = OKBClient.Instance.Platforms.FirstOrDefault(p => p.Name == "HeuristicLab 3.3").Id; 196 dataType.Store(); 197 OKBClient.Instance.DataTypes.Add(dataType); 198 dataTypeComboBoxValues = OKBClient.Instance.DataTypes.OrderBy(d => d.Name).ToList(); 199 dataTypeComboBox.DataSource = dataTypeComboBoxValues; 200 } 186 DataType dataType = OKBClient.Instance.ConvertToDataType(viewHost.Content.GetType()); 187 dataTypeComboBoxValues = OKBClient.Instance.DataTypes.OrderBy(d => d.Name).ToList(); 188 dataTypeComboBox.DataSource = dataTypeComboBoxValues; 201 189 dataTypeComboBox.SelectedItem = dataType; 202 190 } else {
Note: See TracChangeset
for help on using the changeset viewer.