예제 #1
0
        private void Check()
        {
            Log.Add("Receiving server stat...", LogType.Info);
            if (!HHClient.Request(Settings.ServerStat))
            {
                return;
            }
            Log.Add("Receiving client settings...", LogType.Info);
            if (!HHClient.Request(Settings.ClientLogin))
            {
                return;
            }

            ServerStart();

            if (!HHClient.Request(Settings.ClientStart, "", true))
            {
                return;
            }
            else
            {
                Log.Add("Client started.", LogType.Info, true);
            }

            HathDownloader.Start();

            KeepAlive.Elapsed += new System.Timers.ElapsedEventHandler(KeepAlive_Elapsed);
            KeepAlive.Interval = 1000;
            KeepAlive.Start();
        }
예제 #2
0
        private void Check()
        {
            if (Cmd.States.Dev)
            {
                ServerStart();
            }
            else
            {
                UpdateStats.Elapsed += new System.Timers.ElapsedEventHandler(UpdateStats_Elapsed);
                UpdateStats.Interval = 1000;
                UpdateStats.Start();

                Log.Add("Receiving server stat...", LogType.Info);
                if (!HHClient.Request(Settings.ServerStat))
                {
                    return;
                }
                Log.Add("Receiving client settings...", LogType.Info);
                if (!HHClient.Request(Settings.ClientLogin))
                {
                    return;
                }

                barControl1.Set(Settings.MaxSpeed);

                ServerStart();

                if (!HHClient.Request(Settings.ClientStart, "", true))
                {
                    return;
                }
                else
                {
                    Log.Add("Client started.", LogType.Info, true);
                }

                /*
                 * if (!new RemoveFiles(Client.(LoginInfo)).Do())
                 * {
                 *  Log.Add("Cannot receive info!", LogType.CriticalError, true);
                 *  return;
                 * }
                 */

                HathDownloader.Start();

                KeepAlive.Elapsed += new System.Timers.ElapsedEventHandler(KeepAlive_Elapsed);
                KeepAlive.Interval = 1000;
                KeepAlive.Start();
            }
        }