本文整理汇总了C#中System.Windows.Forms.ListViewItem.Count方法的典型用法代码示例。如果您正苦于以下问题:C# ListViewItem.Count方法的具体用法?C# ListViewItem.Count怎么用?C# ListViewItem.Count使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.ListViewItem
的用法示例。
在下文中一共展示了ListViewItem.Count方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: threadFunctionQuery
public void threadFunctionQuery(object uncast)
{
#region -instances
DataTable dataTableDetails = new DataTable();
int speedLimit;
Hashtable hashTable = (Hashtable)uncast;
Query query = new Query(database);
Tracker tracker = (Tracker)hashTable["tracker"];
if (tracker != null)
speedLimit = tracker.SpeedLimit;
TabControl tabControl = (TabControl)hashTable["tabControl"];
DateTime dateTimeFrom = (DateTime)hashTable["dateTimeFrom"];
DateTime dateTimeTo = (DateTime)hashTable["dateTimeTo"];
List<Tracker> trackerList = (List<Tracker>)hashTable["trackerList"];
int limit = (int)hashTable["limit"];
int offset = (int)hashTable["offset"];
int userId = (int)hashTable["comboBoxAccountId"];
int dataCount = 0;
string comboBoxReportTypeText = (string)hashTable["comboBoxReportTypeItem"];
ReportType reportType = (ReportType)Enum.Parse(typeof(ReportType), comboBoxReportTypeText);
bool tabPageExist = false;
string tabPageName = "";
string reportItemName = (string)hashTable["reportItemName"];
string reportTypeName = Enum.GetName(typeof(ReportType), reportType);
bool pagingStatus = false;
#endregion
#region -loop
//If timeout we will query again up to 3 times
for (int count = 0; count < 3; count++) {
try {
#region checkTabPage
tabPageName = reportTypeName + " : " + reportItemName;
this.Invoke(new MethodInvoker(delegate {
foreach (TabPage tabPageItem in tabControl.TabPages) {
if (tabPageItem.Text == tabPageName) {
tabControl.SelectedTab = tabPageItem;
tabPageExist = true;
break;
}
}
}));
if (tabPageExist == true) {
break;
}
#endregion
#region querySelection
switch (reportType) {
case ReportType.HISTORICAL:
dataTableDetails = query.getTrackerHistoricalData(this.company, this.user, dateTimeFrom, dateTimeTo, limit, offset, tracker);
dataCount = query.getTrackerHistoricalDataCount(this.user, dateTimeFrom, dateTimeTo, tracker);
//dataTableDetails.writeToCsvFile(Directory.GetCurrentDirectory());
pagingStatus = true;
break;
case ReportType.IDLING:
dataTableDetails = query.getTrackerIdlingData(this.company, this.user, dateTimeFrom, dateTimeTo, 1000000, 0, tracker);
dataCount = dataTableDetails.Rows.Count;
break;
case ReportType.RUNNING:
dataTableDetails = query.getTrackerRunningData(this.company, this.user, dateTimeFrom, dateTimeTo, 1000000, 0, tracker);
dataCount = dataTableDetails.Rows.Count;
break;
case ReportType.GEOFENCE:
dataTableDetails = query.getTrackerGeofence(this.company, this.user, dateTimeFrom, dateTimeTo, 1000000, 0, tracker);
dataCount = dataTableDetails.Rows.Count;
break;
case ReportType.TRACKERS:
dataTableDetails = query.getTrackers(this.company);
dataCount = dataTableDetails.Rows.Count;
break;
case ReportType.ACC:
dataTableDetails = query.getTrackerAccData(this.company, this.user, dateTimeFrom, dateTimeTo, 1000000, 0, tracker);
dataCount = dataTableDetails.Rows.Count;
break;
case ReportType.EXTERNAL_POWER_CUT:
dataTableDetails = query.getTrackerExternalPowerCutData(this.company, this.user, dateTimeFrom, dateTimeTo, 1000000, 0, tracker);
dataCount = dataTableDetails.Rows.Count;
break;
case ReportType.OVERSPEED:
dataTableDetails = query.getTrackerOverSpeedData(this.company, this.user, dateTimeFrom, dateTimeTo, 1000000, 0, tracker);
dataCount = dataTableDetails.Rows.Count;
break;
case ReportType.TRACKERS_GEOFENCE:
dataTableDetails = query.getTrackersGeofence(this.company, this.user, dateTimeFrom, dateTimeTo, 1000000, 0, trackerList);
dataCount = dataTableDetails.Rows.Count;
break;
case ReportType.TRACKERS_HISTORICAL:
dataTableDetails = query.getTrackersHistorical(this.company, this.user, dateTimeFrom, dateTimeTo, 500, 0, trackerList);
dataCount = dataTableDetails.Rows.Count;
//.........这里部分代码省略.........