Esempio n. 1
0
        static void Main()
        {
            LoadConfig(ConfigurationFilename);
#if !DEBUG
            AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
#endif
            //new update server - Forced change to prevent reseting a users config
            Config.UpdaterAddress = "/launcher/version.php";
            Config.ServerInfoAddress = "/launcher/server.php";

            LanguageManager = new LanguageManager();  
            LanguageManager.Load(Config.Language);
#if !DEBUG
            if (LauncherHelper.CheckInstance())
                if (MessageBox.Show(LanguageManager.Translation.pmsbProgRun) == DialogResult.OK)
                    return;
#endif
            ChatServer = new ChatClient();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            CheckmateServerList.Add("Checkmate USA+CN", new ServerInfo("Checkmate USA+CN", "173.224.211.158", 21001));
            CheckmateServerList.Add("Checkmate EU",new ServerInfo("Checkmate EU", "94.247.40.146", 7980));

            if (LauncherHelper.TestConnection())
            {
#if !DEBUG
                
                if (NewUpdateCheck())
                    return;
                if (!CheckServerInfo("http://158.69.116.140"))
                    CheckServerInfo("http://en.ygodevpro.com/");
                 
#endif
            }
            else MessageBox.Show("An internet connection is required to play online.");
#if DEBUG
            Config.ServerAddress = "158.69.116.140";
            Config.ChatPort = 9933;
            Server = new ServerInfo("DevPro", "127.0.0.1", 3333);
#endif
            MainForm = new MainFrm();
            Application.Run(MainForm);
        }
Esempio n. 2
0
        static void Main()
        {
            Config = new Configuration();
            LoadConfig(ConfigurationFilename);
            #if !DEBUG
            AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
            #endif
            //new update server - Forced change to prevent resting a users config
            Config.UpdaterAddress = "http://ygopro.de/launcher/version.php";
            Config.ServerInfoAddress = "http://ygopro.de/launcher/server.php";

            LanguageManager = new LanguageManager();
            //LanguageManager.Save("English");
            LanguageManager.Load(Config.Language);

            if (LauncherHelper.CheckInstance())
                if (MessageBox.Show(LanguageManager.Translation.pmsbProgRun) == DialogResult.OK)
                    return;

            UserInfo = new UserData();
            ChatServer = new ChatClient();
            DuelServer = new DuelServerClient();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            if (CheckUpdates())
                return;
            CheckServerInfo();
            #if DEBUG
            Config.ServerAddress = "86.0.24.143";
            Config.ChatPort = 9999;
            Config.GamePort = 6666;
            Server = new ServerInfo("DevPro", "86.0.24.143", 3333);
            #endif

            MainForm = new MainFrm();
            Application.Run(MainForm);
        }