Beispiel #1
0
        protected void OnTextInput(TextInputEventArgs e)
        {
            if (e == null)
            {
                throw new ArgumentNullException("e");
            }

            EventHelpers.Raise(this, TextInput, e);
        }
Beispiel #2
0
        protected override void OnPause()
        {
            base.OnPause();
            EventHelpers.Raise(this, Paused, EventArgs.Empty);

            if (_orientationListener.CanDetectOrientation())
            {
                _orientationListener.Disable();
            }
        }
 protected virtual void Dispose(bool disposing)
 {
     if (!_disposed)
     {
         if (disposing)
         {
             if (_graphicsDevice != null)
             {
                 _graphicsDevice.Dispose();
                 _graphicsDevice = null;
             }
         }
         _disposed = true;
         EventHelpers.Raise(this, Disposed, EventArgs.Empty);
     }
 }
Beispiel #4
0
        protected override void OnResume()
        {
            base.OnResume();
            EventHelpers.Raise(this, Resumed, EventArgs.Empty);

            if (Game != null)
            {
                var deviceManager = (IGraphicsDeviceManager)Game.Services.GetService(typeof(IGraphicsDeviceManager));
                if (deviceManager == null)
                {
                    return;
                }
                ((GraphicsDeviceManager)deviceManager).ForceSetFullScreen();
                ((AndroidGameWindow)Game.Window).GameView.RequestFocus();
                if (_orientationListener.CanDetectOrientation())
                {
                    _orientationListener.Enable();
                }
            }
        }
Beispiel #5
0
 private void OnComponentRemoved(GameComponentCollectionEventArgs eventArgs)
 {
     EventHelpers.Raise(this, ComponentRemoved, eventArgs);
 }
Beispiel #6
0
 internal void OnKeyUp(InputKeyEventArgs e)
 {
     EventHelpers.Raise(this, KeyUp, e);
 }
Beispiel #7
0
 protected virtual void OnUpdateOrderChanged(object sender, EventArgs args)
 {
     EventHelpers.Raise(sender, UpdateOrderChanged, args);
 }
 // FIXME: Why does the GraphicsDeviceManager not know enough about the
 //        GraphicsDevice to raise these events without help?
 internal void OnDeviceCreated(EventArgs e)
 {
     EventHelpers.Raise(this, DeviceCreated, e);
 }
Beispiel #9
0
 protected virtual void OnDeactivated(object sender, EventArgs args)
 {
     AssertNotDisposed();
     EventHelpers.Raise(sender, Deactivated, args);
 }
 /// <summary>
 /// Called when a <see cref="GraphicsDevice"/> is created. Raises the <see cref="DeviceCreated"/> event.
 /// </summary>
 /// <param name="e"></param>
 protected void OnDeviceCreated(EventArgs e)
 {
     EventHelpers.Raise(this, DeviceCreated, e);
 }
 // FIXME: Why does the GraphicsDeviceManager not know enough about the
 //        GraphicsDevice to raise these events without help?
 internal void OnDeviceDisposing(EventArgs e)
 {
     EventHelpers.Raise(this, DeviceDisposing, e);
 }
Beispiel #12
0
 protected virtual void OnEnabledChanged(object sender, EventArgs args)
 {
     EventHelpers.Raise(this, EnabledChanged, args);
 }
Beispiel #13
0
 protected void OnFileDropped(FileDropEventArgs e)
 {
     EventHelpers.Raise(this, FileDropped, e);
 }
Beispiel #14
0
 /// <summary>
 /// Raises the AsyncRunLoopEnded event.  This method must be called by
 /// derived classes when the asynchronous run loop they start has
 /// stopped running.
 /// </summary>
 protected void RaiseAsyncRunLoopEnded()
 {
     EventHelpers.Raise(this, AsyncRunLoopEnded, EventArgs.Empty);
 }
Beispiel #15
0
 private void OnInputCanceled(EventArgs e)
 {
     EventHelpers.Raise(this, InputCanceled, e);
 }
Beispiel #16
0
 protected virtual void OnClientSizeChanged(EventArgs e)
 {
     EventHelpers.Raise(this, ClientSizeChanged, e);
 }
 protected virtual void OnVisibleChanged(object sender, EventArgs args)
 {
     EventHelpers.Raise(this, VisibleChanged, args);
 }
 /// <summary>
 /// Called when a <see cref="GraphicsDevice"/> is disposed. Raises the <see cref="DeviceDisposing"/> event.
 /// </summary>
 /// <param name="e"></param>
 protected void OnDeviceDisposing(EventArgs e)
 {
     EventHelpers.Raise(this, DeviceDisposing, e);
 }
 protected virtual void OnDrawOrderChanged(object sender, EventArgs args)
 {
     EventHelpers.Raise(this, DrawOrderChanged, args);
 }
 /// <summary>
 /// Called after a <see cref="Graphics.GraphicsDevice"/> is reset.
 /// Raises the <see cref="DeviceReset"/> event.
 /// </summary>
 /// <param name="e"></param>
 protected void OnDeviceReset(EventArgs e)
 {
     EventHelpers.Raise(this, DeviceReset, e);
 }
 // FIXME: Why does the GraphicsDeviceManager not know enough about the
 //        GraphicsDevice to raise these events without help?
 internal void OnDeviceReset(EventArgs e)
 {
     EventHelpers.Raise(this, DeviceReset, e);
 }
Beispiel #22
0
 internal void OnClientSizeChanged()
 {
     EventHelpers.Raise(this, ClientSizeChanged, EventArgs.Empty);
 }
Beispiel #23
0
 protected virtual void OnExiting(object sender, EventArgs args)
 {
     EventHelpers.Raise(sender, Exiting, args);
 }
Beispiel #24
0
 protected void OnScreenDeviceNameChanged()
 {
     EventHelpers.Raise(this, ScreenDeviceNameChanged, EventArgs.Empty);
 }
Beispiel #25
0
 public void Dispose()
 {
     Dispose(true);
     GC.SuppressFinalize(this);
     EventHelpers.Raise(this, Disposed, EventArgs.Empty);
 }
 public override void DidRotate(UIInterfaceOrientation fromInterfaceOrientation)
 {
     base.DidRotate(fromInterfaceOrientation);
     EventHelpers.Raise(this, InterfaceOrientationChanged, EventArgs.Empty);
 }
Beispiel #27
0
 protected void OnOrientationChanged()
 {
     EventHelpers.Raise(this, OrientationChanged, EventArgs.Empty);
 }
 private void DisposeGraphicsDevice()
 {
     _graphicsDevice.Dispose();
     EventHelpers.Raise(this, DeviceDisposing, EventArgs.Empty);
     _graphicsDevice = null;
 }
Beispiel #29
0
 protected void OnTextInput(object sender, TextInputEventArgs e)
 {
     EventHelpers.Raise(this, TextInput, e);
 }
Beispiel #30
0
 /// <summary>
 /// Called when the window receives text input. Raises the <see cref="TextInput"/> event.
 /// </summary>
 /// <param name="sender">The game window.</param>
 /// <param name="e">Parameters to the <see cref="TextInput"/> event.</param>
 internal void OnTextInput(TextInputEventArgs e)
 {
     EventHelpers.Raise(this, TextInput, e);
 }