Example #1
0
        // static testing method
        public static void MainFunction()
        {
            var windowArgs = new WindowArgs()
            {
                Title = "TestDIKUGame"
            };

            var game = new TestDIKUGame(windowArgs);

            game.Run();
        }
Example #2
0
        // static testing method
        public static void MainFunction()
        {
            var windowArgs = new WindowArgs()
            {
                Title     = "TestTimedEvent",
                Resizable = false
            };

            var game = new TestTimedEvent(windowArgs);

            game.Run();
        }
Example #3
0
        public TestTimedEvent(WindowArgs windowArgs) : base(windowArgs)
        {
            window.SetKeyEventHandler(KeyHandler);
            random = new Random();

            eventBus = new GameEventBus();
            eventBus.InitializeEventBus(new List <GameEventType> {
                GameEventType.TimedEvent
            });

            eventBus.Subscribe(GameEventType.TimedEvent, this);
        }
Example #4
0
        public Bootstrapper(WindowArgs windowArgs)
        {
            if (windowArgs.MainForm != null && windowArgs.MainWindow != null)
            {
                throw new ArgumentException("windowArgs contains more than one main view");
            }

            this.windowArgs  = windowArgs;
            mainViewModel    = new MainViewModel();
            containerBuilder = new ContainerBuilder();

            Thread.CurrentThread.CurrentUICulture = CultureInfo.CurrentCulture;
            FixLocalizedBindings();

            ConfigureContainer();
            ConfigureNavigationService();
        }
        internal static void MainFunction()
        {
            var windowArgs = new WindowArgs()
            {
                Title = "TestKeyEvents"
            };

            window = new Window(windowArgs);

            window.SetKeyEventHandler(KeyHandler);

            // test some sorted collections
            test = new System.Collections.Generic.SortedDictionary <int, string>();
            ran  = new System.Random();

            while (window.IsRunning())
            {
                window.PollEvents();
                window.Clear();
                window.SwapBuffers();
            }
        }
Example #6
0
 public TestDIKUGame(WindowArgs windowArgs) : base(windowArgs)
 {
     window.SetKeyEventHandler(KeyHandler);
 }
Example #7
0
 public DIKUGame(WindowArgs windowArgs)
 {
     window = new Window(windowArgs);
 }