Changeset 7464 for branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/ClassificationEnsembleSolutionView.cs
- Timestamp:
- 02/07/12 16:50:35 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/ClassificationEnsembleSolutionView.cs
r7259 r7464 20 20 #endregion 21 21 22 using System.Linq; 22 23 using System.Windows.Forms; 24 using HeuristicLab.Common; 23 25 using HeuristicLab.Core; 24 26 using HeuristicLab.MainForm; 27 using HeuristicLab.PluginInfrastructure; 28 using HeuristicLab.Problems.DataAnalysis.Interfaces.Classification; 25 29 26 30 namespace HeuristicLab.Problems.DataAnalysis.Views { … … 37 41 } 38 42 43 protected override void SetEnabledStateOfControls() { 44 base.SetEnabledStateOfControls(); 45 cmbWeightCalculator.Enabled = !Locked && !ReadOnly && Content != null; 46 } 47 39 48 protected override void OnContentChanged() { 40 49 base.OnContentChanged(); 41 50 itemsListView.Items.Remove(itemsListView.FindItemWithText("Model: ClassificationEnsembleModel")); 51 if (cmbWeightCalculator.Items.Count == 0) { 52 cmbWeightCalculator.Items.AddRange(ApplicationManager.Manager.GetInstances<IClassificationEnsembleSolutionWeightCalculator>().OrderBy(b => b.Name, new NaturalStringComparer()).ToArray()); 53 if (cmbWeightCalculator.Items.Count > 0) 54 cmbWeightCalculator.SelectedIndex = 0; 55 } else { 56 Content.WeightCalculator = (IClassificationEnsembleSolutionWeightCalculator)cmbWeightCalculator.SelectedItem; 57 } 58 } 59 60 private void cmbWeightCalculator_SelectedIndexChanged(object sender, System.EventArgs e) { 61 if (cmbWeightCalculator.SelectedItem != null) 62 Content.WeightCalculator = (IClassificationEnsembleSolutionWeightCalculator)cmbWeightCalculator.SelectedItem; 42 63 } 43 64
Note: See TracChangeset
for help on using the changeset viewer.