Changeset 3718
- Timestamp:
- 05/08/10 14:09:22 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Optimization.Views/3.3
- Files:
-
- 2 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization.Views/3.3/HeuristicLab.Optimization.Views-3.3.csproj
r3702 r3718 100 100 <DependentUpon>BatchRunView.cs</DependentUpon> 101 101 </Compile> 102 <Compile Include="RunCollectio ComparisonConstraintView.cs">103 <SubType>UserControl</SubType> 104 </Compile> 105 <Compile Include="RunCollectio ComparisonConstraintView.Designer.cs">106 <DependentUpon>RunCollectio ComparisonConstraintView.cs</DependentUpon>102 <Compile Include="RunCollectionComparisonConstraintView.cs"> 103 <SubType>UserControl</SubType> 104 </Compile> 105 <Compile Include="RunCollectionComparisonConstraintView.Designer.cs"> 106 <DependentUpon>RunCollectionComparisonConstraintView.cs</DependentUpon> 107 107 </Compile> 108 108 <Compile Include="RunCollectionTypeCompatibilityConstraintView.cs"> -
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionComparisonConstraintView.cs
r3713 r3718 52 52 } 53 53 } 54 if (Content.ConstraintColumn >= 0) {55 this.cmbConstraintColumn.SelectedItem = (matrix.ColumnNames.ElementAt(Content.ConstraintColumn));54 if (!string.IsNullOrEmpty(Content.ConstraintColumn)) { 55 this.cmbConstraintColumn.SelectedItem = Content.ConstraintColumn; 56 56 if (Content.ConstraintData != null) 57 57 txtConstraintData.Text = Content.ConstraintData.GetValue(); -
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintView.cs
r3614 r3718 46 46 if (Content.ConstrainedValue != null) { 47 47 this.cmbConstraintColumn.Items.AddRange(((IStringConvertibleMatrix)Content.ConstrainedValue).ColumnNames.ToArray()); 48 if ( Content.ConstraintColumn >= 0)49 this.cmbConstraintColumn.SelectedItem = ((IStringConvertibleMatrix)Content.ConstrainedValue).ColumnNames.ElementAt(Content.ConstraintColumn);48 if (!string.IsNullOrEmpty(Content.ConstraintColumn)) 49 this.cmbConstraintColumn.SelectedItem = Content.ConstraintColumn; 50 50 } 51 51 } … … 87 87 protected virtual void Content_ConstraintColumnChanged(object sender, EventArgs e) { 88 88 if (Content.ConstrainedValue != null) { 89 string columnName = ((IStringConvertibleMatrix)Content.ConstrainedValue).ColumnNames.ElementAt(Content.ConstraintColumn); 90 if (cmbConstraintColumn.SelectedItem.ToString() != columnName) 91 cmbConstraintColumn.SelectedItem = columnName; 89 if (cmbConstraintColumn.SelectedItem.ToString() != Content.ConstraintColumn) 90 cmbConstraintColumn.SelectedItem = Content.ConstraintColumn; 92 91 } 93 92 } 94 93 private void cmbConstraintColumn_SelectedIndexChanged(object sender, EventArgs e) { 95 94 if (Content.ConstrainedValue != null) { 96 Content.ConstraintColumn = ( (IStringConvertibleMatrix)Content.ConstrainedValue).ColumnNames.ToList().IndexOf(cmbConstraintColumn.SelectedItem.ToString());95 Content.ConstraintColumn = (string) cmbConstraintColumn.SelectedItem; 97 96 } 98 97 }
Note: See TracChangeset
for help on using the changeset viewer.