Changeset 5533 for branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views
- Timestamp:
- 02/22/11 00:22:52 (14 years ago)
- Location:
- branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views
- Files:
-
- 1 added
- 20 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/AdministratorView.Designer.cs
r5532 r5533 20 20 #endregion 21 21 22 namespace HeuristicLab.Clients.OKB {22 namespace HeuristicLab.Clients.OKB.Administration { 23 23 partial class AdministratorView { 24 24 /// <summary> … … 48 48 this.tabControl = new System.Windows.Forms.TabControl(); 49 49 this.platformsTabPage = new System.Windows.Forms.TabPage(); 50 this.platformCollectionView = new HeuristicLab.Clients.OKB. PlatformCollectionView();50 this.platformCollectionView = new HeuristicLab.Clients.OKB.Administration.PlatformCollectionView(); 51 51 this.dataTypesTabPage = new System.Windows.Forms.TabPage(); 52 this.dataTypeCollectionView = new HeuristicLab.Clients.OKB.DataTypeCollectionView();53 52 this.algorithmClassesTabPage = new System.Windows.Forms.TabPage(); 54 this.algorithmClassCollectionView = new HeuristicLab.Clients.OKB.A lgorithmClassCollectionView();53 this.algorithmClassCollectionView = new HeuristicLab.Clients.OKB.Administration.AlgorithmClassCollectionView(); 55 54 this.algorithmsTabPage = new System.Windows.Forms.TabPage(); 56 this.algorithmCollectionView = new HeuristicLab.Clients.OKB.A lgorithmCollectionView();55 this.algorithmCollectionView = new HeuristicLab.Clients.OKB.Administration.AlgorithmCollectionView(); 57 56 this.problemClassesTabPage = new System.Windows.Forms.TabPage(); 58 57 this.problemsTabPage = new System.Windows.Forms.TabPage(); 59 58 this.refreshButton = new System.Windows.Forms.Button(); 60 59 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 61 this.problemClassCollectionView = new HeuristicLab.Clients.OKB. ProblemClassCollectionView();62 this.problemCollectionView = new HeuristicLab.Clients.OKB. ProblemCollectionView();60 this.problemClassCollectionView = new HeuristicLab.Clients.OKB.Administration.ProblemClassCollectionView(); 61 this.problemCollectionView = new HeuristicLab.Clients.OKB.Administration.ProblemCollectionView(); 63 62 this.tabControl.SuspendLayout(); 64 63 this.platformsTabPage.SuspendLayout(); … … 113 112 // dataTypesTabPage 114 113 // 115 this.dataTypesTabPage.Controls.Add(this.dataTypeCollectionView);116 114 this.dataTypesTabPage.Location = new System.Drawing.Point(4, 22); 117 115 this.dataTypesTabPage.Name = "dataTypesTabPage"; … … 121 119 this.dataTypesTabPage.Text = "Data Types"; 122 120 this.dataTypesTabPage.UseVisualStyleBackColor = true; 123 //124 // dataTypeCollectionView125 //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;136 121 // 137 122 // algorithmClassesTabPage … … 271 256 private PlatformCollectionView platformCollectionView; 272 257 private System.Windows.Forms.TabPage dataTypesTabPage; 273 private DataTypeCollectionView dataTypeCollectionView;274 258 private System.Windows.Forms.TabPage problemClassesTabPage; 275 259 private System.Windows.Forms.TabPage problemsTabPage; -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/AdministratorView.cs
r5532 r5533 25 25 using HeuristicLab.MainForm.WindowsForms; 26 26 27 namespace HeuristicLab.Clients.OKB {27 namespace HeuristicLab.Clients.OKB.Administration { 28 28 [View("OKB Administrator")] 29 [Content(typeof( OKBClient), true)]29 [Content(typeof(AdministrationClient), true)] 30 30 public sealed partial class AdministratorView : AsynchronousContentView { 31 public new OKBClient Content {32 get { return ( OKBClient)base.Content; }31 public new AdministrationClient Content { 32 get { return (AdministrationClient)base.Content; } 33 33 set { base.Content = value; } 34 34 } … … 54 54 if (Content == null) { 55 55 platformCollectionView.Content = null; 56 dataTypeCollectionView.Content = null;57 56 algorithmClassCollectionView.Content = null; 58 57 algorithmCollectionView.Content = null; … … 61 60 } else { 62 61 platformCollectionView.Content = Content.Platforms; 63 dataTypeCollectionView.Content = Content.DataTypes;64 62 algorithmClassCollectionView.Content = Content.AlgorithmClasses; 65 63 algorithmCollectionView.Content = Content.Algorithms; … … 73 71 refreshButton.Enabled = Content != null; 74 72 platformCollectionView.Enabled = Content != null; 75 dataTypeCollectionView.Enabled = Content != null;76 73 algorithmClassCollectionView.Enabled = Content != null; 77 74 algorithmCollectionView.Enabled = Content != null; … … 94 91 } else { 95 92 platformCollectionView.Content = Content.Platforms; 96 dataTypeCollectionView.Content = Content.DataTypes;97 93 algorithmClassCollectionView.Content = Content.AlgorithmClasses; 98 94 algorithmCollectionView.Content = Content.Algorithms; -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/AlgorithmClassCollectionView.Designer.cs
r5532 r5533 20 20 #endregion 21 21 22 namespace HeuristicLab.Clients.OKB {22 namespace HeuristicLab.Clients.OKB.Administration { 23 23 partial class AlgorithmClassCollectionView { 24 24 /// <summary> -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/AlgorithmClassCollectionView.cs
r5532 r5533 25 25 using HeuristicLab.MainForm; 26 26 27 namespace HeuristicLab.Clients.OKB {27 namespace HeuristicLab.Clients.OKB.Administration { 28 28 [View("AlgorithmClassCollection View")] 29 29 [Content(typeof(IItemCollection<AlgorithmClass>), true)] -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/AlgorithmCollectionView.Designer.cs
r5532 r5533 20 20 #endregion 21 21 22 namespace HeuristicLab.Clients.OKB {22 namespace HeuristicLab.Clients.OKB.Administration { 23 23 partial class AlgorithmCollectionView { 24 24 /// <summary> -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/AlgorithmCollectionView.cs
r5532 r5533 25 25 using HeuristicLab.MainForm; 26 26 27 namespace HeuristicLab.Clients.OKB {27 namespace HeuristicLab.Clients.OKB.Administration { 28 28 [View("AlgorithmCollection View")] 29 29 [Content(typeof(IItemCollection<Algorithm>), true)] -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/AlgorithmView.Designer.cs
r5532 r5533 20 20 #endregion 21 21 22 namespace HeuristicLab.Clients.OKB {22 namespace HeuristicLab.Clients.OKB.Administration { 23 23 partial class AlgorithmView { 24 24 /// <summary> … … 55 55 this.refreshUsersButton = new System.Windows.Forms.Button(); 56 56 this.dataTabPage = new System.Windows.Forms.TabPage(); 57 this.algorithmDataView = new HeuristicLab.Clients.OKB.AlgorithmDataView();58 57 this.parametersTabPage = new System.Windows.Forms.TabPage(); 59 this.algorithmParameterCollectionView = new HeuristicLab.Clients.OKB.AlgorithmParameterCollectionView();60 58 this.refreshParametersButton = new System.Windows.Forms.Button(); 61 59 this.resultsTabPage = new System.Windows.Forms.TabPage(); 62 this.resultCollectionView = new HeuristicLab.Clients.OKB.ResultCollectionView();63 60 this.refreshResultsButton = new System.Windows.Forms.Button(); 64 61 this.experimentsTabPage = new System.Windows.Forms.TabPage(); 65 62 this.refreshExperimentsButton = new System.Windows.Forms.Button(); 66 this.experimentCollectionView = new HeuristicLab.Clients.OKB.ExperimentCollectionView();67 63 this.tabControl.SuspendLayout(); 68 64 this.usersTabPage.SuspendLayout(); … … 196 192 // dataTabPage 197 193 // 198 this.dataTabPage.Controls.Add(this.algorithmDataView);199 194 this.dataTabPage.Location = new System.Drawing.Point(4, 22); 200 195 this.dataTabPage.Name = "dataTabPage"; … … 205 200 this.dataTabPage.UseVisualStyleBackColor = true; 206 201 // 207 // algorithmDataView208 //209 this.algorithmDataView.AlgorithmId = ((long)(0));210 this.algorithmDataView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)211 | System.Windows.Forms.AnchorStyles.Left)212 | System.Windows.Forms.AnchorStyles.Right)));213 this.algorithmDataView.Caption = "AlgorithmData View";214 this.algorithmDataView.Content = null;215 this.algorithmDataView.Location = new System.Drawing.Point(6, 6);216 this.algorithmDataView.Name = "algorithmDataView";217 this.algorithmDataView.ReadOnly = false;218 this.algorithmDataView.Size = new System.Drawing.Size(613, 254);219 this.algorithmDataView.TabIndex = 0;220 //221 // parametersTabPage222 //223 this.parametersTabPage.Controls.Add(this.algorithmParameterCollectionView);224 this.parametersTabPage.Controls.Add(this.refreshParametersButton);225 this.parametersTabPage.Location = new System.Drawing.Point(4, 22);226 this.parametersTabPage.Name = "parametersTabPage";227 this.parametersTabPage.Padding = new System.Windows.Forms.Padding(3);228 this.parametersTabPage.Size = new System.Drawing.Size(625, 266);229 this.parametersTabPage.TabIndex = 2;230 this.parametersTabPage.Text = "Parameters";231 this.parametersTabPage.UseVisualStyleBackColor = true;232 //233 // algorithmParameterCollectionView234 //235 this.algorithmParameterCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)236 | System.Windows.Forms.AnchorStyles.Left)237 | System.Windows.Forms.AnchorStyles.Right)));238 this.algorithmParameterCollectionView.Caption = "AlgorithmParameterCollection View";239 this.algorithmParameterCollectionView.Content = null;240 this.algorithmParameterCollectionView.Location = new System.Drawing.Point(6, 36);241 this.algorithmParameterCollectionView.Name = "algorithmParameterCollectionView";242 this.algorithmParameterCollectionView.ReadOnly = false;243 this.algorithmParameterCollectionView.Size = new System.Drawing.Size(613, 224);244 this.algorithmParameterCollectionView.TabIndex = 1;245 //246 202 // refreshParametersButton 247 203 // … … 252 208 this.refreshParametersButton.TabIndex = 0; 253 209 this.refreshParametersButton.UseVisualStyleBackColor = true; 254 this.refreshParametersButton.Click += new System.EventHandler(this.refreshParametersButton_Click);255 //256 // resultsTabPage257 //258 this.resultsTabPage.Controls.Add(this.resultCollectionView);259 this.resultsTabPage.Controls.Add(this.refreshResultsButton);260 this.resultsTabPage.Location = new System.Drawing.Point(4, 22);261 this.resultsTabPage.Name = "resultsTabPage";262 this.resultsTabPage.Padding = new System.Windows.Forms.Padding(3);263 this.resultsTabPage.Size = new System.Drawing.Size(625, 266);264 this.resultsTabPage.TabIndex = 3;265 this.resultsTabPage.Text = "Results";266 this.resultsTabPage.UseVisualStyleBackColor = true;267 //268 // resultCollectionView269 //270 this.resultCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)271 | System.Windows.Forms.AnchorStyles.Left)272 | System.Windows.Forms.AnchorStyles.Right)));273 this.resultCollectionView.Caption = "ResultCollection View";274 this.resultCollectionView.Content = null;275 this.resultCollectionView.Location = new System.Drawing.Point(6, 36);276 this.resultCollectionView.Name = "resultCollectionView";277 this.resultCollectionView.ReadOnly = false;278 this.resultCollectionView.Size = new System.Drawing.Size(613, 224);279 this.resultCollectionView.TabIndex = 1;280 210 // 281 211 // refreshResultsButton … … 287 217 this.refreshResultsButton.TabIndex = 0; 288 218 this.refreshResultsButton.UseVisualStyleBackColor = true; 289 this.refreshResultsButton.Click += new System.EventHandler(this.refreshResultsButton_Click);290 //291 // experimentsTabPage292 //293 this.experimentsTabPage.Controls.Add(this.experimentCollectionView);294 this.experimentsTabPage.Controls.Add(this.refreshExperimentsButton);295 this.experimentsTabPage.Location = new System.Drawing.Point(4, 22);296 this.experimentsTabPage.Name = "experimentsTabPage";297 this.experimentsTabPage.Padding = new System.Windows.Forms.Padding(3);298 this.experimentsTabPage.Size = new System.Drawing.Size(625, 266);299 this.experimentsTabPage.TabIndex = 4;300 this.experimentsTabPage.Text = "Experiments";301 this.experimentsTabPage.UseVisualStyleBackColor = true;302 219 // 303 220 // refreshExperimentsButton … … 309 226 this.refreshExperimentsButton.TabIndex = 0; 310 227 this.refreshExperimentsButton.UseVisualStyleBackColor = true; 311 this.refreshExperimentsButton.Click += new System.EventHandler(this.refreshExperimentsButton_Click);312 //313 // experimentCollectionView314 //315 this.experimentCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)316 | System.Windows.Forms.AnchorStyles.Left)317 | System.Windows.Forms.AnchorStyles.Right)));318 this.experimentCollectionView.Caption = "ExperimentCollection View";319 this.experimentCollectionView.Content = null;320 this.experimentCollectionView.Location = new System.Drawing.Point(6, 36);321 this.experimentCollectionView.Name = "experimentCollectionView";322 this.experimentCollectionView.ReadOnly = false;323 this.experimentCollectionView.Size = new System.Drawing.Size(613, 224);324 this.experimentCollectionView.TabIndex = 1;325 228 // 326 229 // AlgorithmView … … 367 270 private System.Windows.Forms.Button refreshUsersButton; 368 271 private System.Windows.Forms.TabPage dataTabPage; 369 private AlgorithmDataView algorithmDataView;370 272 private System.Windows.Forms.TabPage parametersTabPage; 371 273 private System.Windows.Forms.TabPage resultsTabPage; 372 private AlgorithmParameterCollectionView algorithmParameterCollectionView;373 274 private System.Windows.Forms.Button refreshParametersButton; 374 275 private System.Windows.Forms.Button refreshResultsButton; 375 276 private System.Windows.Forms.TabPage experimentsTabPage; 376 private ResultCollectionView resultCollectionView;377 private ExperimentCollectionView experimentCollectionView;378 277 private System.Windows.Forms.Button refreshExperimentsButton; 379 278 -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/AlgorithmView.cs
r5532 r5533 24 24 using System.Linq; 25 25 using System.Windows.Forms; 26 using HeuristicLab.Clients.OKB.Authentication; 26 27 using HeuristicLab.MainForm; 27 28 using HeuristicLab.MainForm.WindowsForms; 28 29 29 namespace HeuristicLab.Clients.OKB {30 namespace HeuristicLab.Clients.OKB.Administration { 30 31 [View("Algorithm View")] 31 32 [Content(typeof(Algorithm), true)] … … 45 46 protected override void OnInitialized(System.EventArgs e) { 46 47 base.OnInitialized(e); 47 platformComboBoxValues = OKBClient.Instance.Platforms.ToList();48 platformComboBoxValues = AdministrationClient.Instance.Platforms.ToList(); 48 49 platformComboBox.DataSource = platformComboBoxValues; 49 algorithmClassComboBoxValues = OKBClient.Instance.AlgorithmClasses.ToList();50 algorithmClassComboBoxValues = AdministrationClient.Instance.AlgorithmClasses.ToList(); 50 51 algorithmClassComboBox.DataSource = algorithmClassComboBoxValues; 51 52 } … … 56 57 platformComboBox.SelectedIndex = -1; 57 58 algorithmClassComboBox.SelectedIndex = -1; 58 algorithmDataView.AlgorithmId = 0;59 59 } else { 60 60 platformComboBox.SelectedItem = platformComboBoxValues.FirstOrDefault(p => p.Id == Content.PlatformId); 61 61 algorithmClassComboBox.SelectedItem = algorithmClassComboBoxValues.FirstOrDefault(a => a.Id == Content.AlgorithmClassId); 62 algorithmDataView.AlgorithmId = Content.Id;63 62 } 64 63 usersListBox.DataSource = null; 65 algorithmDataView.Content = null;66 64 } 67 65 … … 73 71 storeUsersButton.Enabled = (usersListBox.DataSource != null) && !ReadOnly; 74 72 usersListBox.Enabled = (usersListBox.DataSource != null) && !ReadOnly; 75 algorithmDataView.Enabled = Content != null;76 73 } 77 74 78 75 protected override void OnContentPropertyChanged(string propertyName) { 79 76 switch (propertyName) { 80 case "Id":81 algorithmDataView.AlgorithmId = Content.Id;82 break;83 77 case "PlatformId": 84 78 platformComboBox.SelectedItem = platformComboBoxValues.FirstOrDefault(p => p.Id == Content.PlatformId); … … 104 98 105 99 private void refreshUsersButton_Click(object sender, System.EventArgs e) { 106 List<Guid> ids = OKBClient.Instance.GetAlgorithmUsers(Content.Id);100 List<Guid> ids = AdministrationClient.Instance.GetAlgorithmUsers(Content.Id); 107 101 if (ids != null) { 108 List<User> users = OKBClient.Instance.Users.ToList();102 List<User> users = AuthenticationClient.Instance.Users.ToList(); 109 103 usersListBox.DataSource = users; 110 104 usersListBox.DisplayMember = "Name"; … … 117 111 } 118 112 private void storeUsersButton_Click(object sender, System.EventArgs e) { 119 if ( OKBClient.Instance.UpdateAlgorithmUsers(Content.Id, usersListBox.SelectedItems.Cast<User>().Select(u => u.Id).ToList()))113 if (AdministrationClient.Instance.UpdateAlgorithmUsers(Content.Id, usersListBox.SelectedItems.Cast<User>().Select(u => u.Id).ToList())) 120 114 storeUsersButton.Enabled = false; 121 115 } … … 123 117 storeUsersButton.Enabled = !ReadOnly; 124 118 } 125 126 private void refreshParametersButton_Click(object sender, EventArgs e) {127 algorithmParameterCollectionView.Content = OKBClient.Instance.GetAlgorithmParameters(Content.Id);128 }129 130 private void refreshResultsButton_Click(object sender, EventArgs e) {131 resultCollectionView.Content = OKBClient.Instance.GetResults(Content.Id);132 }133 134 private void refreshExperimentsButton_Click(object sender, EventArgs e) {135 experimentCollectionView.Content = OKBClient.Instance.GetExperiments(Content.Id, 0);136 }137 119 } 138 120 } -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/NamedOKBItemView.Designer.cs
r5532 r5533 20 20 #endregion 21 21 22 namespace HeuristicLab.Clients.OKB {22 namespace HeuristicLab.Clients.OKB.Administration { 23 23 partial class NamedOKBItemView { 24 24 /// <summary> -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/NamedOKBItemView.cs
r5532 r5533 26 26 using HeuristicLab.MainForm.WindowsForms; 27 27 28 namespace HeuristicLab.Clients.OKB {28 namespace HeuristicLab.Clients.OKB.Administration { 29 29 [View("NamedOKBItem View")] 30 30 [Content(typeof(NamedOKBItem), true)] -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/OKBItemView.Designer.cs
r5532 r5533 20 20 #endregion 21 21 22 namespace HeuristicLab.Clients.OKB {22 namespace HeuristicLab.Clients.OKB.Administration { 23 23 partial class OKBItemView { 24 24 /// <summary> -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/OKBItemView.cs
r5532 r5533 27 27 using HeuristicLab.MainForm.WindowsForms; 28 28 29 namespace HeuristicLab.Clients.OKB {29 namespace HeuristicLab.Clients.OKB.Administration { 30 30 [View("OKBItem View")] 31 31 [Content(typeof(OKBItem), true)] -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/PlatformCollectionView.Designer.cs
r5532 r5533 20 20 #endregion 21 21 22 namespace HeuristicLab.Clients.OKB {22 namespace HeuristicLab.Clients.OKB.Administration { 23 23 partial class PlatformCollectionView { 24 24 /// <summary> -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/PlatformCollectionView.cs
r5532 r5533 25 25 using HeuristicLab.MainForm; 26 26 27 namespace HeuristicLab.Clients.OKB {27 namespace HeuristicLab.Clients.OKB.Administration { 28 28 [View("PlatformCollection View")] 29 29 [Content(typeof(IItemCollection<Platform>), true)] -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/ProblemClassCollectionView.Designer.cs
r5532 r5533 20 20 #endregion 21 21 22 namespace HeuristicLab.Clients.OKB {22 namespace HeuristicLab.Clients.OKB.Administration { 23 23 partial class ProblemClassCollectionView { 24 24 /// <summary> -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/ProblemClassCollectionView.cs
r5532 r5533 25 25 using HeuristicLab.MainForm; 26 26 27 namespace HeuristicLab.Clients.OKB {27 namespace HeuristicLab.Clients.OKB.Administration { 28 28 [View("ProblemClassCollection View")] 29 29 [Content(typeof(IItemCollection<ProblemClass>), true)] -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/ProblemCollectionView.Designer.cs
r5532 r5533 20 20 #endregion 21 21 22 namespace HeuristicLab.Clients.OKB {22 namespace HeuristicLab.Clients.OKB.Administration { 23 23 partial class ProblemCollectionView { 24 24 /// <summary> -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/ProblemCollectionView.cs
r5532 r5533 25 25 using HeuristicLab.MainForm; 26 26 27 namespace HeuristicLab.Clients.OKB {27 namespace HeuristicLab.Clients.OKB.Administration { 28 28 [View("ProblemCollection View")] 29 29 [Content(typeof(IItemCollection<Problem>), true)] -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/ProblemView.Designer.cs
r5532 r5533 20 20 #endregion 21 21 22 namespace HeuristicLab.Clients.OKB {22 namespace HeuristicLab.Clients.OKB.Administration { 23 23 partial class ProblemView { 24 24 /// <summary> … … 55 55 this.refreshUsersButton = new System.Windows.Forms.Button(); 56 56 this.dataTabPage = new System.Windows.Forms.TabPage(); 57 this.problemDataView = new HeuristicLab.Clients.OKB.ProblemDataView();58 57 this.tabControl.SuspendLayout(); 59 58 this.usersTabPage.SuspendLayout(); … … 181 180 // dataTabPage 182 181 // 183 this.dataTabPage.Controls.Add(this.problemDataView);184 182 this.dataTabPage.Location = new System.Drawing.Point(4, 22); 185 183 this.dataTabPage.Name = "dataTabPage"; … … 189 187 this.dataTabPage.Text = "Platform-Specific Problem Data"; 190 188 this.dataTabPage.UseVisualStyleBackColor = true; 191 //192 // problemDataView193 //194 this.problemDataView.ProblemId = ((long)(0));195 this.problemDataView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)196 | System.Windows.Forms.AnchorStyles.Left)197 | System.Windows.Forms.AnchorStyles.Right)));198 this.problemDataView.Caption = "ProblemData View";199 this.problemDataView.Content = null;200 this.problemDataView.Location = new System.Drawing.Point(6, 6);201 this.problemDataView.Name = "problemDataView";202 this.problemDataView.ReadOnly = false;203 this.problemDataView.Size = new System.Drawing.Size(613, 254);204 this.problemDataView.TabIndex = 0;205 189 // 206 190 // ProblemView … … 244 228 private System.Windows.Forms.Button refreshUsersButton; 245 229 private System.Windows.Forms.TabPage dataTabPage; 246 private ProblemDataView problemDataView;247 230 248 231 } -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Administration/Views/ProblemView.cs
r5532 r5533 24 24 using System.Linq; 25 25 using System.Windows.Forms; 26 using HeuristicLab.Clients.OKB.Authentication; 26 27 using HeuristicLab.MainForm; 27 28 using HeuristicLab.MainForm.WindowsForms; 28 29 29 namespace HeuristicLab.Clients.OKB {30 namespace HeuristicLab.Clients.OKB.Administration { 30 31 [View("Problem View")] 31 32 [Content(typeof(Problem), true)] … … 45 46 protected override void OnInitialized(System.EventArgs e) { 46 47 base.OnInitialized(e); 47 platformComboBoxValues = OKBClient.Instance.Platforms.ToList();48 platformComboBoxValues = AdministrationClient.Instance.Platforms.ToList(); 48 49 platformComboBox.DataSource = platformComboBoxValues; 49 problemClassComboBoxValues = OKBClient.Instance.ProblemClasses.ToList();50 problemClassComboBoxValues = AdministrationClient.Instance.ProblemClasses.ToList(); 50 51 problemClassComboBox.DataSource = problemClassComboBoxValues; 51 52 } … … 56 57 platformComboBox.SelectedIndex = -1; 57 58 problemClassComboBox.SelectedIndex = -1; 58 problemDataView.ProblemId = 0;59 59 } else { 60 60 platformComboBox.SelectedItem = platformComboBoxValues.FirstOrDefault(p => p.Id == Content.PlatformId); 61 61 problemClassComboBox.SelectedItem = problemClassComboBoxValues.FirstOrDefault(a => a.Id == Content.ProblemClassId); 62 problemDataView.ProblemId = Content.Id;63 62 } 64 63 usersListBox.DataSource = null; 65 problemDataView.Content = null;66 64 } 67 65 … … 73 71 storeUsersButton.Enabled = (usersListBox.DataSource != null) && !ReadOnly; 74 72 usersListBox.Enabled = (usersListBox.DataSource != null) && !ReadOnly; 75 problemDataView.Enabled = Content != null;76 73 } 77 74 78 75 protected override void OnContentPropertyChanged(string propertyName) { 79 76 switch (propertyName) { 80 case "Id":81 problemDataView.ProblemId = Content.Id;82 break;83 77 case "PlatformId": 84 78 platformComboBox.SelectedItem = platformComboBoxValues.FirstOrDefault(p => p.Id == Content.PlatformId); … … 104 98 105 99 private void refreshUsersButton_Click(object sender, System.EventArgs e) { 106 List<Guid> ids = OKBClient.Instance.GetProblemUsers(Content.Id);100 List<Guid> ids = AdministrationClient.Instance.GetProblemUsers(Content.Id); 107 101 if (ids != null) { 108 List<User> users = OKBClient.Instance.Users.ToList();102 List<User> users = AuthenticationClient.Instance.Users.ToList(); 109 103 usersListBox.DataSource = users; 110 104 usersListBox.DisplayMember = "Name"; … … 117 111 } 118 112 private void storeUsersButton_Click(object sender, System.EventArgs e) { 119 if ( OKBClient.Instance.UpdateProblemUsers(Content.Id, usersListBox.SelectedItems.Cast<User>().Select(u => u.Id).ToList()))113 if (AdministrationClient.Instance.UpdateProblemUsers(Content.Id, usersListBox.SelectedItems.Cast<User>().Select(u => u.Id).ToList())) 120 114 storeUsersButton.Enabled = false; 121 115 }
Note: See TracChangeset
for help on using the changeset viewer.