本文整理汇总了C#中Cursor.getInt方法的典型用法代码示例。如果您正苦于以下问题:C# Cursor.getInt方法的具体用法?C# Cursor.getInt怎么用?C# Cursor.getInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cursor
的用法示例。
在下文中一共展示了Cursor.getInt方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: pullThumbnails
private bool pullThumbnails(Cursor imageCursor)
{
string data = "";
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final long img_id = imageCursor.getLong(imageCursor.getColumnIndex(android.provider.MediaStore.Images.Media._ID));
long img_id = imageCursor.getLong(imageCursor.getColumnIndex(MediaStore.Images.Media._ID));
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final android.graphics.Bitmap bm = android.provider.MediaStore.Images.Thumbnails.getThumbnail(getApplicationContext().getContentResolver(), img_id, android.provider.MediaStore.Images.Thumbnails.MICRO_KIND, null);
Bitmap bm = MediaStore.Images.Thumbnails.getThumbnail(ApplicationContext.ContentResolver, img_id, MediaStore.Images.Thumbnails.MICRO_KIND, null);
if (bm == null)
{
return false;
}
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final java.io.ByteArrayOutputStream stream = new java.io.ByteArrayOutputStream();
ByteArrayOutputStream stream = new ByteArrayOutputStream();
bm.compress(Bitmap.CompressFormat.JPEG, 80, stream);
data = Base64.encodeToString(stream.toByteArray(), Base64.NO_WRAP);
try
{
stream.close();
}
//JAVA TO C# CONVERTER WARNING: 'final' catch parameters are not available in C#:
//ORIGINAL LINE: catch (final java.io.IOException e)
catch (IOException e)
{
Console.WriteLine(e.ToString());
Console.Write(e.StackTrace);
}
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final long img_size = imageCursor.getLong(imageCursor.getColumnIndex(android.provider.MediaStore.Images.Media.SIZE));
long img_size = imageCursor.getLong(imageCursor.getColumnIndex(MediaStore.Images.Media.SIZE));
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final String name = imageCursor.getString(imageCursor.getColumnIndex(android.provider.MediaStore.Images.Media.DISPLAY_NAME));
string name = imageCursor.getString(imageCursor.getColumnIndex(MediaStore.Images.Media.DISPLAY_NAME));
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final int width = imageCursor.getInt(imageCursor.getColumnIndex(android.provider.MediaStore.Images.Media.WIDTH));
int width = imageCursor.getInt(imageCursor.getColumnIndex(MediaStore.Images.Media.WIDTH));
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final int height = imageCursor.getInt(imageCursor.getColumnIndex(android.provider.MediaStore.Images.Media.HEIGHT));
int height = imageCursor.getInt(imageCursor.getColumnIndex(MediaStore.Images.Media.HEIGHT));
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final TBModelJson msg = new TBModelJson(img_id, name, data, img_size, width, height);
ImageFetchModelImpl.TBModelJson msg = new ImageFetchModelImpl.TBModelJson(img_id, name, data, img_size, width, height);
mTb.Add(msg);
return true;
}