• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Forms.RetrieveVirtualItemEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: listViewResults_RetrieveVirtualItem

 void listViewResults_RetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e)
 {
     if (e.ItemIndex >= 0 && e.ItemIndex < dataStream.Length)
     {
         e.Item = new ListViewItem(dataStream[e.ItemIndex]);
     }
 }
开发者ID:mausch,项目名称:NHWorkbench,代码行数:7,代码来源:ResultsView.cs


示例2: listView_RetrieveVirtualItem

		private void listView_RetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e)
		{
			// Check if the item is in the local cache.
			DataRow match = null;
			if (dtCachedItems != null)
				match = dtCachedItems.Rows.Find(e.ItemIndex + 1);

			if (match == null)
			{
				// The item isn't in memory.
				// Get a new range of 100 records.
				int from, to;
				if (e.ItemIndex < 50)
					from = 0;
				else
					from = (e.ItemIndex - 50);

				to = from + 100;
				dtCachedItems = NorthwindDB.GetOrders(from, to);

				// Don't use the MessageBox to show this information.
				// Hiding any part of the ListView can retrigger this event.
				lblStatus.Text = String.Format(
					"Fetched rows from {0} to {1}.",
					from.ToString(), to.ToString());

				match = dtCachedItems.Rows.Find(e.ItemIndex + 1);
			}

			// Create the ListViewItem for the matching record.
			e.Item = new ListViewItem(match["OrderID"].ToString());
			e.Item.SubItems.Add(match["ShippedDate"].ToString());
		}
开发者ID:ehershey,项目名称:development,代码行数:33,代码来源:Form1.cs


示例3: OnRetrieveVirtualItem

 void OnRetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e)
 {
     var item=_vmd.BoneMotions[e.ItemIndex];
     e.Item = new ListViewItem(new string[]{
             item.BoneName,
             item.FrameNum.ToString()
             });
 }
开发者ID:ousttrue,项目名称:csmeshio,代码行数:8,代码来源:MotionPanel.cs


示例4: SearchResultsListViewRetrieveVItem

        private void SearchResultsListViewRetrieveVItem(object sender, RetrieveVirtualItemEventArgs e)
        {
            Contract.Requires(e.ItemIndex >= 0);
            Contract.Requires(e.ItemIndex < this._vehicleResults.Count);

            var vehicle = _vehicleResults[e.ItemIndex];
            e.Item = new ListViewItem(new[] { vehicle.Id.ToString(), VehicleInfo.GetUsedCount(vehicle).ToString()});
        }
开发者ID:bobby1212,项目名称:VehicleGarage,代码行数:8,代码来源:FormMain.cs


示例5: ResultList_RetrieveVirtualItem

        private void ResultList_RetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e)
        {
            if (e.ItemIndex < _searchResultInfos.Count)
            {
                ListViewItem listViewItem = new ListViewItem { Text = _searchResultInfos[e.ItemIndex].Title };

                e.Item = listViewItem;
            }
        }
开发者ID:ozok,项目名称:TRadioPlayer,代码行数:9,代码来源:SearchForm.cs


示例6: EnumerationListView_RetrieveVirtualItem

 public void EnumerationListView_RetrieveVirtualItem(object Sender, RetrieveVirtualItemEventArgs e)
 {
     if (e.ItemIndex < 0 || e.ItemIndex >= enumeration.Count)
         return;
     IdentifiableName item = enumeration[e.ItemIndex];
     e.Item = new ListViewItem();
     e.Item.Text = item.Id.ToString();
     e.Item.SubItems.Add(item.Name);
 }
开发者ID:Jopie64,项目名称:redmine-desktop-client,代码行数:9,代码来源:EditEnumListForm.cs


示例7: listViewPrimeNumberList_RetrieveVirtualItem

        private void listViewPrimeNumberList_RetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e)
        {
            e.Item = new ListViewItem(e.ItemIndex.ToString());

            bool lock_taken = false;
            calculator.BeginAccessData(ref lock_taken);
            e.Item.SubItems.Add(calculator.PrimeNumberList[e.ItemIndex].ToString());
            calculator.EndAccessData();
        }
开发者ID:EFanZh,项目名称:EFanZh,代码行数:9,代码来源:MainForm.cs


示例8: OnRetrieveVirtualItem

		protected override void OnRetrieveVirtualItem(RetrieveVirtualItemEventArgs e)
		{
			base.OnRetrieveVirtualItem(e);

			if (mCache[e.ItemIndex] != null) {
				e.Item = mCache[e.ItemIndex];
			}
			else {
				ListViewItem item = new ListViewItem(mItems[e.ItemIndex].OrignalLine.Replace("\t", "  "));
				e.Item = item;
				mCache[e.ItemIndex] = item;
			}
		}
开发者ID:Orvid,项目名称:Cosmos,代码行数:13,代码来源:ToolTipListBox.cs


示例9: OnRetrieveVirtualItem

 /// <summary>
 /// Called when the control need a virtual item.
 /// </summary>
 /// <param name="e">The event object the user needs to fill up.</param>
 protected override void OnRetrieveVirtualItem(RetrieveVirtualItemEventArgs e)
 {
     // Get the list view item from the user.
     base.OnRetrieveVirtualItem(e);
     if (e.Item != null)
     {
         // Go over all the sub items in the list view
         foreach (ListViewItem.ListViewSubItem subItem in e.Item.SubItems)
         {
             // If an items text is 260 characters long, add a space so it does
             // not crash the program.
             if (subItem.Text.Length == 260)
             {
                 subItem.Text = subItem.Text + " ";
             }
         }
     }
 }
开发者ID:jkowalski,项目名称:NLogViewer,代码行数:22,代码来源:SafeListView.cs


示例10: listView_players_data_RetrieveVirtualItem

        /***********************************************/

        void listView_players_data_RetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e)
        {
            try
            {
                e.Item = (ListViewItem)listView_players_data_items[e.ItemIndex];
                return;
            }
            catch
            {
                e.Item = new ListViewItem();
                e.Item.SubItems.Add("");
                e.Item.SubItems.Add("");
                e.Item.SubItems.Add("");
                e.Item.SubItems.Add("");
                e.Item.SubItems.Add("");
                e.Item.ImageIndex = -1; 
            }
        }
开发者ID:stephenZh,项目名称:l2net,代码行数:20,代码来源:L2NET_Timers.cs


示例11: RetrieveVirtualItem

 private void RetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e)
 {
     if (mCachedItem == null || mLastUpdatedItemIndex != e.ItemIndex)
     {
         e.Item = new ListViewItem(e.ItemIndex.ToString());
         mCachedItem = e.Item;
         StoredLine line = mStorage[e.ItemIndex];
         e.Item.SubItems.Add(mSession.GetTimestamp(line.Ticks));
         e.Item.SubItems.Add(mSession.GetProcessName(line.Pid) ?? line.Pid.ToString());
         e.Item.SubItems.Add(mStorage.GetString(e.ItemIndex));
         mLastUpdatedItemIndex = e.ItemIndex;
     }
     else
     {
         // we cache the listviewitem because the listview requests the same item very often!?
         e.Item = mCachedItem;
     }
 }
开发者ID:apakian,项目名称:buggazer,代码行数:18,代码来源:DBWinListView.cs


示例12: _culturesList_RetrieveVirtualItem

		private void _culturesList_RetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e)
		{
			CultureInfo ci = _cultures[e.ItemIndex];
			string[] items;
			Color c;
			if (ci == CultureInfo.InvariantCulture)
			{
				items = new string[] { "(default)", "Default Culture" };
				c = Color.Gray;
			}
			else
			{
				items = new string[] { ci.Name, ci.DisplayName };
				c = Color.Black;
			}
			e.Item = new ListViewItem(items,
				ci.IsNeutralCulture || ci == CultureInfo.InvariantCulture ? 0 : 1);
			e.Item.ForeColor = c;
		}
开发者ID:rsdn,项目名称:janus,代码行数:19,代码来源:CultureManagerForm.cs


示例13: MemoryView_RetrieveVirtualItem

        private void MemoryView_RetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e)
        {
            ListViewItem theItem;
            int i;
            ulong toRead = mAddress + (ulong)(e.ItemIndex << 4);

            if (mStoredBytes.TryGetValue(toRead, out theItem))
            {
                e.Item = theItem;
                return;
            }

            StringBuilder resultName = new StringBuilder(string.Format("{0:X8}:", toRead));

            for (i = 0; i < 16; i++)
                resultName.Append(" ??");

            e.Item = new ListViewItem(resultName.ToString());
            mStoredBytes[toRead] = e.Item;
            ThreadPool.QueueUserWorkItem(UpdateRow, toRead);
        }
开发者ID:HBelusca,项目名称:NasuTek-Odyssey-Tools,代码行数:21,代码来源:MemoryWindow.cs


示例14: HandleRetrieveVirtualItem

        /// <summary>
        /// Handle a RetrieveVirtualItem
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected virtual void HandleRetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e) {
            // .NET 2.0 seems to generate a lot of these events. Before drawing *each* sub-item,
            // this event is triggered 4-8 times for the same index. So we save lots of CPU time
            // by caching the last result.
            //System.Diagnostics.Debug.WriteLine(String.Format("HandleRetrieveVirtualItem({0})", e.ItemIndex));

            if (this.lastRetrieveVirtualItemIndex != e.ItemIndex) {
                this.lastRetrieveVirtualItemIndex = e.ItemIndex;
                this.lastRetrieveVirtualItem = this.MakeListViewItem(e.ItemIndex);
            }
            e.Item = this.lastRetrieveVirtualItem;
        }
开发者ID:printedheart,项目名称:logwizard,代码行数:17,代码来源:VirtualObjectListView.cs


示例15: EventList_RetrieveVirtualItem

 private void EventList_RetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e)
 {
     if (_ItemCache != null && e.ItemIndex >= _itemCacheIndex && e.ItemIndex < _itemCacheIndex + _ItemCache.Length)
     {
         //キャッシュヒット
         e.Item = _ItemCache[e.ItemIndex - _itemCacheIndex];
     }
     else
     {
         //キャッシュミス
         e.Item = CreateListViewItem(_filterdEventSource[e.ItemIndex]);
     }
 }
开发者ID:egcube,项目名称:OpenTween,代码行数:13,代码来源:EventViewerDialog.cs


示例16: MyList_RetrieveVirtualItem

 private void MyList_RetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e)
 {
     if (_itemCache != null && e.ItemIndex >= _itemCacheIndex && e.ItemIndex < _itemCacheIndex + _itemCache.Length && _curList.Equals(sender))
     {
         //A cache hit, so get the ListViewItem from the cache instead of making a new one.
         e.Item = _itemCache[e.ItemIndex - _itemCacheIndex];
     }
     else
     {
         //A cache miss, so create a new ListViewItem and pass it back.
         TabPage tb = (TabPage)((DetailsListView)sender).Parent;
         try
         {
             e.Item = CreateItem(tb,
                                 _statuses[tb.Text, e.ItemIndex],
                                 e.ItemIndex);
         }
         catch (Exception)
         {
             //不正な要求に対する間に合わせの応答
             string[] sitem = {"", "", "", "", "", "", "", ""};
             e.Item = new ImageListViewItem(sitem, "");
         }
     }
 }
开发者ID:lupeeloveee,项目名称:OpenTween,代码行数:25,代码来源:Tween.cs


示例17: SpellList_RetrieveVirtualItem

 private void SpellList_RetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e)
 {
     e.Item = new ListViewItem(new[] { _spellList[e.ItemIndex].ID.ToString(), _spellList[e.ItemIndex].SpellNameRank });
 }
开发者ID:rescript,项目名称:spellwork_cs,代码行数:4,代码来源:FormSearch.cs


示例18: lstInvoices_RetrieveVirtualItem

 private void lstInvoices_RetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e)
 {
     bool retry = true;
     while (retry)
     {
         try { e.Item = filteredInvoices[e.ItemIndex]; retry = false; }
         catch { retry = true; }
     }
 }
开发者ID:sunshinemistery,项目名称:Store,代码行数:9,代码来源:InvoiceManageForm.cs


示例19: listView_RetrieveVirtualItem

 void listView_RetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e)
 {
     e.Item = GetItem(e.ItemIndex);
 }
开发者ID:gh0std4ncer,项目名称:reko,代码行数:4,代码来源:SearchResultServiceImpl.cs


示例20: listViewHistory_RetrieveVirtualItem

        private void listViewHistory_RetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e)
        {
            lock (_document.History)
            {
                if ((e.ItemIndex >= 0) && (e.ItemIndex < _document.History.Count))
                {
                    ConnectionHistoryEntry entry = _document.History[e.ItemIndex];

                    ListViewItem item = new ListViewItem(entry.StartTime.ToString());

                    item.SubItems.Add(entry.EndTime.Subtract(entry.StartTime).ToString());
                    item.SubItems.Add(entry.NetworkDescription);
                    item.Tag = entry;

                    e.Item = item;
                }
                else
                {
                    // Return a dummy item
                    ListViewItem item = new ListViewItem("");
                    item.SubItems.Add("");
                    item.SubItems.Add("");
                    e.Item = item;
                }
            }
        }
开发者ID:michyer,项目名称:canape,代码行数:26,代码来源:ConnectionHistoryControl.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Forms.Ribbon类代码示例发布时间:2022-05-26
下一篇:
C# Forms.RadioButton类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap