예제 #1
0
 public GUI_Console(_7D2D_ServerInfo _ServerInfo)
 {
     this._ServerInfo      = _ServerInfo;
     Console.WindowWidth   = 111; // MaxDaysHorizontal * MaxCharactersPerDay -3;
     Console.WindowHeight  = 21;
     Console.CursorVisible = false;
 }
예제 #2
0
        static void Main(string[] args)
        {
            DateTime LastUpdateCheck = DateTime.Now;

            //new Thread(() => new Form1().ShowDialog()).Start();

            var Version = System.Reflection.Assembly.GetEntryAssembly().GetName().Version.ToString();

            Console.Title = $"7 Days to die - Horde & Airdrop Viewer - {Version}";

            bool debug = false;

            foreach (string arg in args)
            {
                if (arg.ToLower() == "/Debug".ToLower())
                {
                    debug = true;
                }
            }

            _7D2D_ServerInfo i   = new _7D2D_ServerInfo(debug);
            IGUI             GUI = new GUI_Console(i);

            do
            {
                if (i.Refresh())
                {
                    GUI.Draw();
                }
                else
                {
                    GUI.DrawConnectionError();
                }

                System.Threading.Thread.Sleep((int)(60f / 24f * 1000f));

                if (GUI.UpdateAvailable == false && (DateTime.Now - LastUpdateCheck).Minutes >= SearchForUpdateDelayInMin)
                {
                    if (CheckForUpdate())
                    {
                        GUI.UpdateAvailable = true;
                    }
                    LastUpdateCheck = DateTime.Now;
                }
            } while (true);
        }