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


C# Forms.RetrieveVirtualItemEventArgs类代码示例

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


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


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