public override async void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); //constructor stuff cImageFileList = new ListImageFile(); cUnitNumber = UnitRepair.cUnitNumber; cRepairCode = UnitRepair.cRepairCode; cCount = 0; using (var _rs = new DynamicRS("Select FileName,FilePath,Thumbnail,len=len(Thumbnail),IdPicture from PicturesRepairs where RepairCode='" + cRepairCode + "' and UnitNumber='" + cUnitNumber + "' order by xfec", Values.gDatos)) { await _rs.OpenAsync(); while (!_rs.EOF) { Bitmap _bm = BitmapFactory.DecodeByteArray((byte[])_rs["Thumbnail"], 0, Convert.ToInt32(_rs["len"])); ImageFile elFile = new ImageFile(_rs["FileName"].ToString(), _bm); elFile.IdPicture = _rs["IdPicture"].ToString(); await cImageFileList.Add(elFile); _rs.MoveNext(); } } //cRSOld.Open("Select FileName,FilePath,Thumbnail,len=len(Thumbnail),IdPicture from PicturesRepairs where RepairCode='" + cRepairCode + "' and UnitNumber='" + cUnitNumber + "' order by xfec", Values.gDatos); //while (!cRSOld.EOF) //{ // Bitmap _bm = BitmapFactory.DecodeByteArray((byte[])cRSOld["Thumbnail"], 0, Convert.ToInt32(cRSOld["len"])); // ImageFile elFile = new ImageFile(cRSOld["FileName"].ToString(), _bm); // elFile.IdPicture = cRSOld["IdPicture"].ToString(); // await cImageFileList.Add(elFile); // cRSOld.MoveNext(); //} //cRSOld.Close(); // }
public ListImageAdapter(Context c, string pRepairCode, string pUnitNumber, int pImageWidth, ListImageFile pImagefileList) { context = c; //cImageFileList = new ListImageFile((Activity)context, pRepairCode, pUnitNumber); //cImageFileList.AfterFTP += CImageFileList_AfterFTP; cRepairCode = pRepairCode; cUnitNumber = pUnitNumber; cImageWidth = pImageWidth; cImageFileList = pImagefileList; cImageFileList.cParentActivity = (Activity)context; cImageFileList.cRepairCode = cRepairCode; cImageFileList.cUnitNumber = cUnitNumber; }