view Chronosv2/source/Main.cs @ 19:09d18d6e5f40

airport work
author stevenh7776 stevenhollidge@hotmail.com
date Thu, 15 Mar 2012 06:59:15 +0000
parents 741981715d94
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();
            }
        }
    }
}