- Timestamp:
- 04/21/10 06:14:03 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.TravelingSalesman.Views/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.TravelingSalesman.Views/3.3/PathTSPTourView.cs
r3213 r3454 70 70 if (Content == null) { 71 71 pictureBox.Image = null; 72 pictureBox.Enabled = false;73 72 } else { 74 pictureBox.Enabled = true;75 73 GenerateImage(); 76 74 } 75 SetEnabledStateOfControls(); 76 } 77 78 protected override void OnReadOnlyChanged() { 79 base.OnReadOnlyChanged(); 80 SetEnabledStateOfControls(); 81 } 82 83 private void SetEnabledStateOfControls() { 84 pictureBox.Enabled = Content != null; 77 85 } 78 86 -
trunk/sources/HeuristicLab.Problems.TravelingSalesman.Views/3.3/TravelingSalesmanProblemView.cs
r3376 r3454 71 71 if (Content == null) { 72 72 parameterCollectionView.Content = null; 73 parameterCollectionView.Enabled = false;74 73 pathTSPTourView.Content = null; 75 pathTSPTourView.Enabled = false;76 importButton.Enabled = false;77 74 } else { 78 75 parameterCollectionView.Content = ((IParameterizedNamedItem)Content).Parameters; 79 parameterCollectionView.Enabled = true;80 76 pathTSPTourView.Content = new PathTSPTour(Content.Coordinates, Content.BestKnownSolution); 81 pathTSPTourView.Enabled = true;82 importButton.Enabled = true;83 77 } 78 SetEnabledStateOfControls(); 79 } 80 81 protected override void OnReadOnlyChanged() { 82 base.OnReadOnlyChanged(); 83 SetEnabledStateOfControls(); 84 } 85 86 private void SetEnabledStateOfControls() { 87 parameterCollectionView.Enabled = Content != null; 88 parameterCollectionView.ReadOnly = ReadOnly; 89 pathTSPTourView.Enabled = Content != null; 90 pathTSPTourView.ReadOnly = ReadOnly; 91 importButton.Enabled = Content != null && !ReadOnly; 84 92 } 85 93
Note: See TracChangeset
for help on using the changeset viewer.