//*******************************************************
//
// DEBUG CODE
#define Debug
//
//*******************************************************
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Threading;
using System.Security.Cryptography;
using System.Text;
using System.Diagnostics;
using System.IO;

namespace Mutation
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(string[] Args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // Read Alias
            try
            {
                StreamReader sr = new StreamReader(Application.StartupPath + "\\Settings.txt");
                Global.User.Alias = sr.ReadLine();
                sr.Close();
            }
            catch { Global.User.Alias = "Guest"; }

            // Load Splash
            Splash s = new Splash();
            s.Show();

            // Wait
            int start = DateTime.Now.Second;
            Stopwatch sw = new Stopwatch();
            sw.Start();
            while (sw.Elapsed.Seconds < 3)
                Application.DoEvents();

            // Close
            sw.Stop();
            s.Close();

            //Login Succeded
            DevExpress.UserSkins.BonusSkins.Register();
            Application.Run(new Main(Args));
        }
    }
}
