using System; using System.Data; using System.Text; using System.Net; using System.Net.Sockets; using System.Threading; using System.Timers; using System.Text.RegularExpressions; using Xoa.Virtual.Users; using Xoa.Virtual.Rooms; using Ion.Storage; namespace Xoa.Managers { public static class timeManager { public static void checkTimeOfDay(bool ForAll, string username) { virtualUser User = userManager.getUser(username); User.sendData("BK" + "Coming Soon!"); //// Gets the current hour from the current time //DateTime time = DateTime.Now; //string format = "HH"; //{ // int _Time = Convert.ToInt32(time.ToString(format)); // if (ForAll == true) // { // // Checks if its day time // if (_Time == 05 || _Time == 06 || _Time == 07 || _Time == 08 || _Time == 09 || _Time >= 10 && _Time < 20) // { // userManager.sendData("BK" + "It Is Now Day Time\r " + time.ToShortTimeString() + ""); // } // // Checks if its night time // if (_Time > 19 && _Time <= 23 || _Time == 01 || _Time == 02 || _Time == 03 || _Time == 04) // { // userManager.sendData("BK" + "It Is Now Night\r " + time.ToShortTimeString() + ""); // } // } // else // { // int _userID = userManager.getUserID(username); // virtualUser User = userManager.getUser(_userID); // if (_Time == 05 || _Time == 06 || _Time == 07 || _Time == 08 || _Time == 09 || _Time >= 10 && _Time < 20) // { // User.sendData("BK" + "It Is Day Time\r " + time.ToShortTimeString() + ""); // } // // Checks if its night time // if (_Time > 19 && _Time <= 23 || _Time == 01 || _Time == 02 || _Time == 03 || _Time == 04) // { // User.sendData("BK" + "It Is Night\r " + time.ToShortTimeString() + ""); // } // } //} } } }