Click here to Skip to main content
12,952,159 members (56,717 online)
Click here to Skip to main content
Articles » Languages » C# » Utilities » Downloads


13 bookmarked
Posted 29 May 2007

Visual FoxPro Lines of Code Analysis

, 5 Jan 2012 CPOL
Lines of Code Counter in C# that analyze FoxPro Projects (PJX)
using System;
using System.Data;
using System.Windows.Forms;
using Microsoft.Reporting.WinForms;

namespace VFPLOCCounter
	public partial class ReportForm : Form
		private DataTable rptTable;

		public ReportForm()

		private void ReportForm_Load(object sender, EventArgs e)
			foreach (DataRow r in rptTable.Rows)
				DataRow newRow = ResultData.resultsTable.NewRow();
				newRow ["fileName"] = r ["fileName"].ToString();
				newRow ["fileType"] = r ["fileType"].ToString();
				newRow ["totalLines"] = Convert.ToInt64(r ["totalLines"].ToString());
				newRow["numberMethods"] = Convert.ToInt64(r["numberMethods"].ToString());
				newRow["codeLines"] = Convert.ToInt64(r["codeLines"].ToString());
				newRow["commentLines"] = Convert.ToInt64(r["commentLines"].ToString());
				newRow["blankLines"] = Convert.ToInt64(r["blankLines"].ToString());

				newRow["codePercent"] = Convert.ToDecimal(r["codePercent"].ToString());
				newRow["commentPercent"] = Convert.ToDecimal(r["commentPercent"].ToString());
				newRow["blankPercent"] = Convert.ToDecimal(r["blankPercent"].ToString());

				newRow["projectName"] = r["projectName"].ToString();
				newRow["projectPath"] = r["projectPath"].ToString();

		/// <summary>
		/// ReportTable is the dataTable to view in the report body
		/// </summary>
		public DataTable ReportTable
			set { rptTable = value;}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Mark Miller
Software Developer (Senior)
United States United States
I develop software for a leading healthcare system in Northern Illinois.

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170525.1 | Last Updated 5 Jan 2012
Article Copyright 2007 by Mark Miller
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid