- Timestamp:
- 10/28/10 16:27:51 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3/SymbolicExpressionTreeChart.Designer.cs
r3742 r4651 47 47 this.components = new System.ComponentModel.Container(); 48 48 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 49 this.contextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); 50 this.saveImageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 51 this.contextMenuStrip.SuspendLayout(); 49 52 this.SuspendLayout(); 53 // 54 // contextMenuStrip 55 // 56 this.contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 57 this.saveImageToolStripMenuItem}); 58 this.contextMenuStrip.Name = "contextMenuStrip"; 59 this.contextMenuStrip.Size = new System.Drawing.Size(135, 26); 60 // 61 // saveImageToolStripMenuItem 62 // 63 this.saveImageToolStripMenuItem.Name = "saveImageToolStripMenuItem"; 64 this.saveImageToolStripMenuItem.Size = new System.Drawing.Size(152, 22); 65 this.saveImageToolStripMenuItem.Text = "Save Image"; 66 this.saveImageToolStripMenuItem.Click += new System.EventHandler(this.saveImageToolStripMenuItem_Click); 50 67 // 51 68 // SymbolicExpressionTreeChart … … 53 70 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 54 71 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 72 this.ContextMenuStrip = this.contextMenuStrip; 55 73 this.Name = "SymbolicExpressionTreeChart"; 74 this.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SymbolicExpressionTreeChart_MouseClick); 75 this.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.SymbolicExpressionTreeChart_MouseDoubleClick); 76 this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SymbolicExpressionTreeChart_MouseDown); 56 77 this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.SymbolicExpressionTreeChart_MouseMove); 57 this.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.SymbolicExpressionTreeChart_MouseDoubleClick);58 this.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SymbolicExpressionTreeChart_MouseClick);59 this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SymbolicExpressionTreeChart_MouseDown);60 78 this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.SymbolicExpressionTreeChart_MouseUp); 79 this.contextMenuStrip.ResumeLayout(false); 61 80 this.ResumeLayout(false); 62 81 … … 66 85 67 86 private System.Windows.Forms.ToolTip toolTip; 87 private System.Windows.Forms.ContextMenuStrip contextMenuStrip; 88 private System.Windows.Forms.ToolStripMenuItem saveImageToolStripMenuItem; 68 89 } 69 90 } -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3/SymbolicExpressionTreeChart.cs
r4068 r4651 23 23 using System.Collections.Generic; 24 24 using System.Drawing; 25 using System.Drawing.Imaging; 25 26 using System.Windows.Forms; 26 27 … … 288 289 } 289 290 #endregion 291 292 #region save image 293 private void saveImageToolStripMenuItem_Click(object sender, EventArgs e) { 294 SaveFileDialog saveFileDialog = new SaveFileDialog(); 295 296 // Sets the current file name filter string, which determines 297 // the choices that appear in the "Save as file type" or 298 // "Files of type" box in the dialog box. 299 saveFileDialog.Filter = "Bitmap (*.bmp)|*.bmp|EMF (*.emf)|*.emf"; 300 saveFileDialog.FilterIndex = 1; 301 saveFileDialog.RestoreDirectory = true; 302 303 if (saveFileDialog.ShowDialog() == DialogResult.OK) { 304 string filename = saveFileDialog.FileName.ToLower(); 305 if (filename.EndsWith("bmp")) SaveImageAsBitmap(filename); 306 else if (filename.EndsWith("emf")) SaveImageAsEmf(filename); 307 else SaveImageAsBitmap(filename); 308 } 309 } 310 311 private void SaveImageAsBitmap(string filename) { 312 if (tree == null) return; 313 Image image = new Bitmap(Width, Height); 314 using (Graphics g = Graphics.FromImage(image)) { 315 int height = this.Height / tree.Height; 316 DrawFunctionTree(tree, g, 0, 0, Width, height); 317 } 318 image.Save(filename); 319 } 320 321 private void SaveImageAsEmf(string filename) { 322 if (tree == null) return; 323 using (Graphics g = CreateGraphics()) { 324 using (Metafile file = new Metafile(filename, g.GetHdc())) { 325 using (Graphics emfFile = Graphics.FromImage(file)) { 326 int height = this.Height / tree.Height; 327 DrawFunctionTree(tree, emfFile, 0, 0, Width, height); 328 } 329 } 330 g.ReleaseHdc(); 331 } 332 } 333 #endregion 290 334 } 291 335 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Classification.Views/3.3/HeuristicLab.Problems.DataAnalysis.Classification.Views-3.3.csproj
r4565 r4651 174 174 <Name>HeuristicLab.Problems.DataAnalysis-3.3</Name> 175 175 </ProjectReference> 176 <ProjectReference Include="..\..\HeuristicLab.Visualization.ChartControlsExtensions\3.3\HeuristicLab.Visualization.ChartControlsExtensions-3.3.csproj"> 177 <Project>{315BDA09-3F4F-49B3-9790-B37CFC1C5750}</Project> 178 <Name>HeuristicLab.Visualization.ChartControlsExtensions-3.3</Name> 179 </ProjectReference> 176 180 </ItemGroup> 177 181 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Classification.Views/3.3/HeuristicLabProblemsDataAnalysisClassificationViewsPlugin.cs.frame
r4634 r4651 32 32 [PluginDependency("HeuristicLab.Problems.DataAnalysis.Classification", "3.3")] 33 33 [PluginDependency("HeuristicLab.Problems.DataAnalysis.Regression", "3.3")] 34 [PluginDependency("HeuristicLab.Visualization.ChartControlsExtensions", "3.3")] 34 35 public class HeuristicLabProblemsDataAnalysisClassificationViewsPlugin : PluginBase { 35 36 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Classification.Views/3.3/RocCurvesView.Designer.cs
r4417 r4651 27 27 System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); 28 28 System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend(); 29 this.chart = new System.Windows.Forms.DataVisualization.Charting.Chart();29 this.chart = new HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart(); 30 30 this.label1 = new System.Windows.Forms.Label(); 31 31 this.cmbSamples = new System.Windows.Forms.ComboBox(); … … 90 90 #endregion 91 91 92 private System.Windows.Forms.DataVisualization.Charting.Chart chart;92 private HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart chart; 93 93 private System.Windows.Forms.Label label1; 94 94 private System.Windows.Forms.ComboBox cmbSamples; -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Classification.Views/3.3/RocCurvesView.cs
r4469 r4651 49 49 cmbSamples.SelectedIndex = 0; 50 50 51 chart.CustomizeAllChartAreas(); 51 52 chart.ChartAreas[0].AxisX.Minimum = 0.0; 52 53 chart.ChartAreas[0].AxisX.Maximum = 1.0; -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Classification.Views/3.3/SymbolicClassificationSolutionView.Designer.cs
r4417 r4651 26 26 System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); 27 27 System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend(); 28 this.chart = new System.Windows.Forms.DataVisualization.Charting.Chart();28 this.chart = new HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart(); 29 29 this.JitterTrackBar = new System.Windows.Forms.TrackBar(); 30 30 this.label1 = new System.Windows.Forms.Label(); … … 95 95 #endregion 96 96 97 private System.Windows.Forms.DataVisualization.Charting.Chart chart;97 private HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart chart; 98 98 private System.Windows.Forms.TrackBar JitterTrackBar; 99 99 private System.Windows.Forms.Label label1; -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Classification.Views/3.3/SymbolicClassificationSolutionView.cs
r4469 r4651 57 57 updateInProgress = false; 58 58 59 this.chart.CustomizeAllChartAreas(); 59 60 this.chart.ChartAreas[0].CursorX.IsUserSelectionEnabled = true; 60 61 this.chart.ChartAreas[0].AxisX.ScaleView.Zoomable = true; -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/HeuristicLab.Problems.DataAnalysis.Views-3.3.csproj
r4065 r4651 283 283 <Name>HeuristicLab.Problems.DataAnalysis-3.3</Name> 284 284 </ProjectReference> 285 <ProjectReference Include="..\..\HeuristicLab.Visualization.ChartControlsExtensions\3.3\HeuristicLab.Visualization.ChartControlsExtensions-3.3.csproj"> 286 <Project>{315BDA09-3F4F-49B3-9790-B37CFC1C5750}</Project> 287 <Name>HeuristicLab.Visualization.ChartControlsExtensions-3.3</Name> 288 </ProjectReference> 285 289 </ItemGroup> 286 290 <ItemGroup> -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/HeuristicLabProblemsDataAnalysisViewsPlugin.cs.frame
r4633 r4651 28 28 [Plugin("HeuristicLab.Problems.DataAnalysis.Views","3.3.1.$WCREV$")] 29 29 [PluginFile("HeuristicLab.Problems.DataAnalysis.Views-3.3.dll", PluginFileType.Assembly)] 30 30 [PluginDependency("HeuristicLab.ALGLIB","2.5.0.0")] 31 31 [PluginDependency("HeuristicLab.Collections", "3.3.1.0")] 32 32 [PluginDependency("HeuristicLab.Common", "3.3.1.0")] … … 42 42 [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.3.1.0")] 43 43 [PluginDependency("HeuristicLab.Problems.DataAnalysis.Regression", "3.3.1.0")] 44 [PluginDependency("HeuristicLab.Visualization.ChartControlsExtensions", "3.3")] 44 45 public class HeuristicLabProblemsDataAnalysisViewsPlugin : PluginBase { 45 46 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/LineChartView.Designer.cs
r3442 r4651 46 46 System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); 47 47 System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend(); 48 this.chart = new System.Windows.Forms.DataVisualization.Charting.Chart();48 this.chart = new HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart(); 49 49 ((System.ComponentModel.ISupportInitialize)(this.chart)).BeginInit(); 50 50 this.SuspendLayout(); … … 79 79 #endregion 80 80 81 private System.Windows.Forms.DataVisualization.Charting.Chart chart;81 private HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart chart; 82 82 } 83 83 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/LineChartView.cs
r4068 r4651 43 43 InitializeComponent(); 44 44 //configure axis 45 this.chart.CustomizeAllChartAreas(); 45 46 this.chart.ChartAreas[0].CursorX.IsUserSelectionEnabled = true; 46 47 this.chart.ChartAreas[0].AxisX.ScaleView.Zoomable = true; -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/ScatterPlotView.Designer.cs
r3442 r4651 47 47 System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); 48 48 System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend(); 49 this.chart = new System.Windows.Forms.DataVisualization.Charting.Chart();49 this.chart = new HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart(); 50 50 ((System.ComponentModel.ISupportInitialize)(this.chart)).BeginInit(); 51 51 this.SuspendLayout(); … … 82 82 #endregion 83 83 84 private System.Windows.Forms.DataVisualization.Charting.Chart chart;84 private HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart chart; 85 85 } 86 86 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/ScatterPlotView.cs
r4468 r4651 61 61 this.chart.AxisViewChanged += new EventHandler<System.Windows.Forms.DataVisualization.Charting.ViewEventArgs>(chart_AxisViewChanged); 62 62 63 //configure axis 63 //configure axis 64 this.chart.CustomizeAllChartAreas(); 64 65 this.chart.ChartAreas[0].AxisX.Title = "Estimated Values"; 65 66 this.chart.ChartAreas[0].CursorX.IsUserSelectionEnabled = true;
Note: See TracChangeset
for help on using the changeset viewer.