Changeset 519 for trunk/sources/HeuristicLab.Functions
- Timestamp:
- 08/18/08 15:55:32 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.Functions
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Functions/BakedFunctionTree.cs
r483 r519 344 344 return new FunctionTreeView(this); 345 345 } 346 347 public override string ToString() { 348 SymbolicExpressionExporter exporter = new SymbolicExpressionExporter(); 349 exporter.Visit(this); 350 return exporter.GetStringRepresentation(); 351 } 346 352 } 347 353 } -
trunk/sources/HeuristicLab.Functions/FunctionView.Designer.cs
r427 r519 60 60 this.treeNodeContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components); 61 61 this.copyToClipboardMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 62 this.copyToClipboardSExpressionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 62 63 this.splitContainer.Panel1.SuspendLayout(); 63 64 this.splitContainer.Panel2.SuspendLayout(); … … 167 168 // 168 169 this.treeNodeContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 169 this.copyToClipboardMenuItem}); 170 this.copyToClipboardMenuItem, 171 this.copyToClipboardSExpressionToolStripMenuItem}); 170 172 this.treeNodeContextMenu.Name = "treeNodeContextMenu"; 171 this.treeNodeContextMenu.Size = new System.Drawing.Size(2 48, 26);173 this.treeNodeContextMenu.Size = new System.Drawing.Size(259, 70); 172 174 // 173 175 // copyToClipboardMenuItem 174 176 // 175 177 this.copyToClipboardMenuItem.Name = "copyToClipboardMenuItem"; 176 this.copyToClipboardMenuItem.Size = new System.Drawing.Size(2 47, 22);178 this.copyToClipboardMenuItem.Size = new System.Drawing.Size(258, 22); 177 179 this.copyToClipboardMenuItem.Text = "Copy to clip-board (Model-Analyzer)"; 178 180 this.copyToClipboardMenuItem.Click += new System.EventHandler(this.copyToClipboardMenuItem_Click); 181 // 182 // copyToClipboardSExpressionToolStripMenuItem 183 // 184 this.copyToClipboardSExpressionToolStripMenuItem.Name = "copyToClipboardSExpressionToolStripMenuItem"; 185 this.copyToClipboardSExpressionToolStripMenuItem.Size = new System.Drawing.Size(258, 22); 186 this.copyToClipboardSExpressionToolStripMenuItem.Text = "Copy to clip-board (S-Expression)"; 187 this.copyToClipboardSExpressionToolStripMenuItem.Click += new System.EventHandler(this.copyToClipboardSExpressionToolStripMenuItem_Click); 179 188 // 180 189 // FunctionTreeView … … 209 218 private System.Windows.Forms.ContextMenuStrip treeNodeContextMenu; 210 219 private System.Windows.Forms.ToolStripMenuItem copyToClipboardMenuItem; 220 private System.Windows.Forms.ToolStripMenuItem copyToClipboardSExpressionToolStripMenuItem; 211 221 212 222 } -
trunk/sources/HeuristicLab.Functions/FunctionView.cs
r410 r519 139 139 Clipboard.SetText(visitor.ModelAnalyzerPrefix); 140 140 } 141 142 private void copyToClipboardSExpressionToolStripMenuItem_Click(object sender, EventArgs e) { 143 TreeNode node = funTreeView.SelectedNode; 144 if(node == null || node.Tag == null) return; 145 146 string sexp = ((IFunctionTree)node.Tag).ToString(); 147 Clipboard.SetText(sexp); 148 } 149 141 150 private void funTreeView_MouseUp(object sender, MouseEventArgs e) { 142 151 if(e.Button == MouseButtons.Right) { -
trunk/sources/HeuristicLab.Functions/HeuristicLab.Functions.csproj
r425 r519 78 78 <Compile Include="LessThan.cs" /> 79 79 <Compile Include="Not.cs" /> 80 <Compile Include="SymbolicExpressionExporter.cs" /> 80 81 <Compile Include="Signum.cs" /> 81 82 <Compile Include="Logarithm.cs" />
Note: See TracChangeset
for help on using the changeset viewer.