- Timestamp:
- 11/18/10 21:01:20 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis.Extensions/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3/SymbolicExpressionView.cs
r4840 r4841 30 30 [Content(typeof(SymbolicExpressionTree), false)] 31 31 public partial class SymbolicExpressionView : AsynchronousContentView { 32 private ISymbolicExpressionTreeStringFormatter treeFormatter; 32 33 33 List<ISymbolicExpressionTreeStringFormatter> treeFormattersList = new List<ISymbolicExpressionTreeStringFormatter>(); 34 34 … … 47 47 if (formatters.Current is SymbolicExpressionTreeStringFormatter) 48 48 selectedIndex = treeFormattersList.Count; 49 treeFormattersList.Add(formatters.Current.Clone() as ISymbolicExpressionTreeStringFormatter); 50 formattersComboBox.Items.Add(treeFormattersList[treeFormattersList.Count - 1].Name); 49 ISymbolicExpressionTreeStringFormatter formatter = formatters.Current.Clone() as ISymbolicExpressionTreeStringFormatter; 50 treeFormattersList.Add(formatter); 51 formattersComboBox.Items.Add(formatter.Name); 51 52 formatters.MoveNext(); 52 53 } 53 54 formattersComboBox.SelectedIndex = selectedIndex; 54 //treeFormatter = new SymbolicExpressionTreeStringFormatter();55 55 } 56 56 … … 60 60 textBox.Text = string.Empty; 61 61 else 62 textBox.Text = treeFormatter .Format(Content);62 textBox.Text = treeFormattersList[formattersComboBox.SelectedIndex].Format(Content); 63 63 } 64 64 … … 70 70 71 71 private void formattersComboBox_SelectedIndexChanged(object sender, System.EventArgs e) { 72 treeFormatter = treeFormattersList[formattersComboBox.SelectedIndex];73 72 OnContentChanged(); 74 73 }
Note: See TracChangeset
for help on using the changeset viewer.