- Timestamp:
- 02/22/11 03:08:43 (14 years ago)
- 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 10 10 11 11 namespace HeuristicLab.Clients.OKB.Administration { 12 using System.Runtime.Serialization;13 12 14 13 … … 118 117 private long AlgorithmClassIdField; 119 118 120 private HeuristicLab.Clients.OKB.Administration.DataType DataTypeField; 119 private string DataTypeNameField; 120 121 private string DataTypeTypeNameField; 121 122 122 123 private long PlatformIdField; … … 136 137 137 138 [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"); 146 160 } 147 161 } … … 175 189 public partial class Problem : HeuristicLab.Clients.OKB.Administration.NamedOKBItem { 176 190 177 private HeuristicLab.Clients.OKB.Administration.DataType DataTypeField; 191 private string DataTypeNameField; 192 193 private string DataTypeTypeNameField; 178 194 179 195 private long PlatformIdField; … … 182 198 183 199 [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"); 192 221 } 193 222 } … … 221 250 } 222 251 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 280 252 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] 281 253 [System.ServiceModel.ServiceContractAttribute(ConfigurationName = "HeuristicLab.Clients.OKB.Administration.IAdministrationService")] -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/ServiceClient/Algorithm.cs
r5533 r5534 30 30 PlatformId = original.PlatformId; 31 31 AlgorithmClassId = original.AlgorithmClassId; 32 DataTypeName = original.DataTypeName; 33 DataTypeTypeName = original.DataTypeTypeName; 32 34 } 33 35 public Algorithm() { … … 35 37 PlatformId = 1; 36 38 AlgorithmClassId = 1; 39 DataTypeName = "Unknown"; 40 DataTypeTypeName = "Unknown"; 37 41 } 38 42 -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/ServiceClient/NamedOKBItem.cs
r5533 r5534 33 33 } 34 34 public NamedOKBItem() { 35 Name = "New Item";35 Name = "New OKB Item"; 36 36 Description = string.Empty; 37 37 } -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/ServiceClient/Problem.cs
r5533 r5534 30 30 PlatformId = original.PlatformId; 31 31 ProblemClassId = original.ProblemClassId; 32 DataTypeName = original.DataTypeName; 33 DataTypeTypeName = original.DataTypeTypeName; 32 34 } 33 35 public Problem() { … … 35 37 PlatformId = 1; 36 38 ProblemClassId = 1; 39 DataTypeName = "Unknown"; 40 DataTypeTypeName = "Unknown"; 37 41 } 38 42 -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/AdministratorView.Designer.cs
r5533 r5534 49 49 this.platformsTabPage = new System.Windows.Forms.TabPage(); 50 50 this.platformCollectionView = new HeuristicLab.Clients.OKB.Administration.PlatformCollectionView(); 51 this.dataTypesTabPage = new System.Windows.Forms.TabPage();52 51 this.algorithmClassesTabPage = new System.Windows.Forms.TabPage(); 53 52 this.algorithmClassCollectionView = new HeuristicLab.Clients.OKB.Administration.AlgorithmClassCollectionView(); … … 55 54 this.algorithmCollectionView = new HeuristicLab.Clients.OKB.Administration.AlgorithmCollectionView(); 56 55 this.problemClassesTabPage = new System.Windows.Forms.TabPage(); 56 this.problemClassCollectionView = new HeuristicLab.Clients.OKB.Administration.ProblemClassCollectionView(); 57 57 this.problemsTabPage = new System.Windows.Forms.TabPage(); 58 this.problemCollectionView = new HeuristicLab.Clients.OKB.Administration.ProblemCollectionView(); 58 59 this.refreshButton = new System.Windows.Forms.Button(); 59 60 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();62 61 this.tabControl.SuspendLayout(); 63 62 this.platformsTabPage.SuspendLayout(); 64 this.dataTypesTabPage.SuspendLayout();65 63 this.algorithmClassesTabPage.SuspendLayout(); 66 64 this.algorithmsTabPage.SuspendLayout(); … … 75 73 | System.Windows.Forms.AnchorStyles.Right))); 76 74 this.tabControl.Controls.Add(this.platformsTabPage); 77 this.tabControl.Controls.Add(this.dataTypesTabPage);78 75 this.tabControl.Controls.Add(this.algorithmClassesTabPage); 79 76 this.tabControl.Controls.Add(this.algorithmsTabPage); … … 110 107 this.platformCollectionView.TabIndex = 0; 111 108 // 112 // dataTypesTabPage113 //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 //122 109 // algorithmClassesTabPage 123 110 // … … 178 165 this.problemClassesTabPage.UseVisualStyleBackColor = true; 179 166 // 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 // 180 180 // problemsTabPage 181 181 // … … 187 187 this.problemsTabPage.Text = "Problems"; 188 188 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; 189 202 // 190 203 // refreshButton … … 199 212 this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click); 200 213 // 201 // problemClassCollectionView202 //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 // problemCollectionView215 //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 //227 214 // AdministratorView 228 215 // … … 235 222 this.tabControl.ResumeLayout(false); 236 223 this.platformsTabPage.ResumeLayout(false); 237 this.dataTypesTabPage.ResumeLayout(false);238 224 this.algorithmClassesTabPage.ResumeLayout(false); 239 225 this.algorithmsTabPage.ResumeLayout(false); … … 255 241 private System.Windows.Forms.TabPage platformsTabPage; 256 242 private PlatformCollectionView platformCollectionView; 257 private System.Windows.Forms.TabPage dataTypesTabPage;258 243 private System.Windows.Forms.TabPage problemClassesTabPage; 259 244 private System.Windows.Forms.TabPage problemsTabPage; -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/AlgorithmView.Designer.cs
r5533 r5534 26 26 /// </summary> 27 27 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 }39 28 40 29 #region Component Designer generated code … … 49 38 this.algorithmClassLabel = new System.Windows.Forms.Label(); 50 39 this.algorithmClassComboBox = new System.Windows.Forms.ComboBox(); 51 this.usersListBox = new System.Windows.Forms.ListBox();52 40 this.tabControl = new System.Windows.Forms.TabControl(); 53 41 this.usersTabPage = new System.Windows.Forms.TabPage(); 42 this.usersListBox = new System.Windows.Forms.CheckedListBox(); 54 43 this.storeUsersButton = new System.Windows.Forms.Button(); 55 44 this.refreshUsersButton = new System.Windows.Forms.Button(); 56 45 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(); 63 52 this.tabControl.SuspendLayout(); 64 53 this.usersTabPage.SuspendLayout(); 65 this.dataTabPage.SuspendLayout(); 66 this.parametersTabPage.SuspendLayout(); 67 this.resultsTabPage.SuspendLayout(); 68 this.experimentsTabPage.SuspendLayout(); 54 this.dataTypeGroupBox.SuspendLayout(); 69 55 this.SuspendLayout(); 70 56 // … … 125 111 this.algorithmClassComboBox.SelectedValueChanged += new System.EventHandler(this.algorithmClassComboBox_SelectedValueChanged); 126 112 // 127 // usersListBox128 //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 //141 113 // tabControl 142 114 // … … 146 118 this.tabControl.Controls.Add(this.usersTabPage); 147 119 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); 152 121 this.tabControl.Name = "tabControl"; 153 122 this.tabControl.SelectedIndex = 0; 154 this.tabControl.Size = new System.Drawing.Size(633, 2 92);123 this.tabControl.Size = new System.Drawing.Size(633, 206); 155 124 this.tabControl.TabIndex = 9; 156 125 // 157 126 // usersTabPage 158 127 // 128 this.usersTabPage.Controls.Add(this.usersListBox); 159 129 this.usersTabPage.Controls.Add(this.storeUsersButton); 160 130 this.usersTabPage.Controls.Add(this.refreshUsersButton); 161 this.usersTabPage.Controls.Add(this.usersListBox);162 131 this.usersTabPage.Location = new System.Drawing.Point(4, 22); 163 132 this.usersTabPage.Name = "usersTabPage"; 164 133 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); 166 135 this.usersTabPage.TabIndex = 0; 167 136 this.usersTabPage.Text = "Authorized Users"; 168 137 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; 169 149 // 170 150 // storeUsersButton … … 195 175 this.dataTabPage.Name = "dataTabPage"; 196 176 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); 198 178 this.dataTabPage.TabIndex = 1; 199 179 this.dataTabPage.Text = "Platform-Specific Algorithm Data"; 200 180 this.dataTabPage.UseVisualStyleBackColor = true; 201 181 // 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:"; 228 247 // 229 248 // AlgorithmView 230 249 // 231 250 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 251 this.Controls.Add(this.dataTypeGroupBox); 232 252 this.Controls.Add(this.tabControl); 233 253 this.Controls.Add(this.platformComboBox); … … 236 256 this.Controls.Add(this.algorithmClassLabel); 237 257 this.Name = "AlgorithmView"; 238 this.Size = new System.Drawing.Size(633, 4 54);258 this.Size = new System.Drawing.Size(633, 445); 239 259 this.Controls.SetChildIndex(this.algorithmClassLabel, 0); 240 260 this.Controls.SetChildIndex(this.algorithmClassComboBox, 0); … … 242 262 this.Controls.SetChildIndex(this.platformComboBox, 0); 243 263 this.Controls.SetChildIndex(this.tabControl, 0); 264 this.Controls.SetChildIndex(this.dataTypeGroupBox, 0); 244 265 this.Controls.SetChildIndex(this.storeButton, 0); 245 266 this.Controls.SetChildIndex(this.nameTextBox, 0); … … 249 270 this.tabControl.ResumeLayout(false); 250 271 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(); 255 274 this.ResumeLayout(false); 256 275 this.PerformLayout(); … … 264 283 private System.Windows.Forms.Label algorithmClassLabel; 265 284 private System.Windows.Forms.ComboBox algorithmClassComboBox; 266 private System.Windows.Forms.ListBox usersListBox;267 285 private System.Windows.Forms.TabControl tabControl; 268 286 private System.Windows.Forms.TabPage usersTabPage; … … 270 288 private System.Windows.Forms.Button refreshUsersButton; 271 289 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; 278 297 279 298 } -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/AlgorithmView.cs
r5533 r5534 25 25 using System.Windows.Forms; 26 26 using HeuristicLab.Clients.OKB.Authentication; 27 using HeuristicLab.Core.Views; 27 28 using HeuristicLab.MainForm; 28 29 using HeuristicLab.MainForm.WindowsForms; 30 using HeuristicLab.Optimization; 29 31 30 32 namespace HeuristicLab.Clients.OKB.Administration { … … 34 36 private List<Platform> platformComboBoxValues; 35 37 private List<AlgorithmClass> algorithmClassComboBoxValues; 38 private TypeSelectorDialog typeSelectorDialog; 36 39 37 40 public new Algorithm Content { … … 42 45 public AlgorithmView() { 43 46 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); 44 55 } 45 56 … … 57 68 platformComboBox.SelectedIndex = -1; 58 69 algorithmClassComboBox.SelectedIndex = -1; 70 dataTypeNameTextBox.Text = ""; 71 dataTypeTypeNameTextBox.Text = ""; 59 72 } else { 60 73 platformComboBox.SelectedItem = platformComboBoxValues.FirstOrDefault(p => p.Id == Content.PlatformId); 61 74 algorithmClassComboBox.SelectedItem = algorithmClassComboBoxValues.FirstOrDefault(a => a.Id == Content.AlgorithmClassId); 75 dataTypeNameTextBox.Text = Content.DataTypeName; 76 dataTypeTypeNameTextBox.Text = Content.DataTypeTypeName; 62 77 } 63 78 usersListBox.DataSource = null; … … 68 83 platformComboBox.Enabled = (Content != null) && !ReadOnly; 69 84 algorithmClassComboBox.Enabled = (Content != null) && !ReadOnly; 85 dataTypeGroupBox.Enabled = (Content != null) && !ReadOnly; 70 86 refreshUsersButton.Enabled = Content != null; 71 87 storeUsersButton.Enabled = (usersListBox.DataSource != null) && !ReadOnly; 72 88 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; 73 94 } 74 95 … … 77 98 case "PlatformId": 78 99 platformComboBox.SelectedItem = platformComboBoxValues.FirstOrDefault(p => p.Id == Content.PlatformId); 100 SetEnabledStateOfControls(); 79 101 break; 80 102 case "AlgorithmClassId": 81 103 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; 82 110 break; 83 111 } … … 97 125 } 98 126 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 99 146 private void refreshUsersButton_Click(object sender, System.EventArgs e) { 100 147 List<Guid> ids = AdministrationClient.Instance.GetAlgorithmUsers(Content.Id); … … 103 150 usersListBox.DataSource = users; 104 151 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)); 108 154 usersListBox.Enabled = !ReadOnly; 109 155 storeUsersButton.Enabled = false; -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/ProblemView.Designer.cs
r5533 r5534 49 49 this.problemClassLabel = new System.Windows.Forms.Label(); 50 50 this.problemClassComboBox = new System.Windows.Forms.ComboBox(); 51 this.usersListBox = new System.Windows.Forms.ListBox();52 51 this.tabControl = new System.Windows.Forms.TabControl(); 53 52 this.usersTabPage = new System.Windows.Forms.TabPage(); … … 55 54 this.refreshUsersButton = new System.Windows.Forms.Button(); 56 55 this.dataTabPage = new System.Windows.Forms.TabPage(); 56 this.usersListBox = new System.Windows.Forms.CheckedListBox(); 57 57 this.tabControl.SuspendLayout(); 58 58 this.usersTabPage.SuspendLayout(); 59 this.dataTabPage.SuspendLayout();60 59 this.SuspendLayout(); 61 60 // … … 100 99 this.problemClassLabel.Location = new System.Drawing.Point(3, 111); 101 100 this.problemClassLabel.Name = "problemClassLabel"; 102 this.problemClassLabel.Size = new System.Drawing.Size( 81, 13);101 this.problemClassLabel.Size = new System.Drawing.Size(76, 13); 103 102 this.problemClassLabel.TabIndex = 7; 104 103 this.problemClassLabel.Text = "&Problem Class:"; … … 116 115 this.problemClassComboBox.SelectedValueChanged += new System.EventHandler(this.problemClassComboBox_SelectedValueChanged); 117 116 // 118 // usersListBox119 //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 //132 117 // tabControl 133 118 // … … 140 125 this.tabControl.Name = "tabControl"; 141 126 this.tabControl.SelectedIndex = 0; 142 this.tabControl.Size = new System.Drawing.Size(633, 2 92);127 this.tabControl.Size = new System.Drawing.Size(633, 283); 143 128 this.tabControl.TabIndex = 9; 144 129 // 145 130 // usersTabPage 146 131 // 132 this.usersTabPage.Controls.Add(this.usersListBox); 147 133 this.usersTabPage.Controls.Add(this.storeUsersButton); 148 134 this.usersTabPage.Controls.Add(this.refreshUsersButton); 149 this.usersTabPage.Controls.Add(this.usersListBox);150 135 this.usersTabPage.Location = new System.Drawing.Point(4, 22); 151 136 this.usersTabPage.Name = "usersTabPage"; 152 137 this.usersTabPage.Padding = new System.Windows.Forms.Padding(3); 153 this.usersTabPage.Size = new System.Drawing.Size(625, 2 66);138 this.usersTabPage.Size = new System.Drawing.Size(625, 257); 154 139 this.usersTabPage.TabIndex = 0; 155 140 this.usersTabPage.Text = "Authorized Users"; … … 188 173 this.dataTabPage.UseVisualStyleBackColor = true; 189 174 // 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 // 190 186 // ProblemView 191 187 // … … 197 193 this.Controls.Add(this.problemClassLabel); 198 194 this.Name = "ProblemView"; 199 this.Size = new System.Drawing.Size(633, 4 54);195 this.Size = new System.Drawing.Size(633, 445); 200 196 this.Controls.SetChildIndex(this.problemClassLabel, 0); 201 197 this.Controls.SetChildIndex(this.problemClassComboBox, 0); … … 210 206 this.tabControl.ResumeLayout(false); 211 207 this.usersTabPage.ResumeLayout(false); 212 this.dataTabPage.ResumeLayout(false);213 208 this.ResumeLayout(false); 214 209 this.PerformLayout(); … … 222 217 private System.Windows.Forms.Label problemClassLabel; 223 218 private System.Windows.Forms.ComboBox problemClassComboBox; 224 private System.Windows.Forms.ListBox usersListBox;225 219 private System.Windows.Forms.TabControl tabControl; 226 220 private System.Windows.Forms.TabPage usersTabPage; … … 228 222 private System.Windows.Forms.Button refreshUsersButton; 229 223 private System.Windows.Forms.TabPage dataTabPage; 224 private System.Windows.Forms.CheckedListBox usersListBox; 230 225 231 226 } -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/HeuristicLab.Clients.OKB-3.3.csproj
r5533 r5534 189 189 <None Include="HeuristicLabClientsOKBPlugin.cs.frame" /> 190 190 </ItemGroup> 191 <ItemGroup />192 191 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 193 192 <PropertyGroup> -
branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataAccess/3.3/OKB.dbml
r5478 r5534 66 66 <Column Name="PlatformId" Type="System.Int64" DbType="BigInt NOT NULL" CanBeNull="false" /> 67 67 <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" /> 69 69 <Column Name="Name" Type="System.String" DbType="NVarChar(200) NOT NULL" CanBeNull="false" /> 70 70 <Column Name="Description" Type="System.String" DbType="NVarChar(MAX)" CanBeNull="true" /> … … 83 83 <Column Name="PlatformId" Type="System.Int64" DbType="BigInt NOT NULL" CanBeNull="false" /> 84 84 <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" /> 86 86 <Column Name="Name" Type="System.String" DbType="NVarChar(200) NOT NULL" CanBeNull="false" /> 87 87 <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 65 65 </nodes> 66 66 </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"> 68 68 <AssociationMoniker Name="/OKBDataContext/DataType/DataType_Algorithm" /> 69 69 <nodes> … … 92 92 </nodes> 93 93 </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"> 95 95 <AssociationMoniker Name="/OKBDataContext/DataType/DataType_Problem" /> 96 96 <nodes> … … 166 166 </nodes> 167 167 </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"> 169 169 <AssociationMoniker Name="/OKBDataContext/DataType/DataType_Value" /> 170 170 <nodes> … … 206 206 </nodes> 207 207 </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"> 209 209 <AssociationMoniker Name="/OKBDataContext/DataType/DataType_CharacteristicValue" /> 210 210 <nodes> -
branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataAccess/3.3/OKB.designer.cs
r5478 r5534 1312 1312 private long _DataTypeId; 1313 1313 1314 private long_BinaryDataId;1314 private System.Nullable<long> _BinaryDataId; 1315 1315 1316 1316 private string _Name; … … 1342 1342 partial void OnDataTypeIdChanging(long value); 1343 1343 partial void OnDataTypeIdChanged(); 1344 partial void OnBinaryDataIdChanging( longvalue);1344 partial void OnBinaryDataIdChanging(System.Nullable<long> value); 1345 1345 partial void OnBinaryDataIdChanged(); 1346 1346 partial void OnNameChanging(string value); … … 1453 1453 } 1454 1454 1455 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BinaryDataId", DbType="BigInt NOT NULL")]1456 public longBinaryDataId1455 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BinaryDataId", DbType="BigInt")] 1456 public System.Nullable<long> BinaryDataId 1457 1457 { 1458 1458 get … … 1672 1672 else 1673 1673 { 1674 this._BinaryDataId = default( long);1674 this._BinaryDataId = default(Nullable<long>); 1675 1675 } 1676 1676 this.SendPropertyChanged("BinaryData"); … … 1738 1738 private long _DataTypeId; 1739 1739 1740 private long_BinaryDataId;1740 private System.Nullable<long> _BinaryDataId; 1741 1741 1742 1742 private string _Name; … … 1770 1770 partial void OnDataTypeIdChanging(long value); 1771 1771 partial void OnDataTypeIdChanged(); 1772 partial void OnBinaryDataIdChanging( longvalue);1772 partial void OnBinaryDataIdChanging(System.Nullable<long> value); 1773 1773 partial void OnBinaryDataIdChanged(); 1774 1774 partial void OnNameChanging(string value); … … 1882 1882 } 1883 1883 1884 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BinaryDataId", DbType="BigInt NOT NULL")]1885 public longBinaryDataId1884 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BinaryDataId", DbType="BigInt")] 1885 public System.Nullable<long> BinaryDataId 1886 1886 { 1887 1887 get … … 2114 2114 else 2115 2115 { 2116 this._BinaryDataId = default( long);2116 this._BinaryDataId = default(Nullable<long>); 2117 2117 } 2118 2118 this.SendPropertyChanged("BinaryData"); -
branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataAccess/3.3/Tests/HeuristicLab.Services.OKB.DataAccess-3.3.Tests.csproj
r5502 r5534 47 47 </ItemGroup> 48 48 <ItemGroup> 49 <Compile Include="DBTests.cs" />50 49 <Compile Include="Properties\AssemblyInfo.cs" /> 51 50 </ItemGroup> -
branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Administration/AdministrationService.cs
r5482 r5534 134 134 public byte[] GetAlgorithmData(long algorithmId) { 135 135 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; 137 139 } 138 140 } … … 219 221 public byte[] GetProblemData(long problemId) { 220 222 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; 222 226 } 223 227 } -
branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Administration/Convert.cs
r5482 r5534 62 62 public static DT.Algorithm ToDto(DA.Algorithm source) { 63 63 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 }; 65 65 } 66 66 public static DA.Algorithm ToEntity(DT.Algorithm source, DA.OKBDataContext okb) { 67 67 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) }; 69 69 } 70 70 public static void ToEntity(DT.Algorithm source, DA.Algorithm target, DA.OKBDataContext okb) { 71 71 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); 73 73 } 74 74 } … … 94 94 public static DT.Problem ToDto(DA.Problem source) { 95 95 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 }; 97 97 } 98 98 public static DA.Problem ToEntity(DT.Problem source, DA.OKBDataContext okb) { 99 99 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) }; 101 101 } 102 102 public static void ToEntity(DT.Problem source, DA.Problem target, DA.OKBDataContext okb) { 103 103 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); 105 105 } 106 106 } … … 108 108 109 109 #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(); 117 113 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 }; 119 115 return entity; 120 116 } -
branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Administration/DataTransfer/Algorithm.cs
r5482 r5534 30 30 public long AlgorithmClassId { get; set; } 31 31 [DataMember] 32 public DataType DataType { get; set; } 32 public string DataTypeName { get; set; } 33 [DataMember] 34 public string DataTypeTypeName { get; set; } 33 35 } 34 36 } -
branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Administration/DataTransfer/Problem.cs
r5482 r5534 30 30 public long ProblemClassId { get; set; } 31 31 [DataMember] 32 public DataType DataType { get; set; } 32 public string DataTypeName { get; set; } 33 [DataMember] 34 public string DataTypeTypeName { get; set; } 33 35 } 34 36 } -
branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/HeuristicLab.Services.OKB-3.3.csproj
r5502 r5534 124 124 <Compile Include="Administration\DataTransfer\Algorithm.cs" /> 125 125 <Compile Include="Administration\DataTransfer\AlgorithmClass.cs" /> 126 <Compile Include="Administration\DataTransfer\DataType.cs" />127 126 <Compile Include="Administration\DataTransfer\NamedOKBItem.cs" /> 128 127 <Compile Include="Administration\DataTransfer\OKBItem.cs" />
Note: See TracChangeset
for help on using the changeset viewer.