Пример #1
0
        public InputPage(InputManagerBase manager)
            : base("InputPage")
        {
            this.manager = manager;
            ContextMenuHelper.AddContextMenuItem(element, "Close", CloseAction);

            inputBox            = Utilities.FindNode <TextBox>(element, "InputBox");
            inputBox.KeyDown   += TextEntered;
            inputBox.GotFocus  += OnFocus;
            inputBox.LostFocus += OnLostFocus;
        }
Пример #2
0
        /// <summary>
        /// Initialize the WaywardManager preparing the engine for use.
        /// </summary>
        /// <param name="app"></param>
        /// <param name="resources"></param>
        public void Init(Application app, InputManagerBase inputManager, ResourceDictionary resources)
        {
            application   = app;
            window        = new MainWindow();
            window.KeyUp += OnKeyUp;

            this.inputManager = inputManager;

            // Load all WaywardEngine resources and pass them to the application
            resources.MergedDictionaries.Add(new ResourceDictionary {
                Source = new Uri("/WaywardEngine;component/ResourceDictionaries/Pages.xaml", UriKind.RelativeOrAbsolute)
            });

            isInitialized = true;

            debugPage = new DebugPage();
        }