using System.Text;\r
using System.Drawing;\r
using System.Windows.Forms;\r
+using System.Diagnostics;\r
using DTXCreator.UndoRedo;\r
using DTXCreator.WAV_BMP_AVI;\r
using DTXCreator.Properties;\r
Rectangle rectangle = new Rectangle( this.rc現在のチップカーソル領域.Location, this.rc現在のチップカーソル領域.Size );\r
this.n現在のチップカーソルがあるレーン番号0to = this.mgr譜面管理者ref.nX座標dotが位置するレーン番号を返す( e.X );\r
this.n現在のチップカーソルの譜面先頭からの位置grid = this.mgr譜面管理者ref.nY座標dotが位置するgridを返す・ガイド幅単位( e.Y );\r
+ bool bOutOfLanes = false;\r
if( e.Y < ( C譜面管理.nレーン割付チップ番号表示高さdot + 10 ) )\r
{\r
this.rc現在のチップカーソル領域 = new Rectangle( 0, 0, 0, 0 );\r
}\r
else\r
{\r
- this.rc現在のチップカーソル領域 = new Rectangle( this.mgr譜面管理者ref.nレーンの左端X座標dotを返す( this.n現在のチップカーソルがあるレーン番号0to ), this.mgr譜面管理者ref.n譜面先頭からの位置gridから描画領域内のY座標dotを返す( this.n現在のチップカーソルの譜面先頭からの位置grid, this._Form.pictureBox譜面パネル.ClientSize ) - Cチップ.nチップの高さdot, this.mgr譜面管理者ref.listレーン[ this.n現在のチップカーソルがあるレーン番号0to ].n幅dot, Cチップ.nチップの高さdot );\r
+ int nLaneNo = this.n現在のチップカーソルがあるレーン番号0to;\r
+ if ( nLaneNo < 0 ) // #24264 2011.1.27 yyagi; to avoid ArgumentOutOfExceptions in x and width.\r
+ {\r
+ bOutOfLanes = true;\r
+ nLaneNo = 0;\r
+ }\r
+ int x = this.mgr譜面管理者ref.nレーンの左端X座標dotを返す( nLaneNo );\r
+ int y = this.mgr譜面管理者ref.n譜面先頭からの位置gridから描画領域内のY座標dotを返す( this.n現在のチップカーソルの譜面先頭からの位置grid, this._Form.pictureBox譜面パネル.ClientSize ) - Cチップ.nチップの高さdot;\r
+ int width = this.mgr譜面管理者ref.listレーン[ nLaneNo ].n幅dot;\r
+ int height = Cチップ.nチップの高さdot;\r
+ this.rc現在のチップカーソル領域 = new Rectangle( x, y, width, height );\r
}\r
- if( !rectangle.Equals( this.rc現在のチップカーソル領域 ) )\r
+ if ( !rectangle.Equals( this.rc現在のチップカーソル領域 ) && !bOutOfLanes ) // #24264 2011.1.27 yyagi add condition !bOutOfLanes to avoid ArgumentOutOfException in Refresh().\r
{\r
- this._Form.pictureBox譜面パネル.Refresh();\r
+ this._Form.pictureBox譜面パネル.Refresh(); \r
}\r
}\r
internal void Paint( PaintEventArgs e )\r