view Chronosv2/source/Main.cs @ 14:741981715d94

Initial review and translations
author stevenh7776 stevenhollidge@hotmail.com
date Tue, 21 Feb 2012 18:59:30 +0700
parents 443821e55f06
children
line wrap: on
line source

using System;
using NLog;

namespace Chronos
{
    /// <summary>
    /// Application entry point class
    /// </summary>
    public static class ChronosMain
    {
        /// <summary>
        /// Entry Point
        /// </summary>
        /// <param name="args">The args.</param>
        [STAThread]
        public static void Main(params string[] args)
        {
            if (SingleInstance.InitializeAsFirstInstance("Chronos"))
            {
                var application = new App();

                application.InitializeComponent();

                if (args != null && args.Length > 0)
                {
                    application.Run(args);
                }
                else
                {
                    application.Run();
                }

                // Allow single instance code to perform cleanup operations
                SingleInstance.Cleanup();
            }
        }
    }
}