Exemplo n.º 1
0
        /// <summary>Creates a new Corona surface adapter which wraps the given DrawingSurface Xaml control.</summary>
        public DotNetBackgroundSurfaceAdapter()
        {
            // Initialize member variables.
            fPageAdapter             = new UI.DotNetPageAdapter();
            fDispatcher              = new Corona.WinRT.Phone.Interop.UI.DotNetDispatcher();
            fLastReceivedOrientation = Corona.WinRT.Interop.UI.PageOrientation.Unknown;
            fDirect3DSurfaceAdapter  = new Direct3DSurfaceAdapter(this);

            // Add event handlers.
            fPageAdapter.OrientationChanged += OnOrientationChanged;
        }
Exemplo n.º 2
0
        /// <summary>
        ///  <para>Creates a new input event provider.</para>
        ///  <para>This object will not provide tap, touch, or key events until a UIElement reference has been given to it.</para>
        /// </summary>
        public DotNetInputDeviceServices()
        {
            // Initialize member variables.
            fUIEventSource = null;
            fPageAdapter   = new UI.DotNetPageAdapter();
            fHasAddedFrameReportedEventHandler = false;
            fMultitouchEnabled            = false;
            fReceivedTouchEventTokenTable = null;
            fLastHandledTouchPoints       = new System.Collections.Generic.Dictionary <int, System.Windows.Input.TouchPoint>();

            // Subscribe to the page's back navigation event.
            // Will be convert to a "back" key event that is compatible with Corona.
            fPageAdapter.NavigatingBack += OnPageNavigatingBack;
        }