示例#1
0
 public Input(DisposableI parent, XAMLApplication application)
     : base(parent)
 {
     this.applicationI = application;
     this.pageApplication = application;
     application.HandleEvent += updateEvent;
 }
示例#2
0
        public CoreMetroWindow(ApplicationI application, CoreWindow window, ApplicationEvent theEvent, bool coreApp)
        {
            this.window      = window;
            this.application = application;
            this.theEvent    = theEvent;
            this.coreApp     = coreApp;

            window.SizeChanged += sizeChanged;

            window.PointerCursor        = new CoreCursor(CoreCursorType.Arrow, 0);
            window.PointerMoved        += pointerMoved;
            window.PointerPressed      += pointerPressed;
            window.PointerReleased     += pointerReleased;
            window.PointerWheelChanged += pointerWheelChanged;
            window.KeyDown             += keyDown;
            window.KeyUp += keyUp;
        }
示例#3
0
		public CoreMetroWindow(ApplicationI application, CoreWindow window, ApplicationEvent theEvent, bool coreApp)
		{
			this.window = window;
			this.application = application;
			this.theEvent = theEvent;
			this.coreApp = coreApp;

			window.SizeChanged += sizeChanged;
			
			window.PointerCursor = new CoreCursor(CoreCursorType.Arrow, 0);
			window.PointerMoved += pointerMoved;
			window.PointerPressed += pointerPressed;
			window.PointerReleased += pointerReleased;
			window.PointerWheelChanged += pointerWheelChanged;
			window.KeyDown += keyDown;
			window.KeyUp += keyUp;
		}
示例#4
0
        public Video(DisposableI parent, ApplicationI application, DepthStencilFormats depthStencilFormats, bool vSync)
            : base(parent)
        {
            try
            {
                this.application     = application;
                FileTag              = "Vita_";
                currentPixelTextures = new Texture2D[4];
                currentSamplerStates = new SamplerState[4];

                PixelFormat format = PixelFormat.None;
                switch (depthStencilFormats)
                {
                case DepthStencilFormats.None: format = PixelFormat.None; break;

                case DepthStencilFormats.Defualt: format = PixelFormat.Depth16; break;

                case DepthStencilFormats.Depth24Stencil8: format = PixelFormat.Depth24Stencil8; break;

                case DepthStencilFormats.Depth16: format = PixelFormat.Depth16; break;

                case DepthStencilFormats.Depth24: format = PixelFormat.Depth24; break;

                default:
                    Debug.ThrowError("Video", "Unsuported DepthStencilFormat type");
                    break;
                }

                context            = new GraphicsContext(0, 0, PixelFormat.Rgba, format, MultiSampleMode.None);
                currentFrameBuffer = context.Screen;
                BackBufferSize     = new Size2(currentFrameBuffer.Width, currentFrameBuffer.Height);
                ((VitaApplication)application).Vita_SetFrameSize(currentFrameBuffer.Width, currentFrameBuffer.Height);

                currentEnableMode = EnableMode.None;
                context.Enable(currentEnableMode);
            }
            catch (Exception e)
            {
                Dispose();
                throw e;
            }
        }
示例#5
0
        public Video(DisposableI parent, ApplicationI application, DepthStencilFormats depthStencilFormats, bool vSync)
            : base(parent)
        {
            if (depthStencilFormats != DepthStencilFormats.Defualt)
            {
                Debug.ThrowError("Video", "Only a Defualt DepthStenicFormat may be used in XNA here");
            }

            this.application = application;
            Device           = application.GraphicsDevice;
            defualtStates();

                        #if SILVERLIGHT
            FileTag = "Silverlight_";
                        #else
            FileTag = "XNA_";
                        #endif
            BackBufferSize = application.FrameSize;

            backBuffers = Device.GetRenderTargets();
        }
示例#6
0
        public Video(DisposableI parent, ApplicationI application, DepthStencilFormats depthStencilFormats, bool vSync)
            : base(parent)
        {
            try
            {
                this.application = application;
                FileTag = "Vita_";
                currentPixelTextures = new Texture2D[4];
                currentSamplerStates = new SamplerState[4];

                PixelFormat format = PixelFormat.None;
                switch (depthStencilFormats)
                {
                    case DepthStencilFormats.None: format = PixelFormat.None; break;
                    case DepthStencilFormats.Defualt: format = PixelFormat.Depth16; break;
                    case DepthStencilFormats.Depth24Stencil8: format = PixelFormat.Depth24Stencil8; break;
                    case DepthStencilFormats.Depth16: format = PixelFormat.Depth16; break;
                    case DepthStencilFormats.Depth24: format = PixelFormat.Depth24; break;

                    default:
                        Debug.ThrowError("Video", "Unsuported DepthStencilFormat type");
                        break;
                }

                context = new GraphicsContext(0, 0, PixelFormat.Rgba, format, MultiSampleMode.None);
                currentFrameBuffer = context.Screen;
                BackBufferSize = new Size2(currentFrameBuffer.Width, currentFrameBuffer.Height);
                ((VitaApplication)application).Vita_SetFrameSize(currentFrameBuffer.Width, currentFrameBuffer.Height);

                currentEnableMode = EnableMode.None;
                context.Enable(currentEnableMode);
            }
            catch (Exception e)
            {
                Dispose();
                throw e;
            }
        }
示例#7
0
 public Input(DisposableI parent, ApplicationI window)
     : base(parent)
 {
     this.application    = window;
     window.HandleEvent += updateEvent;
 }
示例#8
0
 public Input(DisposableI parent, ApplicationI application)
     : base(parent)
 {
     this.application = application;
 }
示例#9
0
 public Input(DisposableI parent, ApplicationI application)
     : base(parent)
 {
     this.application = application;
     application.HandleEvent += updateEvent;
 }
示例#10
0
 public Input(DisposableI parent, ApplicationI application)
     : base(parent)
 {
     this.application         = application;
     application.HandleEvent += updateEvent;
 }
示例#11
0
 public Input(DisposableI parent, ApplicationI application)
     : base(parent)
 {
     this.application = application;
 }
示例#12
0
 public Input(DisposableI parent, ApplicationI window)
     : base(parent)
 {
     this.application = window;
     window.HandleEvent += updateEvent;
 }