- Timestamp:
- 10/04/10 04:17:26 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OKB/HeuristicLab.Clients.OKB-3.3/Views/ProblemDataView.cs
r4548 r4549 60 60 protected override void OnInitialized(System.EventArgs e) { 61 61 base.OnInitialized(e); 62 dataTypeComboBox.DataSource = OKB .Instance.DataTypes.ToList();62 dataTypeComboBox.DataSource = OKBClient.Instance.DataTypes.ToList(); 63 63 dataTypeComboBox.SelectedIndex = -1; 64 64 } … … 80 80 noViewAvailableLabel.Visible = false; 81 81 } else { 82 dataTypeComboBox.SelectedItem = OKB .Instance.DataTypes.FirstOrDefault(d => d.Id == Content.DataTypeId);82 dataTypeComboBox.SelectedItem = OKBClient.Instance.DataTypes.FirstOrDefault(d => d.Id == Content.DataTypeId); 83 83 84 84 using (MemoryStream stream = new MemoryStream(Content.Data)) { … … 111 111 switch (e.PropertyName) { 112 112 case "DataTypeId": 113 dataTypeComboBox.SelectedItem = OKB .Instance.DataTypes.FirstOrDefault(d => d.Id == Content.DataTypeId);113 dataTypeComboBox.SelectedItem = OKBClient.Instance.DataTypes.FirstOrDefault(d => d.Id == Content.DataTypeId); 114 114 break; 115 115 } … … 119 119 BeginAsyncCall(); 120 120 var call = new Action(delegate() { 121 ProblemData data = OKB .Instance.GetProblemData(ProblemId);121 ProblemData data = OKBClient.Instance.GetProblemData(ProblemId); 122 122 Content = data; 123 123 }); … … 141 141 } 142 142 } 143 OKB .Instance.UpdateProblemData(Content);143 OKBClient.Instance.UpdateProblemData(Content); 144 144 } 145 145 private void newDataButton_Click(object sender, EventArgs e) { … … 152 152 if (Content == null) Content = new ProblemData { ProblemId = ProblemId }; 153 153 viewHost.Content = (IContent)dialog.TypeSelector.CreateInstanceOfSelectedType(); 154 DataType dataType = OKB .Instance.DataTypes.FirstOrDefault(d => d.Name == viewHost.Content.GetType().AssemblyQualifiedName);154 DataType dataType = OKBClient.Instance.DataTypes.FirstOrDefault(d => d.Name == viewHost.Content.GetType().AssemblyQualifiedName); 155 155 if (dataType == null) { 156 156 dataType = new DataType { Name = viewHost.Content.GetType().AssemblyQualifiedName, SqlName = "varbinary" }; 157 dataType.PlatformId = OKB .Instance.Platforms.FirstOrDefault(p => p.Name == "HeuristicLab 3.3").Id;157 dataType.PlatformId = OKBClient.Instance.Platforms.FirstOrDefault(p => p.Name == "HeuristicLab 3.3").Id; 158 158 dataType.Store(); 159 OKB .Instance.DataTypes.Add(dataType);160 dataTypeComboBox.DataSource = OKB .Instance.DataTypes.OrderBy(d => d.Name).ToList();159 OKBClient.Instance.DataTypes.Add(dataType); 160 dataTypeComboBox.DataSource = OKBClient.Instance.DataTypes.OrderBy(d => d.Name).ToList(); 161 161 } 162 162 dataTypeComboBox.SelectedItem = dataType; … … 184 184 viewHost.Content = problem; 185 185 noViewAvailableLabel.Visible = false; 186 DataType dataType = OKB .Instance.DataTypes.FirstOrDefault(d => d.Name == viewHost.Content.GetType().AssemblyQualifiedName);186 DataType dataType = OKBClient.Instance.DataTypes.FirstOrDefault(d => d.Name == viewHost.Content.GetType().AssemblyQualifiedName); 187 187 if (dataType == null) { 188 188 dataType = new DataType { Name = viewHost.Content.GetType().AssemblyQualifiedName, SqlName = "varbinary" }; 189 dataType.PlatformId = OKB .Instance.Platforms.FirstOrDefault(p => p.Name == "HeuristicLab 3.3").Id;189 dataType.PlatformId = OKBClient.Instance.Platforms.FirstOrDefault(p => p.Name == "HeuristicLab 3.3").Id; 190 190 dataType.Store(); 191 OKB .Instance.DataTypes.Add(dataType);192 dataTypeComboBox.DataSource = OKB .Instance.DataTypes.OrderBy(d => d.Name).ToList();191 OKBClient.Instance.DataTypes.Add(dataType); 192 dataTypeComboBox.DataSource = OKBClient.Instance.DataTypes.OrderBy(d => d.Name).ToList(); 193 193 } 194 194 dataTypeComboBox.SelectedItem = dataType;
Note: See TracChangeset
for help on using the changeset viewer.