示例#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);
            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");
        }