public int OnSample(INySample i_sample) { BitmapData bd = this.bmp.LockBits( new Rectangle(0, 0, 240, 320), ImageLockMode.WriteOnly, PixelFormat.Format16bppRgb565); //ビットマップデータのコピー i_sample.CopyToBuffer(bd.Scan0, 0, i_sample.GetDataSize()); this.bmp.UnlockBits(bd); //メインスレッドに同期して画面更新 if (this._dispose_request) { this._dispose_ready = true; } else { myDelegate d = new myDelegate(dg); this.Invoke(d); } return(0); }