Changeset 4481 for branches/OKB/HeuristicLab.Clients.OKB-3.3/Views
- Timestamp:
- 09/24/10 06:53:43 (14 years ago)
- Location:
- branches/OKB/HeuristicLab.Clients.OKB-3.3/Views
- Files:
-
- 6 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OKB/HeuristicLab.Clients.OKB-3.3/Views/AdministratorView.Designer.cs
r4466 r4481 46 46 private void InitializeComponent() { 47 47 this.components = new System.ComponentModel.Container(); 48 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AdministratorView));49 48 this.tabControl = new System.Windows.Forms.TabControl(); 50 49 this.platformsTabPage = new System.Windows.Forms.TabPage(); 51 50 this.platformCollectionView = new HeuristicLab.Clients.OKB.PlatformCollectionView(); 51 this.dataTypesTabPage = new System.Windows.Forms.TabPage(); 52 this.dataTypeCollectionView = new HeuristicLab.Clients.OKB.DataTypeCollectionView(); 52 53 this.algorithmClassesTabPage = new System.Windows.Forms.TabPage(); 53 54 this.algorithmClassCollectionView = new HeuristicLab.Clients.OKB.AlgorithmClassCollectionView(); 54 55 this.algorithmsTabPage = new System.Windows.Forms.TabPage(); 55 56 this.algorithmCollectionView = new HeuristicLab.Clients.OKB.AlgorithmCollectionView(); 56 this.dataTypesTabPage = new System.Windows.Forms.TabPage(); 57 this.problemClassesTabPage = new System.Windows.Forms.TabPage(); 58 this.problemsTabPage = new System.Windows.Forms.TabPage(); 57 59 this.refreshButton = new System.Windows.Forms.Button(); 58 60 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 59 this.dataTypeCollectionView = new HeuristicLab.Clients.OKB.DataTypeCollectionView(); 61 this.problemClassCollectionView = new HeuristicLab.Clients.OKB.ProblemClassCollectionView(); 62 this.problemCollectionView = new HeuristicLab.Clients.OKB.ProblemCollectionView(); 60 63 this.tabControl.SuspendLayout(); 61 64 this.platformsTabPage.SuspendLayout(); 65 this.dataTypesTabPage.SuspendLayout(); 62 66 this.algorithmClassesTabPage.SuspendLayout(); 63 67 this.algorithmsTabPage.SuspendLayout(); 64 this.dataTypesTabPage.SuspendLayout(); 68 this.problemClassesTabPage.SuspendLayout(); 69 this.problemsTabPage.SuspendLayout(); 65 70 this.SuspendLayout(); 66 71 // … … 71 76 | System.Windows.Forms.AnchorStyles.Right))); 72 77 this.tabControl.Controls.Add(this.platformsTabPage); 78 this.tabControl.Controls.Add(this.dataTypesTabPage); 73 79 this.tabControl.Controls.Add(this.algorithmClassesTabPage); 74 80 this.tabControl.Controls.Add(this.algorithmsTabPage); 75 this.tabControl.Controls.Add(this.dataTypesTabPage); 81 this.tabControl.Controls.Add(this.problemClassesTabPage); 82 this.tabControl.Controls.Add(this.problemsTabPage); 76 83 this.tabControl.Location = new System.Drawing.Point(0, 29); 77 84 this.tabControl.Name = "tabControl"; … … 98 105 this.platformCollectionView.Caption = "PlatformCollection View"; 99 106 this.platformCollectionView.Content = null; 100 this.platformCollectionView.Location = new System.Drawing.Point( 6, 6);107 this.platformCollectionView.Location = new System.Drawing.Point(3, 3); 101 108 this.platformCollectionView.Name = "platformCollectionView"; 102 109 this.platformCollectionView.ReadOnly = false; 103 this.platformCollectionView.Size = new System.Drawing.Size(7 07, 368);110 this.platformCollectionView.Size = new System.Drawing.Size(713, 374); 104 111 this.platformCollectionView.TabIndex = 0; 112 // 113 // dataTypesTabPage 114 // 115 this.dataTypesTabPage.Controls.Add(this.dataTypeCollectionView); 116 this.dataTypesTabPage.Location = new System.Drawing.Point(4, 22); 117 this.dataTypesTabPage.Name = "dataTypesTabPage"; 118 this.dataTypesTabPage.Padding = new System.Windows.Forms.Padding(3); 119 this.dataTypesTabPage.Size = new System.Drawing.Size(719, 380); 120 this.dataTypesTabPage.TabIndex = 3; 121 this.dataTypesTabPage.Text = "Data Types"; 122 this.dataTypesTabPage.UseVisualStyleBackColor = true; 123 // 124 // dataTypeCollectionView 125 // 126 this.dataTypeCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 127 | System.Windows.Forms.AnchorStyles.Left) 128 | System.Windows.Forms.AnchorStyles.Right))); 129 this.dataTypeCollectionView.Caption = "DataTypeCollection View"; 130 this.dataTypeCollectionView.Content = null; 131 this.dataTypeCollectionView.Location = new System.Drawing.Point(3, 3); 132 this.dataTypeCollectionView.Name = "dataTypeCollectionView"; 133 this.dataTypeCollectionView.ReadOnly = false; 134 this.dataTypeCollectionView.Size = new System.Drawing.Size(713, 374); 135 this.dataTypeCollectionView.TabIndex = 0; 105 136 // 106 137 // algorithmClassesTabPage … … 122 153 this.algorithmClassCollectionView.Caption = "AlgorithmClassCollection View"; 123 154 this.algorithmClassCollectionView.Content = null; 124 this.algorithmClassCollectionView.Location = new System.Drawing.Point( 6, 6);155 this.algorithmClassCollectionView.Location = new System.Drawing.Point(3, 3); 125 156 this.algorithmClassCollectionView.Name = "algorithmClassCollectionView"; 126 157 this.algorithmClassCollectionView.ReadOnly = false; 127 this.algorithmClassCollectionView.Size = new System.Drawing.Size(7 07, 368);158 this.algorithmClassCollectionView.Size = new System.Drawing.Size(713, 374); 128 159 this.algorithmClassCollectionView.TabIndex = 0; 129 160 // … … 146 177 this.algorithmCollectionView.Caption = "AlgorithmCollection View"; 147 178 this.algorithmCollectionView.Content = null; 148 this.algorithmCollectionView.Location = new System.Drawing.Point( 6, 6);179 this.algorithmCollectionView.Location = new System.Drawing.Point(3, 3); 149 180 this.algorithmCollectionView.Name = "algorithmCollectionView"; 150 181 this.algorithmCollectionView.ReadOnly = false; 151 this.algorithmCollectionView.Size = new System.Drawing.Size(7 07, 368);182 this.algorithmCollectionView.Size = new System.Drawing.Size(713, 374); 152 183 this.algorithmCollectionView.TabIndex = 0; 153 184 // 154 // dataTypesTabPage 155 // 156 this.dataTypesTabPage.Controls.Add(this.dataTypeCollectionView); 157 this.dataTypesTabPage.Location = new System.Drawing.Point(4, 22); 158 this.dataTypesTabPage.Name = "dataTypesTabPage"; 159 this.dataTypesTabPage.Padding = new System.Windows.Forms.Padding(3); 160 this.dataTypesTabPage.Size = new System.Drawing.Size(719, 380); 161 this.dataTypesTabPage.TabIndex = 3; 162 this.dataTypesTabPage.Text = "Data Types"; 163 this.dataTypesTabPage.UseVisualStyleBackColor = true; 185 // problemClassesTabPage 186 // 187 this.problemClassesTabPage.Controls.Add(this.problemClassCollectionView); 188 this.problemClassesTabPage.Location = new System.Drawing.Point(4, 22); 189 this.problemClassesTabPage.Name = "problemClassesTabPage"; 190 this.problemClassesTabPage.Size = new System.Drawing.Size(719, 380); 191 this.problemClassesTabPage.TabIndex = 4; 192 this.problemClassesTabPage.Text = "Problem Classes"; 193 this.problemClassesTabPage.UseVisualStyleBackColor = true; 194 // 195 // problemsTabPage 196 // 197 this.problemsTabPage.Controls.Add(this.problemCollectionView); 198 this.problemsTabPage.Location = new System.Drawing.Point(4, 22); 199 this.problemsTabPage.Name = "problemsTabPage"; 200 this.problemsTabPage.Size = new System.Drawing.Size(719, 380); 201 this.problemsTabPage.TabIndex = 5; 202 this.problemsTabPage.Text = "Problems"; 203 this.problemsTabPage.UseVisualStyleBackColor = true; 164 204 // 165 205 // refreshButton 166 206 // 167 this.refreshButton.Image = ((System.Drawing.Image)(resources.GetObject("refreshButton.Image")));207 this.refreshButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Refresh; 168 208 this.refreshButton.Location = new System.Drawing.Point(0, 0); 169 209 this.refreshButton.Name = "refreshButton"; … … 174 214 this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click); 175 215 // 176 // dataTypeCollectionView 177 // 178 this.dataTypeCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 179 | System.Windows.Forms.AnchorStyles.Left) 180 | System.Windows.Forms.AnchorStyles.Right))); 181 this.dataTypeCollectionView.Caption = "DataTypeCollection View"; 182 this.dataTypeCollectionView.Content = null; 183 this.dataTypeCollectionView.Location = new System.Drawing.Point(6, 6); 184 this.dataTypeCollectionView.Name = "dataTypeCollectionView"; 185 this.dataTypeCollectionView.ReadOnly = false; 186 this.dataTypeCollectionView.Size = new System.Drawing.Size(707, 368); 187 this.dataTypeCollectionView.TabIndex = 0; 216 // problemClassCollectionView 217 // 218 this.problemClassCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 219 | System.Windows.Forms.AnchorStyles.Left) 220 | System.Windows.Forms.AnchorStyles.Right))); 221 this.problemClassCollectionView.Caption = "ProblemClassCollection View"; 222 this.problemClassCollectionView.Content = null; 223 this.problemClassCollectionView.Location = new System.Drawing.Point(3, 3); 224 this.problemClassCollectionView.Name = "problemClassCollectionView"; 225 this.problemClassCollectionView.ReadOnly = false; 226 this.problemClassCollectionView.Size = new System.Drawing.Size(713, 374); 227 this.problemClassCollectionView.TabIndex = 0; 228 // 229 // problemCollectionView 230 // 231 this.problemCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 232 | System.Windows.Forms.AnchorStyles.Left) 233 | System.Windows.Forms.AnchorStyles.Right))); 234 this.problemCollectionView.Caption = "ProblemCollection View"; 235 this.problemCollectionView.Content = null; 236 this.problemCollectionView.Location = new System.Drawing.Point(3, 3); 237 this.problemCollectionView.Name = "problemCollectionView"; 238 this.problemCollectionView.ReadOnly = false; 239 this.problemCollectionView.Size = new System.Drawing.Size(713, 374); 240 this.problemCollectionView.TabIndex = 0; 188 241 // 189 242 // AdministratorView … … 197 250 this.tabControl.ResumeLayout(false); 198 251 this.platformsTabPage.ResumeLayout(false); 252 this.dataTypesTabPage.ResumeLayout(false); 199 253 this.algorithmClassesTabPage.ResumeLayout(false); 200 254 this.algorithmsTabPage.ResumeLayout(false); 201 this.dataTypesTabPage.ResumeLayout(false); 255 this.problemClassesTabPage.ResumeLayout(false); 256 this.problemsTabPage.ResumeLayout(false); 202 257 this.ResumeLayout(false); 203 258 … … 217 272 private System.Windows.Forms.TabPage dataTypesTabPage; 218 273 private DataTypeCollectionView dataTypeCollectionView; 274 private System.Windows.Forms.TabPage problemClassesTabPage; 275 private System.Windows.Forms.TabPage problemsTabPage; 276 private ProblemClassCollectionView problemClassCollectionView; 277 private ProblemCollectionView problemCollectionView; 219 278 220 279 } -
branches/OKB/HeuristicLab.Clients.OKB-3.3/Views/AdministratorView.cs
r4466 r4481 54 54 if (Content == null) { 55 55 platformCollectionView.Content = null; 56 dataTypeCollectionView.Content = null; 56 57 algorithmClassCollectionView.Content = null; 57 58 algorithmCollectionView.Content = null; 58 dataTypeCollectionView.Content = null; 59 problemClassCollectionView.Content = null; 60 problemCollectionView.Content = null; 59 61 } else { 60 62 platformCollectionView.Content = Content.Platforms; 63 dataTypeCollectionView.Content = Content.DataTypes; 61 64 algorithmClassCollectionView.Content = Content.AlgorithmClasses; 62 65 algorithmCollectionView.Content = Content.Algorithms; 63 dataTypeCollectionView.Content = Content.DataTypes; 66 problemClassCollectionView.Content = Content.ProblemClasses; 67 problemCollectionView.Content = Content.Problems; 64 68 } 65 69 } … … 69 73 refreshButton.Enabled = Content != null; 70 74 platformCollectionView.Enabled = Content != null; 75 dataTypeCollectionView.Enabled = Content != null; 71 76 algorithmClassCollectionView.Enabled = Content != null; 72 77 algorithmCollectionView.Enabled = Content != null; 73 dataTypeCollectionView.Enabled = Content != null; 78 problemClassCollectionView.Enabled = Content != null; 79 problemCollectionView.Enabled = Content != null; 74 80 } 75 81 … … 88 94 } else { 89 95 platformCollectionView.Content = Content.Platforms; 96 dataTypeCollectionView.Content = Content.DataTypes; 90 97 algorithmClassCollectionView.Content = Content.AlgorithmClasses; 91 98 algorithmCollectionView.Content = Content.Algorithms; 92 dataTypeCollectionView.Content = Content.DataTypes; 99 problemClassCollectionView.Content = Content.ProblemClasses; 100 problemCollectionView.Content = Content.Problems; 93 101 refreshButton.Enabled = true; 94 102 tabControl.Enabled = true; -
branches/OKB/HeuristicLab.Clients.OKB-3.3/Views/AlgorithmView.Designer.cs
r4466 r4481 45 45 /// </summary> 46 46 private void InitializeComponent() { 47 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AlgorithmView)); 47 48 this.platformLabel = new System.Windows.Forms.Label(); 48 49 this.platformComboBox = new System.Windows.Forms.ComboBox(); … … 55 56 this.refreshUsersButton = new System.Windows.Forms.Button(); 56 57 this.dataTabPage = new System.Windows.Forms.TabPage(); 57 this.fileLabel = new System.Windows.Forms.Label(); 58 this.storeDataButton = new System.Windows.Forms.Button(); 59 this.fileTextBox = new System.Windows.Forms.TextBox(); 60 this.openFileButton = new System.Windows.Forms.Button(); 61 this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); 62 this.dataTypeLabel = new System.Windows.Forms.Label(); 63 this.dataTypeComboBox = new System.Windows.Forms.ComboBox(); 58 this.algorithmDataView = new HeuristicLab.Clients.OKB.AlgorithmDataView(); 64 59 ((System.ComponentModel.ISupportInitialize)(this.modifiedPictureBox)).BeginInit(); 65 60 this.tabControl.SuspendLayout(); … … 135 130 this.usersListBox.Enabled = false; 136 131 this.usersListBox.FormattingEnabled = true; 137 this.usersListBox.Location = new System.Drawing.Point(6, 3 5);132 this.usersListBox.Location = new System.Drawing.Point(6, 36); 138 133 this.usersListBox.Name = "usersListBox"; 139 134 this.usersListBox.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple; … … 170 165 // storeUsersButton 171 166 // 172 this.storeUsersButton.Location = new System.Drawing.Point(86, 6); 167 this.storeUsersButton.Image = ((System.Drawing.Image)(resources.GetObject("storeUsersButton.Image"))); 168 this.storeUsersButton.Location = new System.Drawing.Point(36, 6); 173 169 this.storeUsersButton.Name = "storeUsersButton"; 174 this.storeUsersButton.Size = new System.Drawing.Size( 75, 23);170 this.storeUsersButton.Size = new System.Drawing.Size(24, 24); 175 171 this.storeUsersButton.TabIndex = 1; 176 this.storeUsersButton.Text = "&Store";177 172 this.toolTip.SetToolTip(this.storeUsersButton, "Store Authorized Users"); 178 173 this.storeUsersButton.UseVisualStyleBackColor = true; … … 181 176 // refreshUsersButton 182 177 // 178 this.refreshUsersButton.Image = ((System.Drawing.Image)(resources.GetObject("refreshUsersButton.Image"))); 183 179 this.refreshUsersButton.Location = new System.Drawing.Point(6, 6); 184 180 this.refreshUsersButton.Name = "refreshUsersButton"; 185 this.refreshUsersButton.Size = new System.Drawing.Size( 75, 23);181 this.refreshUsersButton.Size = new System.Drawing.Size(24, 24); 186 182 this.refreshUsersButton.TabIndex = 0; 187 this.refreshUsersButton.Text = "&Refresh";188 183 this.toolTip.SetToolTip(this.refreshUsersButton, "Refresh Authorized Users"); 189 184 this.refreshUsersButton.UseVisualStyleBackColor = true; … … 192 187 // dataTabPage 193 188 // 194 this.dataTabPage.Controls.Add(this.dataTypeComboBox); 195 this.dataTabPage.Controls.Add(this.openFileButton); 196 this.dataTabPage.Controls.Add(this.fileTextBox); 197 this.dataTabPage.Controls.Add(this.storeDataButton); 198 this.dataTabPage.Controls.Add(this.dataTypeLabel); 199 this.dataTabPage.Controls.Add(this.fileLabel); 189 this.dataTabPage.Controls.Add(this.algorithmDataView); 200 190 this.dataTabPage.Location = new System.Drawing.Point(4, 22); 201 191 this.dataTabPage.Name = "dataTabPage"; … … 203 193 this.dataTabPage.Size = new System.Drawing.Size(625, 266); 204 194 this.dataTabPage.TabIndex = 1; 205 this.dataTabPage.Text = " Serialized Algorithm";195 this.dataTabPage.Text = "Platform-Specific Algorithm Data"; 206 196 this.dataTabPage.UseVisualStyleBackColor = true; 207 197 // 208 // fileLabel 209 // 210 this.fileLabel.AutoSize = true; 211 this.fileLabel.Location = new System.Drawing.Point(6, 38); 212 this.fileLabel.Name = "fileLabel"; 213 this.fileLabel.Size = new System.Drawing.Size(26, 13); 214 this.fileLabel.TabIndex = 1; 215 this.fileLabel.Text = "&File:"; 216 // 217 // storeDataButton 218 // 219 this.storeDataButton.Enabled = false; 220 this.storeDataButton.Location = new System.Drawing.Point(6, 6); 221 this.storeDataButton.Name = "storeDataButton"; 222 this.storeDataButton.Size = new System.Drawing.Size(75, 23); 223 this.storeDataButton.TabIndex = 0; 224 this.storeDataButton.Text = "&Store"; 225 this.toolTip.SetToolTip(this.storeDataButton, "Store Serialized Algorithm"); 226 this.storeDataButton.UseVisualStyleBackColor = true; 227 this.storeDataButton.Click += new System.EventHandler(this.storeDataButton_Click); 228 // 229 // fileTextBox 230 // 231 this.fileTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 232 | System.Windows.Forms.AnchorStyles.Right))); 233 this.fileTextBox.Location = new System.Drawing.Point(69, 35); 234 this.fileTextBox.Name = "fileTextBox"; 235 this.fileTextBox.ReadOnly = true; 236 this.fileTextBox.Size = new System.Drawing.Size(520, 20); 237 this.fileTextBox.TabIndex = 2; 238 // 239 // openFileButton 240 // 241 this.openFileButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 242 this.openFileButton.Location = new System.Drawing.Point(595, 32); 243 this.openFileButton.Name = "openFileButton"; 244 this.openFileButton.Size = new System.Drawing.Size(24, 24); 245 this.openFileButton.TabIndex = 3; 246 this.openFileButton.Text = "..."; 247 this.openFileButton.UseVisualStyleBackColor = true; 248 this.openFileButton.Click += new System.EventHandler(this.openFileButton_Click); 249 // 250 // openFileDialog 251 // 252 this.openFileDialog.FileName = "algorithm"; 253 this.openFileDialog.Filter = "All Files (*.*)|*.*"; 254 this.openFileDialog.Title = "Select Algorithm File"; 255 // 256 // dataTypeLabel 257 // 258 this.dataTypeLabel.AutoSize = true; 259 this.dataTypeLabel.Location = new System.Drawing.Point(6, 64); 260 this.dataTypeLabel.Name = "dataTypeLabel"; 261 this.dataTypeLabel.Size = new System.Drawing.Size(57, 13); 262 this.dataTypeLabel.TabIndex = 4; 263 this.dataTypeLabel.Text = "&DataType:"; 264 // 265 // dataTypeComboBox 266 // 267 this.dataTypeComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 268 | System.Windows.Forms.AnchorStyles.Right))); 269 this.dataTypeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 270 this.dataTypeComboBox.FormattingEnabled = true; 271 this.dataTypeComboBox.Location = new System.Drawing.Point(69, 61); 272 this.dataTypeComboBox.Name = "dataTypeComboBox"; 273 this.dataTypeComboBox.Size = new System.Drawing.Size(550, 21); 274 this.dataTypeComboBox.TabIndex = 5; 275 this.dataTypeComboBox.SelectedIndexChanged += new System.EventHandler(this.dataTypeComboBox_SelectedIndexChanged); 198 // algorithmDataView 199 // 200 this.algorithmDataView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 201 | System.Windows.Forms.AnchorStyles.Left) 202 | System.Windows.Forms.AnchorStyles.Right))); 203 this.algorithmDataView.Caption = "AlgorithmData View"; 204 this.algorithmDataView.Content = null; 205 this.algorithmDataView.Location = new System.Drawing.Point(6, 6); 206 this.algorithmDataView.Name = "algorithmDataView"; 207 this.algorithmDataView.ReadOnly = false; 208 this.algorithmDataView.Size = new System.Drawing.Size(613, 254); 209 this.algorithmDataView.TabIndex = 0; 276 210 // 277 211 // AlgorithmView … … 300 234 this.usersTabPage.ResumeLayout(false); 301 235 this.dataTabPage.ResumeLayout(false); 302 this.dataTabPage.PerformLayout();303 236 this.ResumeLayout(false); 304 237 this.PerformLayout(); … … 318 251 private System.Windows.Forms.Button refreshUsersButton; 319 252 private System.Windows.Forms.TabPage dataTabPage; 320 private System.Windows.Forms.ComboBox dataTypeComboBox; 321 private System.Windows.Forms.Button openFileButton; 322 private System.Windows.Forms.TextBox fileTextBox; 323 private System.Windows.Forms.Button storeDataButton; 324 private System.Windows.Forms.Label dataTypeLabel; 325 private System.Windows.Forms.Label fileLabel; 326 private System.Windows.Forms.OpenFileDialog openFileDialog; 253 private AlgorithmDataView algorithmDataView; 327 254 328 255 } -
branches/OKB/HeuristicLab.Clients.OKB-3.3/Views/AlgorithmView.cs
r4466 r4481 26 26 using HeuristicLab.MainForm; 27 27 using HeuristicLab.MainForm.WindowsForms; 28 using System.IO;29 28 30 29 namespace HeuristicLab.Clients.OKB { … … 45 44 platformComboBox.DataSource = Administrator.Instance.Platforms.ToList(); 46 45 algorithmClassComboBox.DataSource = Administrator.Instance.AlgorithmClasses.ToList(); 47 dataTypeComboBox.DataSource = Administrator.Instance.DataTypes.ToList();48 46 } 49 47 … … 62 60 platformComboBox.SelectedIndex = -1; 63 61 algorithmClassComboBox.SelectedIndex = -1; 62 algorithmDataView.AlgorithmId = 0; 64 63 } else { 65 64 platformComboBox.SelectedItem = Administrator.Instance.Platforms.FirstOrDefault(p => p.Id == Content.PlatformId); 66 65 algorithmClassComboBox.SelectedItem = Administrator.Instance.AlgorithmClasses.FirstOrDefault(a => a.Id == Content.AlgorithmClassId); 66 algorithmDataView.AlgorithmId = Content.Id; 67 67 } 68 68 usersListBox.DataSource = null; 69 fileTextBox.Text = ""; 70 dataTypeComboBox.SelectedIndex = -1; 69 algorithmDataView.Content = null; 71 70 } 72 71 … … 78 77 storeUsersButton.Enabled = usersListBox.DataSource != null; 79 78 usersListBox.Enabled = usersListBox.DataSource != null; 80 storeDataButton.Enabled = !string.IsNullOrEmpty(fileTextBox.Text) && dataTypeComboBox.SelectedIndex != -1;79 algorithmDataView.Enabled = Content != null; 81 80 } 82 81 … … 119 118 } 120 119 private void storeUsersButton_Click(object sender, System.EventArgs e) { 121 if (Administrator.Instance. StoreAlgorithmUsers(Content.Id, usersListBox.SelectedItems.Cast<User>().Select(u => u.Id).ToArray()))120 if (Administrator.Instance.UpdateAlgorithmUsers(Content.Id, usersListBox.SelectedItems.Cast<User>().Select(u => u.Id).ToArray())) 122 121 storeUsersButton.Enabled = false; 123 122 } … … 125 124 storeUsersButton.Enabled = true; 126 125 } 127 128 private void storeDataButton_Click(object sender, EventArgs e) {129 AlgorithmData data = new AlgorithmData();130 data.AlgorithmId = Content.Id;131 data.DataTypeId = ((DataType)dataTypeComboBox.SelectedItem).Id;132 133 using (FileStream stream = new FileStream(fileTextBox.Text, FileMode.Open, FileAccess.Read)) {134 byte[] bytes = new byte[stream.Length];135 stream.Read(bytes, 0, bytes.Length);136 stream.Close();137 data.Data = bytes;138 }139 140 if (Administrator.Instance.StoreAlgorithmData(data))141 storeDataButton.Enabled = false;142 }143 private void openFileButton_Click(object sender, EventArgs e) {144 if (openFileDialog.ShowDialog(this) == DialogResult.OK) {145 fileTextBox.Text = openFileDialog.FileName;146 storeDataButton.Enabled = true;147 }148 }149 private void dataTypeComboBox_SelectedIndexChanged(object sender, EventArgs e) {150 storeDataButton.Enabled = !string.IsNullOrEmpty(fileTextBox.Text);151 }152 126 } 153 127 }
Note: See TracChangeset
for help on using the changeset viewer.