public static void Main(string[] args) { var view = new ConsoleViewer(); var input = new ConsoleInput(view); var core = _LoadGame("Game.dll"); var client = new Client<IUser>(view, input); client.ModeSelectorEvent += new ModeCreator(core , client.Command ).Select; var updater = new Updater(); updater.Add(client); updater.Add(core); while(client.Enable) { input.Update(); updater.Working(); } updater.Shutdown(); }
protected WindowConsole() { _AutoPowerRegulator = new AutoPowerRegulator(new PowerRegulator()); Viewer = new ConsoleViewer(); _Input = new ConsoleInput(Viewer); _Console = new Console(_Input, Viewer); _Updater = new Updater(); }
private static void Main(string[] args) { var sw = new SpinWait(); var botCount = 1; if(args.Length > 0) { botCount = int.Parse(args[0]); } if(args.Length > 1) { Program.IPAddress = args[1]; } var clientHandler = new ClientHandler(Program.IPAddress, Program.Port, botCount); var view = new ConsoleViewer(); Singleton<Log>.Instance.Initial(view); var input = new ConsoleInput(view); var client = new Client(view, input); var packetRegulator = new PacketRegulator(); client.Command.Register( "si", () => { Console.WriteLine( "Send Interval : {0}\nRequest Package Queue : {1}", HitHandler.Interval, packetRegulator.Sampling); }); client.ModeSelectorEvent += clientHandler.Begin; var updater = new Updater(); updater.Add(client); updater.Add(clientHandler); updater.Add(packetRegulator); while(client.Enable) { input.Update(); updater.Working(); sw.SpinOnce(); } client.Command.Unregister("si"); updater.Shutdown(); clientHandler.End(); Singleton<Log>.Instance.Final(); }
private static void Main(string[] args) { var enable = true; var view = new ConsoleViewer(); var input = new ConsoleInput(view); var console = new Console(input, view); console.Command.Register("quit", () => enable = false); console.Command.Register("CoreFPS", Program._CoreFPS); while(enable) { input.Update(); } }
static void Main(string[] args) { var view = new Regulus.Utility.ConsoleViewer(); var input = new Regulus.Utility.ConsoleInput(view); var console = new Regulus.Utility.Console(input, view); bool run = true; var wheel = new VGame.CLR.Wheel(); console.Command.Register("Quit" , () => { run = false; }); console.Command.Register("Spin", () => { _Spin(view , wheel); }); console.Command.Register("Export", () => { _Export(view, wheel); }); console.Command.Register<string>("Import[path]", (path) => { _Import(view, wheel , path); }); while (run) { input.Update(); } }
private static void Main(string[] args) { var view = new ConsoleViewer(); var input = new ConsoleInput(view); ICore core = null; // _LoadGame("Game.dll"); var client = new Client(view, input); client.ModeSelectorEvent += new ModeCreator(core).OnSelect; var updater = new Updater(); updater.Add(client); // updater.Add(core); while(client.Enable) { input.Update(); updater.Working(); } updater.Shutdown(); }