Changeset 7437 for branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3
- Timestamp:
- 02/01/12 00:14:00 (12 years ago)
- Location:
- branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/GQAPAssignmentArchiveView.Designer.cs
r7418 r7437 56 56 chartArea1.AxisX.Title = "FlowDistanceQuality"; 57 57 chartArea1.AxisY.Title = "InstallationQuality"; 58 chartArea1.CursorX.IsUserEnabled = true; 59 chartArea1.CursorX.IsUserSelectionEnabled = true; 60 chartArea1.CursorY.IsUserEnabled = true; 61 chartArea1.CursorY.IsUserSelectionEnabled = true; 58 62 chartArea1.Name = "ChartArea1"; 59 63 this.paretoFrontChart.ChartAreas.Add(chartArea1); … … 72 76 this.paretoFrontChart.TabIndex = 0; 73 77 this.paretoFrontChart.Text = "Pareto Front"; 78 this.paretoFrontChart.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.paretoFrontChart_MouseDoubleClick); 74 79 // 75 80 // messageLabel -
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/GQAPAssignmentArchiveView.cs
r7418 r7437 22 22 using System; 23 23 using System.ComponentModel; 24 using System.Linq; 24 25 using System.Windows.Forms; 26 using System.Windows.Forms.DataVisualization.Charting; 25 27 using HeuristicLab.Collections; 26 28 using HeuristicLab.Core.Views; … … 83 85 if (Content == null) return; 84 86 foreach (var solution in Content.Solutions) { 85 if (solution.OverbookedCapacity.Value <= 0.0) 87 if (solution.OverbookedCapacity.Value <= 0.0) { 86 88 paretoFrontChart.Series[0].Points.AddXY(solution.FlowDistanceQuality.Value, solution.InstallationQuality.Value); 89 paretoFrontChart.Series[0].Points.Last().Tag = solution; 90 } 87 91 } 88 92 } finally { … … 92 96 } 93 97 } 98 99 private void paretoFrontChart_MouseDoubleClick(object sender, MouseEventArgs e) { 100 HitTestResult h = paretoFrontChart.HitTest(e.X, e.Y, ChartElementType.DataPoint); 101 if (h.ChartElementType == ChartElementType.DataPoint) { 102 var solution = (GQAPSolution)((DataPoint)h.Object).Tag; 103 var assignment = new GQAPAssignment(solution.Assignment, solution.Quality, solution.FlowDistanceQuality, solution.InstallationQuality, solution.OverbookedCapacity, Content.EquipmentNames, Content.LocationNames, Content.Distances, Content.Weights, Content.InstallationCosts, Content.Demands, Content.Capacities, Content.TransportationCosts, Content.OverbookedCapacityPenalty); 104 105 var view = MainFormManager.MainForm.ShowContent(assignment); 106 if (view != null) { 107 view.ReadOnly = this.ReadOnly; 108 view.Locked = this.Locked; 109 } 110 } 111 } 94 112 } 95 113 }
Note: See TracChangeset
for help on using the changeset viewer.