Changeset 7418 for branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views
- Timestamp:
- 01/27/12 02:01:25 (12 years ago)
- Location:
- branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3
- Files:
-
- 3 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/GQAPAssignmentView.cs
r7415 r7418 46 46 protected override void DeregisterContentEvents() { 47 47 Content.PropertyChanged -= new PropertyChangedEventHandler(Content_PropertyChanged); 48 Content.Solution.PropertyChanged -= new PropertyChangedEventHandler(ContentSolution_PropertyChanged); 48 49 base.DeregisterContentEvents(); 49 50 } … … 51 52 base.RegisterContentEvents(); 52 53 Content.PropertyChanged += new PropertyChangedEventHandler(Content_PropertyChanged); 54 Content.Solution.PropertyChanged += new PropertyChangedEventHandler(ContentSolution_PropertyChanged); 53 55 } 54 56 #endregion … … 57 59 base.OnContentChanged(); 58 60 UpdateQuality(); 61 UpdateFlowDistanceQuality(); 62 UpdateInstallationQuality(); 63 UpdateOverbookedCapacity(); 59 64 UpdateAssignment(); 60 65 } … … 67 72 private void Content_PropertyChanged(object sender, PropertyChangedEventArgs e) { 68 73 switch (e.PropertyName) { 74 case "EquipmentNames": UpdateAssignment(); break; 75 case "LocationNames": UpdateAssignment(); break; 76 default: break; 77 } 78 } 79 private void ContentSolution_PropertyChanged(object sender, PropertyChangedEventArgs e) { 80 switch (e.PropertyName) { 69 81 case "Quality": UpdateQuality(); break; 70 82 case "FlowDistanceQuality": UpdateFlowDistanceQuality(); break; … … 72 84 case "OverbookedCapacity": UpdateOverbookedCapacity(); break; 73 85 case "Assignment": UpdateAssignment(); break; 74 case "EquipmentNames": UpdateAssignment(); break;75 case "LocationNames": UpdateAssignment(); break;76 86 default: break; 77 87 } … … 85 95 qualityLabel.Text = "-"; 86 96 } else { 87 qualityLabel.Text = Content. Quality.ToString();97 qualityLabel.Text = Content.Solution.Quality.ToString(); 88 98 } 89 99 } … … 93 103 if (InvokeRequired) Invoke((Action)UpdateFlowDistanceQuality); 94 104 else { 95 if (Content == null || Content. FlowDistanceQuality == null) {105 if (Content == null || Content.Solution.FlowDistanceQuality == null) { 96 106 flowDistanceQualityLabel.Text = "-"; 97 107 } else { 98 flowDistanceQualityLabel.Text = Content. FlowDistanceQuality.ToString();108 flowDistanceQualityLabel.Text = Content.Solution.FlowDistanceQuality.ToString(); 99 109 } 100 110 } … … 104 114 if (InvokeRequired) Invoke((Action)UpdateInstallationQuality); 105 115 else { 106 if (Content == null || Content. InstallationQuality == null) {116 if (Content == null || Content.Solution.InstallationQuality == null) { 107 117 installationQualityLabel.Text = "-"; 108 118 } else { 109 installationQualityLabel.Text = Content. InstallationQuality.ToString();119 installationQualityLabel.Text = Content.Solution.InstallationQuality.ToString(); 110 120 } 111 121 } … … 115 125 if (InvokeRequired) Invoke((Action)UpdateOverbookedCapacity); 116 126 else { 117 if (Content == null || Content. OverbookedCapacity == null) {127 if (Content == null || Content.Solution.OverbookedCapacity == null) { 118 128 overbookedCapacityLabel.Text = "-"; 119 129 } else { 120 overbookedCapacityLabel.Text = Content. OverbookedCapacity.ToString();130 overbookedCapacityLabel.Text = Content.Solution.OverbookedCapacity.ToString(); 121 131 } 122 132 } … … 128 138 assignmentTreeView.Nodes.Clear(); 129 139 if (Content != null) { 130 IntegerVector assignment = Content. Assignment;140 IntegerVector assignment = Content.Solution.Assignment; 131 141 Dictionary<int, TreeNode> locationNodes = new Dictionary<int, TreeNode>(); 132 142 for (int i = 0; i < assignment.Length; i++) { -
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views-3.3.csproj
r7412 r7418 38 38 </PropertyGroup> 39 39 <ItemGroup> 40 <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" /> 40 41 <Reference Include="HeuristicLab.Common-3.3"> 41 42 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath> … … 74 75 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath> 75 76 </Reference> 77 <Reference Include="HeuristicLab.Visualization.ChartControlsExtensions-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" /> 76 78 <Reference Include="System" /> 77 79 <Reference Include="System.Core" /> 78 80 <Reference Include="System.Drawing" /> 79 81 <Reference Include="System.Windows.Forms" /> 82 <Reference Include="System.Windows.Forms.DataVisualization" /> 80 83 <Reference Include="System.Xml.Linq" /> 81 84 <Reference Include="System.Data.DataSetExtensions" /> … … 85 88 </ItemGroup> 86 89 <ItemGroup> 90 <Compile Include="GQAPAssignmentArchiveView.cs"> 91 <SubType>UserControl</SubType> 92 </Compile> 93 <Compile Include="GQAPAssignmentArchiveView.Designer.cs"> 94 <DependentUpon>GQAPAssignmentArchiveView.cs</DependentUpon> 95 </Compile> 87 96 <Compile Include="GQAPAssignmentView.cs"> 88 97 <SubType>UserControl</SubType> … … 106 115 </ItemGroup> 107 116 <ItemGroup> 117 <EmbeddedResource Include="GQAPAssignmentArchiveView.resx"> 118 <DependentUpon>GQAPAssignmentArchiveView.cs</DependentUpon> 119 </EmbeddedResource> 108 120 <EmbeddedResource Include="GQAPAssignmentView.resx"> 109 121 <DependentUpon>GQAPAssignmentView.cs</DependentUpon>
Note: See TracChangeset
for help on using the changeset viewer.