当前位置: 首页>>代码示例>>C#>>正文


C# ICursor类代码示例

本文整理汇总了C#中ICursor的典型用法代码示例。如果您正苦于以下问题:C# ICursor类的具体用法?C# ICursor怎么用?C# ICursor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ICursor类属于命名空间,在下文中一共展示了ICursor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1:

Cursor/*PERMUDA*/Proxy(
    ICursor/*PERMUDA*//*PERMUDA FROMSUFFIX*/ from
)
{
    NonNull.CheckParameter( from, "from" );
    this.From = from;
}
开发者ID:macro187,项目名称:halfdecentsharp,代码行数:7,代码来源:CursorProxy.permuda.cs

示例2: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.HomeScreen);
            listView = FindViewById<ListView>(Resource.Id.List);

            string[] projection = new string[] { VegetableProvider.InterfaceConsts.Id, VegetableProvider.InterfaceConsts.Name };
            string[] fromColumns = new string[] { VegetableProvider.InterfaceConsts.Name };
            int[] toControlIds = new int[] { Android.Resource.Id.Text1 };

            // ManagedQuery is deprecated in Honeycomb (3.0, API11)
            cursor = ManagedQuery(VegetableProvider.CONTENT_URI, projection, null, null, null);
            
            // ContentResolver requires you to close the query yourself
            //cursor = ContentResolver.Query(VegetableProvider.CONTENT_URI, projection, null, null, null);
            //StartManagingCursor(cursor);

            // CursorLoader introduced in Honeycomb (3.0, API11)
            var loader = new CursorLoader(this,
                VegetableProvider.CONTENT_URI, projection, null, null, null);
            cursor = (ICursor)loader.LoadInBackground();

            // create a SimpleCursorAdapter
            adapter = new SimpleCursorAdapter(this, Android.Resource.Layout.SimpleListItem1, cursor, 
                fromColumns, toControlIds);

            listView.Adapter = adapter;
            
            listView.ItemClick += OnListItemClick;
        }
开发者ID:Appercode,项目名称:monodroid-samples,代码行数:30,代码来源:HomeScreen.cs

示例3: ConvertToStringFormatted

		public override ICharSequence ConvertToStringFormatted (ICursor cursor)
		{
			var convertMe = new string[1];
			convertMe [0] = cursor.GetString (COLUMN_DISPLAY_NAME);

			var converted = CharSequence.ArrayFromStringArray (convertMe);
			return converted [0];
		}
开发者ID:89sos98,项目名称:monodroid-samples,代码行数:8,代码来源:AutoComplete4.cs

示例4: mapNote

 private Note mapNote(ICursor cursor)
 {
     return new Note
     {
         Id = cursor.GetInt(0),
         Title = cursor.GetString(1),
         Contents = cursor.GetString(2)
     };
 }
开发者ID:jorik041,项目名称:Sample-Projects,代码行数:9,代码来源:StandardNoteRepository.cs

示例5: StatementResult

        public StatementResult(ICursor cursor, ConstraintInfo[] constraints)
        {
            if (cursor == null)
                throw new ArgumentNullException("cursor");

            Cursor = cursor;
            Constraints = constraints;
            Type = StatementResultType.CursorRef;
        }
开发者ID:deveel,项目名称:deveeldb,代码行数:9,代码来源:StatementResult.cs

示例6: NoteListCursorAdapter

        public NoteListCursorAdapter(Context context, int layout, ICursor c, string[] from, int[] to, int selectedIndex)
            : base(context, layout, c, from, to)
        {
            this.layout = layout;
            this.context = context;
            this.selectedIndex = selectedIndex;

            localeDateFormat = DateFormat.getDateFormat(context);
            localeTimeFormat = DateFormat.getTimeFormat(context);
        }
开发者ID:decriptor,项目名称:tomdroid,代码行数:10,代码来源:NoteListCursorAdapter.cs

示例7: NewView

 public override View NewView(Context context, ICursor cursor, ViewGroup viewGroup)
 {
     View itemLayout = inflater.Inflate(Resource.Layout.sample_contacts_activity_item, viewGroup, false);
     itemLayout.Tag = new ViewHolder
     {
         text1 = itemLayout.FindViewById<TextView>(Android.Resource.Id.Text1),
         icon = itemLayout.FindViewById<QuickContactBadge>(Android.Resource.Id.Icon)
     };
     return itemLayout;
 }
开发者ID:fitzhex,项目名称:testrepo,代码行数:10,代码来源:SampleContactsAdapter.cs

示例8: createTransaction

 public static Transaction createTransaction(ICursor cursor)
 {
     Transaction purchase = new Transaction();
     purchase.orderId = cursor.GetString(0);
     purchase.productId = cursor.GetString(1);
     purchase.purchaseState = (PurchaseState)Enum.Parse(typeof(PurchaseState), cursor.GetInt(2).ToString());
     purchase.purchaseTime = cursor.GetLong(3);
     purchase.developerPayload = cursor.GetString(4);
     return purchase;
 }
开发者ID:Ezekoka,项目名称:MonoGame-StarterKits,代码行数:10,代码来源:BillingDB.cs

示例9: NewView

        public override View NewView(Context context, ICursor cursor, ViewGroup parent)
        {
            var grid = (GridView)parent;

            var imageView = new ImageView(context);
            imageView.LayoutParameters = new GridView.LayoutParams(grid.ColumnWidth, grid.ColumnWidth);
            imageView.SetScaleType(ImageView.ScaleType.CenterCrop);
            imageView.SetPadding(8, 8, 8, 8);

            return imageView;
        }
开发者ID:adbk,项目名称:spikes,代码行数:11,代码来源:ImageAdapter.cs

示例10: BindView

            public override void BindView(View view, Context context, ICursor cursor)
            {
                string type = cursor.GetString(BlocksQuery.BLOCK_TYPE);
                string blockId = cursor.GetString(BlocksQuery.BLOCK_ID);
                string blockTitle = cursor.GetString(BlocksQuery.BLOCK_TITLE);
                long blockStart = cursor.GetLong(BlocksQuery.BLOCK_START);
                long blockEnd = cursor.GetLong(BlocksQuery.BLOCK_END);
                string blockMeta = cursor.GetString(BlocksQuery.BLOCK_META);

                //TODO: Fix it
                //String blockTimeString = UIUtils.FormatBlockTimeString(blockStart, blockEnd,
                //    context);
            }
开发者ID:prashantvc,项目名称:XamarinIO,代码行数:13,代码来源:MyScheduleFragment.cs

示例11: NewView

        public override View NewView(Context context, ICursor cursor, ViewGroup parent)
        {
            var gv = parent as GridView;

            int px = Utils.GetPixFromGridView(context, parent as GridView);
            px = gv.ColumnWidth;

            var imageView = new ImageView(context);
            imageView.LayoutParameters = new GridView.LayoutParams(px, px);
            imageView.SetScaleType(ImageView.ScaleType.CenterCrop);
            imageView.SetPadding(8, 8, 8, 8);

            return imageView;
        }
开发者ID:adbk,项目名称:spikes,代码行数:14,代码来源:ImageAdapter.cs

示例12: cursorToList

 private static List<Transaction> cursorToList(ICursor c)
 {
     List<Transaction> transactions = new List<Transaction>();
     if (c != null)
     {
         while (c.MoveToNext())
         {
             Transaction purchase = BillingDB.createTransaction(c);
             transactions.Add(purchase);
         }
         c.Close();
     }
     return transactions;
 }
开发者ID:Ezekoka,项目名称:MonoGame-StarterKits,代码行数:14,代码来源:TransactionManager.cs

示例13: AssertRC

        private static void AssertRC(int expected, ICursor cursor, string message = "")
        {
            var actual = 0;
            while (cursor.MoveNext())
                actual++;

            var ok = (expected == actual);
            Console.WriteLine(ok ? "SUCCES {2} expected {0}, actual {1}" : "FAILED {2} expected {0}, actual {1}",
                              expected, actual, message);

            Total++;
            if (ok)
                Succeeded++;
        }
开发者ID:meowthsli,项目名称:Esentery,代码行数:14,代码来源:IntegrationTests.cs

示例14: DeleteNote

 public void DeleteNote(ICursor cursor)
 {
     new AlertDialog.Builder(_context)
         .SetTitle(_context.Resources.GetString(Resource.String.delete_title))
         .SetMessage(Resource.String.delete_message)
         .SetPositiveButton(Resource.String.yes_button, (object sender, DialogClickEventArgs e) =>
         {
             Uri noteUri = ContentUris.WithAppendedId(WikiNote.Notes.ALL_NOTES_URI,
                 cursor.GetInt(0));
             _context.ContentResolver.Delete(noteUri, null, null);
             _context.SetResult(Result.Ok);
             _context.Finish();
         })
         .SetNegativeButton(Resource.String.no_button, delegate { }).Show();
 }
开发者ID:CBSAdvisor,项目名称:cbs-quantum,代码行数:15,代码来源:WikiActivityHelper.cs

示例15: Hand

 public Hand(Color color)
 {
     cursorImage[(int)InputStatus.CURSOR] = getColoredImage(Resources.DiscImage, color);
     cursorImage[(int)InputStatus.UNKNOWN] = getColoredImage(Resources.DiscImage, color);
     cursorImage[(int)InputStatus.TOUCHED] = getColoredImage(Resources.DiscImageFilled, color);
     cursor = CursorFactory.getCursor(cursorImage[(int)status]);
 }
开发者ID:cehberlin,项目名称:KinectProvider4MultitouchVista,代码行数:7,代码来源:Hand.cs


注:本文中的ICursor类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。