Changeset 6497
- Timestamp:
- 06/29/11 13:08:43 (13 years ago)
- Location:
- branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4.csproj
r6415 r6497 122 122 <DependentUpon>SymbolicExpressionGrammarEditorView.cs</DependentUpon> 123 123 </Compile> 124 <Compile Include="SymbolicExpressionGrammarSampleExpressionTreeView.cs"> 125 <SubType>UserControl</SubType> 126 </Compile> 127 <Compile Include="SymbolicExpressionGrammarSampleExpressionTreeView.Designer.cs"> 128 <DependentUpon>SymbolicExpressionGrammarSampleExpressionTreeView.cs</DependentUpon> 129 </Compile> 124 130 <Compile Include="SymbolicExpressionGrammarView.cs"> 125 131 <SubType>UserControl</SubType> … … 198 204 <Name>HeuristicLab.MainForm-3.3</Name> 199 205 </ProjectReference> 206 <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj"> 207 <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project> 208 <Name>HeuristicLab.Operators-3.3</Name> 209 </ProjectReference> 200 210 <ProjectReference Include="..\..\HeuristicLab.Optimization.Views\3.3\HeuristicLab.Optimization.Views-3.3.csproj"> 201 211 <Project>{662B4B15-8F4D-4AE5-B3EB-D91C215F5AF2}</Project> 202 212 <Name>HeuristicLab.Optimization.Views-3.3</Name> 203 213 </ProjectReference> 214 <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj"> 215 <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project> 216 <Name>HeuristicLab.Optimization-3.3</Name> 217 </ProjectReference> 204 218 <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj"> 205 219 <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project> 206 220 <Name>HeuristicLab.PluginInfrastructure-3.3</Name> 221 </ProjectReference> 222 <ProjectReference Include="..\..\HeuristicLab.Random\3.3\HeuristicLab.Random-3.3.csproj"> 223 <Project>{F4539FB6-4708-40C9-BE64-0A1390AEA197}</Project> 224 <Name>HeuristicLab.Random-3.3</Name> 207 225 </ProjectReference> 208 226 <ProjectReference Include="..\..\HeuristicLab.Visualization.ChartControlsExtensions\3.3\HeuristicLab.Visualization.ChartControlsExtensions-3.3.csproj"> … … 232 250 <Install>true</Install> 233 251 </BootstrapperPackage> 252 </ItemGroup> 253 <ItemGroup> 254 <EmbeddedResource Include="SymbolicExpressionGrammarEditorView.resx"> 255 <DependentUpon>SymbolicExpressionGrammarEditorView.cs</DependentUpon> 256 </EmbeddedResource> 234 257 </ItemGroup> 235 258 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> -
branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/HeuristicLabEncodingsSymbolicExpressionTreeEncodingViewsPlugin.cs.frame
r5869 r6497 30 30 [PluginDependency("HeuristicLab.Collections", "3.3")] 31 31 [PluginDependency("HeuristicLab.Common", "3.3")] 32 [PluginDependency("HeuristicLab.Common.Resources", "3.3")] 32 33 [PluginDependency("HeuristicLab.Core", "3.3")] 33 34 [PluginDependency("HeuristicLab.Core.Views", "3.3")] … … 35 36 [PluginDependency("HeuristicLab.MainForm", "3.3")] 36 37 [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")] 38 [PluginDependency("HeuristicLab.Random","3.3")] 37 39 public class HeuristicLabEncodingsSymbolicExpressionTreeEncodingViewsPlugin : PluginBase { 38 40 } -
branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarEditorView.Designer.cs
r6493 r6497 38 38 this.symbolDetailsGroupBox = new System.Windows.Forms.GroupBox(); 39 39 this.symbolDetailsViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost(); 40 this.showSampleTreeButton = new System.Windows.Forms.Button(); 40 41 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 41 42 this.grpSymbols.SuspendLayout(); … … 82 83 // splitContainer1.Panel1 83 84 // 85 this.splitContainer1.Panel1.Controls.Add(this.showSampleTreeButton); 84 86 this.splitContainer1.Panel1.Controls.Add(this.copyButton); 85 87 this.splitContainer1.Panel1.Controls.Add(this.showDetailsCheckBox); … … 157 159 this.symbolsTreeView.Name = "symbolsTreeView"; 158 160 this.symbolsTreeView.SelectedImageIndex = 0; 159 this.symbolsTreeView.Size = new System.Drawing.Size(185, 331);161 this.symbolsTreeView.Size = new System.Drawing.Size(185, 299); 160 162 this.symbolsTreeView.TabIndex = 0; 161 163 this.symbolsTreeView.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.symbolsTreeView_AfterCheck); 164 this.symbolsTreeView.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.symbolsTreeView_ItemDrag); 162 165 this.symbolsTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.symbolsTreeView_AfterSelect); 163 166 this.symbolsTreeView.DragDrop += new System.Windows.Forms.DragEventHandler(this.symbolsTreeView_DragDrop); 164 167 this.symbolsTreeView.DragEnter += new System.Windows.Forms.DragEventHandler(this.symbolsTreeView_DragEnter); 165 168 this.symbolsTreeView.DragOver += new System.Windows.Forms.DragEventHandler(this.symbolsTreeView_DragOver); 166 this.symbolsTreeView.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.symbolsTreeView_ItemDrag);167 169 this.symbolsTreeView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.symbolsTreeView_KeyDown); 168 170 this.symbolsTreeView.MouseDown += new System.Windows.Forms.MouseEventHandler(this.symbolsTreeView_MouseDown); … … 227 229 this.symbolDetailsViewHost.ViewsLabelVisible = true; 228 230 this.symbolDetailsViewHost.ViewType = null; 231 // 232 // showSampleTreeButton 233 // 234 this.showSampleTreeButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) 235 | System.Windows.Forms.AnchorStyles.Right))); 236 this.showSampleTreeButton.Location = new System.Drawing.Point(3, 333); 237 this.showSampleTreeButton.Name = "showSampleTreeButton"; 238 this.showSampleTreeButton.Size = new System.Drawing.Size(185, 23); 239 this.showSampleTreeButton.TabIndex = 9; 240 this.showSampleTreeButton.Text = "Show Sample Tree"; 241 this.showSampleTreeButton.UseVisualStyleBackColor = true; 242 this.showSampleTreeButton.Click += new System.EventHandler(this.showSampleTreeButton_Click); 229 243 // 230 244 // SymbolicExpressionGrammarEditorView … … 268 282 protected System.Windows.Forms.Button copyButton; 269 283 private SymbolicExpressionGrammarAllowedChildSymbolsControl allowedChildSymbolsControl; 284 private System.Windows.Forms.Button showSampleTreeButton; 270 285 } 271 286 } -
branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarEditorView.cs
r6494 r6497 32 32 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views { 33 33 [View("Symbolic Expression Grammar Editor")] 34 [Content(typeof(ISymbolicExpressionGrammar), false)]34 [Content(typeof(ISymbolicExpressionGrammar), true)] 35 35 public partial class SymbolicExpressionGrammarEditorView : NamedItemView { 36 36 public SymbolicExpressionGrammarEditorView() { … … 220 220 private void symbolsTreeView_MouseDown(object sender, MouseEventArgs e) { 221 221 // enables deselection of treeNodes 222 if (symbolsTreeView.SelectedNode == null) return;223 222 Point coordinates = new Point(e.X, e.Y); 224 if (e.Button == System.Windows.Forms.MouseButtons.Left && symbolsTreeView.GetNodeAt(coordinates) == null) { 223 TreeNode node = symbolsTreeView.GetNodeAt(coordinates); 224 if (e.Button == System.Windows.Forms.MouseButtons.Left && node == null) { 225 225 symbolsTreeView.SelectedNode = null; 226 226 symbolDetailsViewHost.Content = null; … … 256 256 ISymbol symbol = (ISymbol)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType(); 257 257 ChangeDuplicateSymbolNames(symbol); 258 259 var selectedNode = symbolsTreeView.SelectedNode; 260 GroupSymbol groupSymbol = selectedNode.Tag as GroupSymbol; 261 if (groupSymbol == null && selectedNode.Parent != null) groupSymbol = selectedNode.Parent.Tag as GroupSymbol; 262 258 GroupSymbol groupSymbol = null; 259 260 TreeNode selectedNode = symbolsTreeView.SelectedNode; 261 if (selectedNode != null) { 262 groupSymbol = selectedNode.Tag as GroupSymbol; 263 if (groupSymbol == null && selectedNode.Parent != null) groupSymbol = selectedNode.Parent.Tag as GroupSymbol; 264 } 263 265 if (groupSymbol != null) groupSymbol.SymbolsCollection.Add(symbol); 264 266 else Content.AddSymbol(symbol); … … 300 302 splitContainer1.Panel2Collapsed = !showDetailsCheckBox.Checked; 301 303 } 304 305 private void showSampleTreeButton_Click(object sender, EventArgs e) { 306 SymbolicExpressionGrammarSampleExpressionTreeView view = new SymbolicExpressionGrammarSampleExpressionTreeView(); 307 view.Content = Content; 308 view.Show(); 309 } 310 302 311 #endregion 303 312 -
branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarView.cs
r6299 r6497 30 30 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views { 31 31 [View("Symbolic Expression Grammar View")] 32 [Content(typeof(ISymbolicExpressionGrammar), true)]32 [Content(typeof(ISymbolicExpressionGrammar), false)] 33 33 public partial class SymbolicExpressionGrammarView : NamedItemView { 34 34 private CheckedItemList<ISymbol> symbols;
Note: See TracChangeset
for help on using the changeset viewer.