Пример #1
0
        protected void OnTextInput(TextInputEventArgs e)
        {
            if (e == null)
            {
                throw new ArgumentNullException("e");
            }

            EventHelpers.Raise(this, TextInput, e);
        }
Пример #2
0
        protected override void OnPause()
        {
            base.OnPause();
            EventHelpers.Raise(this, Paused, EventArgs.Empty);

            if (_orientationListener.CanDetectOrientation())
            {
                _orientationListener.Disable();
            }
        }
Пример #3
0
 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);
     }
 }
Пример #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();
                }
            }
        }
Пример #5
0
 private void OnComponentRemoved(GameComponentCollectionEventArgs eventArgs)
 {
     EventHelpers.Raise(this, ComponentRemoved, eventArgs);
 }
Пример #6
0
 internal void OnKeyUp(InputKeyEventArgs e)
 {
     EventHelpers.Raise(this, KeyUp, e);
 }
Пример #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);
 }
Пример #9
0
 protected virtual void OnDeactivated(object sender, EventArgs args)
 {
     AssertNotDisposed();
     EventHelpers.Raise(sender, Deactivated, args);
 }
Пример #10
0
 /// <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);
 }
Пример #12
0
 protected virtual void OnEnabledChanged(object sender, EventArgs args)
 {
     EventHelpers.Raise(this, EnabledChanged, args);
 }
Пример #13
0
 protected void OnFileDropped(FileDropEventArgs e)
 {
     EventHelpers.Raise(this, FileDropped, e);
 }
Пример #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);
 }
Пример #15
0
 private void OnInputCanceled(EventArgs e)
 {
     EventHelpers.Raise(this, InputCanceled, e);
 }
Пример #16
0
 protected virtual void OnClientSizeChanged(EventArgs e)
 {
     EventHelpers.Raise(this, ClientSizeChanged, e);
 }
Пример #17
0
 protected virtual void OnVisibleChanged(object sender, EventArgs args)
 {
     EventHelpers.Raise(this, VisibleChanged, args);
 }
Пример #18
0
 /// <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);
 }
Пример #19
0
 protected virtual void OnDrawOrderChanged(object sender, EventArgs args)
 {
     EventHelpers.Raise(this, DrawOrderChanged, args);
 }
Пример #20
0
 /// <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);
 }
Пример #22
0
 internal void OnClientSizeChanged()
 {
     EventHelpers.Raise(this, ClientSizeChanged, EventArgs.Empty);
 }
Пример #23
0
 protected virtual void OnExiting(object sender, EventArgs args)
 {
     EventHelpers.Raise(sender, Exiting, args);
 }
Пример #24
0
 protected void OnScreenDeviceNameChanged()
 {
     EventHelpers.Raise(this, ScreenDeviceNameChanged, EventArgs.Empty);
 }
Пример #25
0
 public void Dispose()
 {
     Dispose(true);
     GC.SuppressFinalize(this);
     EventHelpers.Raise(this, Disposed, EventArgs.Empty);
 }
Пример #26
0
 public override void DidRotate(UIInterfaceOrientation fromInterfaceOrientation)
 {
     base.DidRotate(fromInterfaceOrientation);
     EventHelpers.Raise(this, InterfaceOrientationChanged, EventArgs.Empty);
 }
Пример #27
0
 protected void OnOrientationChanged()
 {
     EventHelpers.Raise(this, OrientationChanged, EventArgs.Empty);
 }
Пример #28
0
 private void DisposeGraphicsDevice()
 {
     _graphicsDevice.Dispose();
     EventHelpers.Raise(this, DeviceDisposing, EventArgs.Empty);
     _graphicsDevice = null;
 }
Пример #29
0
 protected void OnTextInput(object sender, TextInputEventArgs e)
 {
     EventHelpers.Raise(this, TextInput, e);
 }
Пример #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);
 }