Click here to Skip to main content
15,897,704 members
Articles / Desktop Programming / Windows Forms

ResxWriter: Generating .resx files from an Excel spreadsheet

Rate me:
Please Sign up or sign in to vote.
4.94/5 (22 votes)
17 Nov 20062 min read 132.6K   3.5K   65  
Generate .resx files from an Excel spreadsheet; fully customizable.
/*
 * Patrick Bounaix
 * www.L0g1c4L.com
 * 
 * See AssemblyInfo.cs 
 * for License Information
 * */

#region using
using System;
using System.IO;
using System.Windows.Forms;
#endregion

namespace L0g1c4L.ApplicationCleaner
{
	/// <summary>
	/// Summary description for FilesRemover.
	/// </summary>
	class FilesRemover
	{
		#region Private...
		#region Methods
		#region ClearAll
		private static void ClearAll(string path)
		{
			DirectoryInfo di = new DirectoryInfo(path);			
		
			FileInfo[] fi =  di.GetFiles();

			if (fi.Length > 0)
			{							
				// directory pass //
				for (int i=0; i<fi.Length; i++)
				{
					try
					{
						fi[i].Delete();					
					}
					catch
					{
							
					}
				}
			}

			DirectoryInfo[] d = di.GetDirectories();

			if (d.Length > 0)
			{
				for (int j = 0; j<d.Length; j++)
				{
					try
					{
						d[j].Delete(true);
					}
					catch
					{

					}
				}
			}
		}
		#endregion

		#region Main Method
		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		static void Main(string[] args)
		{
			ClearAll(Application.StartupPath);
		}
		#endregion
		#endregion
		#endregion			
	}
}

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.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United States United States
- philosophy
- french
- computer science

Comments and Discussions