Changeset 724 for trunk/sources
- Timestamp:
- 11/09/08 14:54:41 (16 years ago)
- Location:
- trunk/sources
- Files:
-
- 1 added
- 5 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Visualization.Test/MainForm.Designer.cs
r636 r724 31 31 // 32 32 this.canvasUI.Location = new System.Drawing.Point(12, 29); 33 this.canvasUI.MouseEventListener = null; 33 34 this.canvasUI.Name = "canvasUI"; 34 35 this.canvasUI.Size = new System.Drawing.Size(800, 600); … … 45 46 this.label2.Text = "Canvas"; 46 47 // 47 // Form148 // MainForm 48 49 // 49 50 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); … … 52 53 this.Controls.Add(this.label2); 53 54 this.Controls.Add(this.canvasUI); 54 this.Name = " Form1";55 this.Name = "MainForm"; 55 56 this.Text = "Form1"; 56 57 this.ResumeLayout(false); -
trunk/sources/HeuristicLab.Visualization/CanvasUI.Designer.cs
r635 r724 29 29 private void InitializeComponent() 30 30 { 31 components = new System.ComponentModel.Container(); 31 this.SuspendLayout(); 32 // 33 // CanvasUI 34 // 35 this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.CanvasUI_MouseMove); 36 this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.CanvasUI_MouseUp); 37 this.ResumeLayout(false); 38 32 39 } 33 40 -
trunk/sources/HeuristicLab.Visualization/CanvasUI.cs
r635 r724 1 using System.Drawing; 1 using System; 2 using System.Diagnostics; 3 using System.Drawing; 2 4 using System.Windows.Forms; 3 5 … … 5 7 public partial class CanvasUI : Control { 6 8 private readonly Canvas mainCanvas = new Canvas(); 9 private MouseEventListener mouseEventListener; 7 10 8 11 public CanvasUI() { … … 14 17 } 15 18 19 public MouseEventListener MouseEventListener { 20 get { return mouseEventListener; } 21 set { mouseEventListener = value; } 22 } 23 16 24 protected override void OnPaint(PaintEventArgs pe) { 17 Graphics g = pe.Graphics; 25 try { 26 Graphics g = pe.Graphics; 18 27 19 g.FillRectangle(Brushes.White, ClientRectangle);28 g.FillRectangle(Brushes.White, ClientRectangle); 20 29 21 mainCanvas.Draw(g, ClientRectangle);30 mainCanvas.Draw(g, ClientRectangle); 22 31 23 g.DrawRectangle(Pens.Black, 0, 0, Width - 1, Height - 1);32 g.DrawRectangle(Pens.Black, 0, 0, Width - 1, Height - 1); 24 33 25 base.OnPaint(pe); 34 base.OnPaint(pe); 35 } catch (Exception e) { 36 Debug.WriteLine(e); 37 } 38 } 39 40 private void CanvasUI_MouseMove(object sender, MouseEventArgs e) { 41 if (mouseEventListener != null) {} 42 } 43 44 private void CanvasUI_MouseUp(object sender, MouseEventArgs e) { 45 if (mouseEventListener != null) {} 26 46 } 27 47 } -
trunk/sources/HeuristicLab.Visualization/HeuristicLab.Visualization.csproj
r710 r724 69 69 <Compile Include="IChartDataModel.cs" /> 70 70 <Compile Include="IChartDataRowsModel.cs" /> 71 <Compile Include="IMouseEventListener.cs" />72 71 <Compile Include="IShape.cs" /> 73 72 <Compile Include="LineChart.cs"> … … 77 76 <DependentUpon>LineChart.cs</DependentUpon> 78 77 </Compile> 79 <Compile Include="MouseEventDragDropListener.cs" /> 80 <Compile Include="MouseEventPanListener.cs" /> 81 <Compile Include="MouseEventSelectListener.cs" /> 82 <Compile Include="MouseEventZoomListener.cs" /> 78 <Compile Include="MouseEventListener.cs" /> 83 79 <Compile Include="Offset.cs" /> 84 80 <Compile Include="PointD.cs" />
Note: See TracChangeset
for help on using the changeset viewer.