示例#1
0
        static void Main(string[] args)
        {
            Regulus.Utility.Console.IViewer viwer = new Regulus.Utility.ConsoleViewer();
            var input = new Regulus.Utility.ConsoleInput(viwer);

            TestNativeUser.Application appliaction = new TestNativeUser.Application(viwer, input);

            var app = new Appliaction(appliaction, viwer);

            Regulus.Utility.Updater updater = new Regulus.Utility.Updater();
            appliaction.SetLogMessage(Regulus.Utility.Console.LogFilter.All);
            updater.Add(app);
            updater.Add(appliaction);

            bool exit = false;

            appliaction.Command.Register("quit", () => { exit = true; });

            while (exit == false)
            {
                input.Update();
                updater.Update();
            }
            appliaction.Command.Unregister("quit");
        }
示例#2
0
        static void Main(string[] args)
        {
            Regulus.Utility.Console.IViewer viwer = new Regulus.Utility.ConsoleViewer();
            var input = new Regulus.Utility.ConsoleInput(viwer);
            var server = new Regulus.Remoting.Soul.Native.Application(viwer, input);

            Regulus.Utility.Updater<Regulus.Utility.IUpdatable> updater = new Regulus.Utility.Updater<Regulus.Utility.IUpdatable>();
            updater.Add(server);

            bool exit = false;

            server.Command.Register("quit",
                () =>
                {
                    exit = true;
                });
            _Initial(server);

            while (exit == false)
            {
                updater.Update();
                input.Update();
            }

            server.Command.Unregister("quit");
            updater.Shutdown();
        }
示例#3
0
        static void Main(string[] args)
        {
            Regulus.Utility.Console.IViewer viwer = new Regulus.Utility.ConsoleViewer();
            var input  = new Regulus.Utility.ConsoleInput(viwer);
            var server = new Regulus.Remoting.Soul.Native.Application(viwer, input);

            Regulus.Utility.Updater <Regulus.Utility.IUpdatable> updater = new Regulus.Utility.Updater <Regulus.Utility.IUpdatable>();
            updater.Add(server);

            bool exit = false;

            server.Command.Register("quit", () => { exit = true; });

            while (exit == false)
            {
                updater.Update();
                input.Update();
            }

            server.Command.Unregister("quit");
        }
示例#4
0
        static void Main(string[] args)
        {
            Regulus.Utility.Console.IViewer viwer = new Regulus.Utility.ConsoleViewer();
            var input = new Regulus.Utility.ConsoleInput(viwer);
            TestNativeUser.Application appliaction = new TestNativeUser.Application(viwer, input);

            var app = new Appliaction(appliaction, viwer);

            Regulus.Utility.Updater updater = new Regulus.Utility.Updater();
            appliaction.SetLogMessage(Regulus.Utility.Console.LogFilter.All);
            updater.Add(app);
            updater.Add(appliaction);

            bool exit = false;
            appliaction.Command.Register("quit", () => { exit = true; });

            while (exit == false)
            {
                input.Update();
                updater.Update();

            }
            appliaction.Command.Unregister("quit");
        }