Changeset 9491
- Timestamp:
- 05/13/13 15:24:31 (12 years ago)
- Location:
- branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3/ChartControl.Designer.cs
r9415 r9491 67 67 // pictureBox 68 68 // 69 this.pictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 70 | System.Windows.Forms.AnchorStyles.Left) 69 this.pictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 70 | System.Windows.Forms.AnchorStyles.Left) 71 71 | System.Windows.Forms.AnchorStyles.Right))); 72 72 this.pictureBox.BackColor = System.Drawing.Color.White; 73 this.pictureBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;74 73 this.pictureBox.ContextMenuStrip = this.pictureBoxContextMenuStrip; 75 74 this.pictureBox.Location = new System.Drawing.Point(0, 0); … … 81 80 this.pictureBox.VisibleChanged += new System.EventHandler(this.pictureBox_VisibleChanged); 82 81 this.pictureBox.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBox_MouseDown); 82 this.pictureBox.MouseEnter += new System.EventHandler(this.pictureBox_MouseEnter); 83 83 this.pictureBox.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pictureBox_MouseMove); 84 84 this.pictureBox.MouseUp += new System.Windows.Forms.MouseEventHandler(this.pictureBox_MouseUp); 85 this.pictureBox.MouseWheel += new System.Windows.Forms.MouseEventHandler(this.pictureBox_MouseWheel); 86 85 87 // 86 88 // pictureBoxContextMenuStrip -
branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3/ChartControl.cs
r9415 r9491 166 166 } 167 167 168 private void ChartControl_KeyDown(object sender, KeyEventArgs e) { 168 protected virtual void pictureBox_MouseWheel(object sender, MouseEventArgs e) { 169 if (e.Delta > 0) { 170 // zoom in 171 double x1 = Chart.LowerLeft.X + Chart.Size.Width / 8; 172 double y1 = Chart.LowerLeft.Y + Chart.Size.Height / 8; 173 double x2 = Chart.UpperRight.X - Chart.Size.Width / 8; 174 double y2 = Chart.UpperRight.Y - Chart.Size.Height / 8; 175 Chart.ZoomIn(x1, y1, x2, y2); 176 } else if (e.Delta < 0) { 177 // zoom out 178 double x1 = Chart.LowerLeft.X - Chart.Size.Width / 8; 179 double y1 = Chart.LowerLeft.Y - Chart.Size.Height / 8; 180 double x2 = Chart.UpperRight.X + Chart.Size.Width / 8; 181 double y2 = Chart.UpperRight.Y + Chart.Size.Height / 8; 182 Chart.ZoomIn(x1, y1, x2, y2); 183 } 184 } 185 186 private void pictureBox_MouseEnter(object sender, EventArgs e) { 187 pictureBox.Focus(); 188 } 189 190 protected virtual void ChartControl_KeyDown(object sender, KeyEventArgs e) { 169 191 if (Chart.Mode == ChartMode.Select) { 170 192 if (e.KeyCode == Keys.Delete) { -
branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3/ChartControl.resx
r4773 r9491 113 113 </resheader> 114 114 <resheader name="reader"> 115 <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version= 2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>115 <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 116 116 </resheader> 117 117 <resheader name="writer"> 118 <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version= 2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>118 <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 119 119 </resheader> 120 <metadata name="pictureBoxContextMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version= 2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">120 <metadata name="pictureBoxContextMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 121 121 <value>102, 17</value> 122 122 </metadata> 123 <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version= 2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">123 <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 124 124 <value>17, 17</value> 125 125 </metadata> 126 <metadata name="saveFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 127 <value>311, 17</value> 128 </metadata> 126 129 </root>
Note: See TracChangeset
for help on using the changeset viewer.