Click here to Skip to main content
15,879,535 members
Articles / Programming Languages / C#

Linux Todolist

Rate me:
Please Sign up or sign in to vote.
4.59/5 (15 votes)
28 Jan 2008GPL35 min read 73.7K   2.3K   53  
A simple todolist designed for an Asus Eee Pc

// Configure log4net using the .config file
[assembly: log4net.Config.XmlConfigurator(Watch=true)]
// This will cause log4net to look for a configuration file
// called ConsoleApp.exe.config in the application base
// directory (i.e. the directory containing ConsoleApp.exe)

namespace uk.org.aspellclark.todolist
{
	using System;
	using System.Reflection;
	using System.Windows.Forms;
	using log4net;

	using uk.org.aspellclark.common;

    /// <summary>
    ///   <name>Program</name>
    ///   <namespace>uk.org.aspellclark.todolist</namespace>
    ///   <version>1.0</version>
    ///   <author>Andy Aspell-Clark</author>
    ///   <description>This is the entry point to the application
    ///   </description>
    ///   <history>
    ///     <historyitem> 1 Jan 2008  1.0 ARAC  Initial Version.</historyitem>
    ///   </history>
    /// </summary>
    public class Program
    {
		// Create a logger for use in this class
		private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
		// NOTE that using System.Reflection.MethodBase.GetCurrentMethod().DeclaringType
		// is equivalent to typeof(Program) but is more portable
		// i.e. you can copy the code directly into another class without
		// needing to edit the code.

		/// <summary>
		/// main entry point for the application
		/// </summary>
        [STAThread]
        public static void Main(string[] args)
        {
        	System.Console.WriteLine("\nTodolist Starting\n");
        	
			// Log an info level message
			if (log.IsInfoEnabled) {log.Info("Application [Todolist] Start");}
			
			PreferencesXml prefs = PreferencesXml.GetPreferences(Assembly.GetExecutingAssembly());
            prefs.readFromFile();
			
			log.Info("Environment Os ["+SystemInfo.OsVersion+"]");
			log.Info("Environment Host ["+SystemInfo.OsHostname+"]");
			
			log.Info("Application Version Number ["+AppVersion.VersionString+"]");
        	
			//Application.Run(new TreeListForm1());
			Application.Run(new MainForm(prefs));
        }
    }
}

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, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


Written By
Software Developer (Senior) Airbus Defense and Space
United Kingdom United Kingdom
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions