Index: /branches/2521_ProblemRefactoring/HeuristicLab.Optimization.Views/3.3/HeuristicLab.Optimization.Views-3.3.csproj
===================================================================
--- /branches/2521_ProblemRefactoring/HeuristicLab.Optimization.Views/3.3/HeuristicLab.Optimization.Views-3.3.csproj (revision 18088)
+++ /branches/2521_ProblemRefactoring/HeuristicLab.Optimization.Views/3.3/HeuristicLab.Optimization.Views-3.3.csproj (revision 18089)
@@ -311,4 +311,16 @@
RunCollectionChartAggregationView.cs
+
+ UserControl
+
+
+ MultiObjectiveEvaluationResultView.cs
+
+
+ UserControl
+
+
+ SingleObjectiveEvaluationResultView.cs
+
UserControl
Index: /branches/2521_ProblemRefactoring/HeuristicLab.Optimization.Views/3.3/MultiObjectiveEvaluationResultView.Designer.cs
===================================================================
--- /branches/2521_ProblemRefactoring/HeuristicLab.Optimization.Views/3.3/MultiObjectiveEvaluationResultView.Designer.cs (revision 18089)
+++ /branches/2521_ProblemRefactoring/HeuristicLab.Optimization.Views/3.3/MultiObjectiveEvaluationResultView.Designer.cs (revision 18089)
@@ -0,0 +1,99 @@
+
+namespace HeuristicLab.Optimization.Views {
+ partial class MultiObjectiveEvaluationResultView {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing) {
+ if (disposing && (components != null)) {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent() {
+ this.qualitiesLabel = new System.Windows.Forms.Label();
+ this.qualitiesTextBox = new System.Windows.Forms.TextBox();
+ this.dataLabel = new System.Windows.Forms.Label();
+ this.dataViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
+ this.SuspendLayout();
+ //
+ // qualitiesLabel
+ //
+ this.qualitiesLabel.AutoSize = true;
+ this.qualitiesLabel.Location = new System.Drawing.Point(3, 6);
+ this.qualitiesLabel.Name = "qualitiesLabel";
+ this.qualitiesLabel.Size = new System.Drawing.Size(50, 13);
+ this.qualitiesLabel.TabIndex = 0;
+ this.qualitiesLabel.Text = "Qualities:";
+ //
+ // qualitiesTextBox
+ //
+ this.qualitiesTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.qualitiesTextBox.Location = new System.Drawing.Point(59, 3);
+ this.qualitiesTextBox.Name = "qualitiesTextBox";
+ this.qualitiesTextBox.ReadOnly = true;
+ this.qualitiesTextBox.Size = new System.Drawing.Size(327, 20);
+ this.qualitiesTextBox.TabIndex = 1;
+ //
+ // dataLabel
+ //
+ this.dataLabel.AutoSize = true;
+ this.dataLabel.Location = new System.Drawing.Point(3, 29);
+ this.dataLabel.Name = "dataLabel";
+ this.dataLabel.Size = new System.Drawing.Size(82, 13);
+ this.dataLabel.TabIndex = 0;
+ this.dataLabel.Text = "Additional Data:";
+ //
+ // dataViewHost
+ //
+ this.dataViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.dataViewHost.Caption = "View";
+ this.dataViewHost.Content = null;
+ this.dataViewHost.Enabled = false;
+ this.dataViewHost.Location = new System.Drawing.Point(0, 45);
+ this.dataViewHost.Name = "dataViewHost";
+ this.dataViewHost.ReadOnly = false;
+ this.dataViewHost.Size = new System.Drawing.Size(386, 369);
+ this.dataViewHost.TabIndex = 2;
+ this.dataViewHost.ViewsLabelVisible = false;
+ this.dataViewHost.ViewType = null;
+ //
+ // MultiObjectiveEvaluationResultView
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.dataViewHost);
+ this.Controls.Add(this.qualitiesTextBox);
+ this.Controls.Add(this.dataLabel);
+ this.Controls.Add(this.qualitiesLabel);
+ this.Name = "MultiObjectiveEvaluationResultView";
+ this.Size = new System.Drawing.Size(386, 414);
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Label qualitiesLabel;
+ private System.Windows.Forms.TextBox qualitiesTextBox;
+ private System.Windows.Forms.Label dataLabel;
+ private MainForm.WindowsForms.ViewHost dataViewHost;
+ }
+}
Index: /branches/2521_ProblemRefactoring/HeuristicLab.Optimization.Views/3.3/MultiObjectiveEvaluationResultView.cs
===================================================================
--- /branches/2521_ProblemRefactoring/HeuristicLab.Optimization.Views/3.3/MultiObjectiveEvaluationResultView.cs (revision 18089)
+++ /branches/2521_ProblemRefactoring/HeuristicLab.Optimization.Views/3.3/MultiObjectiveEvaluationResultView.cs (revision 18089)
@@ -0,0 +1,68 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see .
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Core.Views;
+using HeuristicLab.Data;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+
+namespace HeuristicLab.Optimization.Views {
+ [View("Multi-Objective Evaluation Result View")]
+ [Content(typeof(MultiObjectiveEvaluationResult), IsDefaultView = true)]
+ public partial class MultiObjectiveEvaluationResultView : ItemView {
+
+ public new MultiObjectiveEvaluationResult Content {
+ get => (MultiObjectiveEvaluationResult)base.Content;
+ set => base.Content = value;
+ }
+
+ public MultiObjectiveEvaluationResultView() {
+ InitializeComponent();
+ }
+
+ protected override void OnContentChanged() {
+ base.OnContentChanged();
+ if (Content == null) {
+ qualitiesTextBox.Text = string.Empty;
+ } else {
+ qualitiesTextBox.Text = string.Join(" ; ", Content.Quality);
+ }
+ dataViewHost.Content = FetchAdditionalData();
+ }
+
+ private ReadOnlyItemCollection FetchAdditionalData() {
+ if (Content == null) return null;
+
+ var list = new ItemCollection();
+ foreach (var kvp in Content.AdditionalData) {
+ if (kvp.Value is INamedItem namedItem) {
+ list.Add(namedItem);
+ } else if (kvp.Value is IItem item) {
+ list.Add(new Variable(kvp.Key, item));
+ } else {
+ list.Add(new Variable(kvp.Key, new StringValue(kvp.Value?.ToString() ?? "(null)", @readonly: true)));
+ }
+ }
+ return list.AsReadOnly();
+ }
+ }
+}
Index: /branches/2521_ProblemRefactoring/HeuristicLab.Optimization.Views/3.3/SingleObjectiveEvaluationResultView.Designer.cs
===================================================================
--- /branches/2521_ProblemRefactoring/HeuristicLab.Optimization.Views/3.3/SingleObjectiveEvaluationResultView.Designer.cs (revision 18089)
+++ /branches/2521_ProblemRefactoring/HeuristicLab.Optimization.Views/3.3/SingleObjectiveEvaluationResultView.Designer.cs (revision 18089)
@@ -0,0 +1,99 @@
+
+namespace HeuristicLab.Optimization.Views {
+ partial class SingleObjectiveEvaluationResultView {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing) {
+ if (disposing && (components != null)) {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent() {
+ this.qualityLabel = new System.Windows.Forms.Label();
+ this.qualityTextBox = new System.Windows.Forms.TextBox();
+ this.dataLabel = new System.Windows.Forms.Label();
+ this.dataViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
+ this.SuspendLayout();
+ //
+ // qualityLabel
+ //
+ this.qualityLabel.AutoSize = true;
+ this.qualityLabel.Location = new System.Drawing.Point(3, 6);
+ this.qualityLabel.Name = "qualityLabel";
+ this.qualityLabel.Size = new System.Drawing.Size(42, 13);
+ this.qualityLabel.TabIndex = 0;
+ this.qualityLabel.Text = "Quality:";
+ //
+ // qualityTextBox
+ //
+ this.qualityTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.qualityTextBox.Location = new System.Drawing.Point(51, 3);
+ this.qualityTextBox.Name = "qualityTextBox";
+ this.qualityTextBox.ReadOnly = true;
+ this.qualityTextBox.Size = new System.Drawing.Size(335, 20);
+ this.qualityTextBox.TabIndex = 1;
+ //
+ // dataLabel
+ //
+ this.dataLabel.AutoSize = true;
+ this.dataLabel.Location = new System.Drawing.Point(3, 29);
+ this.dataLabel.Name = "dataLabel";
+ this.dataLabel.Size = new System.Drawing.Size(82, 13);
+ this.dataLabel.TabIndex = 0;
+ this.dataLabel.Text = "Additional Data:";
+ //
+ // dataViewHost
+ //
+ this.dataViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.dataViewHost.Caption = "View";
+ this.dataViewHost.Content = null;
+ this.dataViewHost.Enabled = false;
+ this.dataViewHost.Location = new System.Drawing.Point(0, 45);
+ this.dataViewHost.Name = "dataViewHost";
+ this.dataViewHost.ReadOnly = false;
+ this.dataViewHost.Size = new System.Drawing.Size(386, 369);
+ this.dataViewHost.TabIndex = 2;
+ this.dataViewHost.ViewsLabelVisible = false;
+ this.dataViewHost.ViewType = null;
+ //
+ // SingleObjectiveEvaluationResultView
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.dataViewHost);
+ this.Controls.Add(this.qualityTextBox);
+ this.Controls.Add(this.dataLabel);
+ this.Controls.Add(this.qualityLabel);
+ this.Name = "SingleObjectiveEvaluationResultView";
+ this.Size = new System.Drawing.Size(386, 414);
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Label qualityLabel;
+ private System.Windows.Forms.TextBox qualityTextBox;
+ private System.Windows.Forms.Label dataLabel;
+ private MainForm.WindowsForms.ViewHost dataViewHost;
+ }
+}
Index: /branches/2521_ProblemRefactoring/HeuristicLab.Optimization.Views/3.3/SingleObjectiveEvaluationResultView.cs
===================================================================
--- /branches/2521_ProblemRefactoring/HeuristicLab.Optimization.Views/3.3/SingleObjectiveEvaluationResultView.cs (revision 18089)
+++ /branches/2521_ProblemRefactoring/HeuristicLab.Optimization.Views/3.3/SingleObjectiveEvaluationResultView.cs (revision 18089)
@@ -0,0 +1,68 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see .
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Core.Views;
+using HeuristicLab.Data;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+
+namespace HeuristicLab.Optimization.Views {
+ [View("Single-Objective Evaluation Result View")]
+ [Content(typeof(SingleObjectiveEvaluationResult), IsDefaultView = true)]
+ public partial class SingleObjectiveEvaluationResultView : ItemView {
+
+ public new SingleObjectiveEvaluationResult Content {
+ get => (SingleObjectiveEvaluationResult)base.Content;
+ set => base.Content = value;
+ }
+
+ public SingleObjectiveEvaluationResultView() {
+ InitializeComponent();
+ }
+
+ protected override void OnContentChanged() {
+ base.OnContentChanged();
+ if (Content == null) {
+ qualityTextBox.Text = string.Empty;
+ } else {
+ qualityTextBox.Text = Content.Quality.ToString();
+ }
+ dataViewHost.Content = FetchAdditionalData();
+ }
+
+ private ReadOnlyItemCollection FetchAdditionalData() {
+ if (Content == null) return null;
+
+ var list = new ItemCollection();
+ foreach (var kvp in Content.AdditionalData) {
+ if (kvp.Value is INamedItem namedItem) {
+ list.Add(namedItem);
+ } else if (kvp.Value is IItem item) {
+ list.Add(new Variable(kvp.Key, item));
+ } else {
+ list.Add(new Variable(kvp.Key, new StringValue(kvp.Value?.ToString() ?? "(null)", @readonly: true)));
+ }
+ }
+ return list.AsReadOnly();
+ }
+ }
+}