Đang chuẩn bị liên kết để tải về tài liệu:
programming windows phone 7 phần 10

Không đóng trình duyệt đến khi xuất hiện nút TẢI XUỐNG

RenderTarget2D vẫn giữ nguyên trong suốt thời gian của chương trình, bạn thường sẽ thực hiện toàn bộ hoạt động này trong quá trình ghi đè lên LoadContent. Nếu nhu cầu RenderTarget2D thay đổi, bạn cũng có thể vẽ trên bitmap trong ghi đè lên Cập nhật. Bởi vì RenderTarget2D xuất phát từ Texture2D bạn có thể hiển thị | XNA Project Petzold.Phone.Xna File Button.cs excerpt public bool ProcessTouch TouchLocation touch bool touchHandled false bool isInside Destination.Contains int touch.Position.X int touch.Position.Y switch touch.State case TouchLocationState.Pressed if isInside isPressed true touchId touch.Id touchHandled true break case TouchLocationState.Moved if touchId.HasValue touchId.Value touch.Id isPressed isInside touchHandled true break case TouchLocationState.Released if touchId.HasValue touchId.Value touch.Id if isInside Click null Click this EventArgs.Empty touchId null isPressed false touchHandled true break return touchHandled If the finger is released when it is inside the Destination rectangle then Button fires a Click event. The Draw override draws the button which is basically a border consisting of a white rectangle with a somewhat smaller black rectangle on top with the text string XNA Project Petzold.Phone.Xna File Button.cs excerpt public override void Draw GameTime gameTime 903 spriteBatch.Begin if isPressed Draw reverse-video background spriteBatch.Draw tinyTexture Destination Color.White else Draw button border and background Rectangle rect Destination spriteBatch.Draw tinyTexture rect Color.White rect.Inflate -3 -3 spriteBatch.Draw tinyTexture rect Color.Black Draw button text if SpriteFont null String.IsNullOrEmpty Text spriteBatch.DrawString SpriteFont Text textPosition isPressed Color.Black Color.White spriteBatch.End base.Draw gameTime ColorBlock on the other hand is part of the PhingerPaint program and it does not implement the IProcessTouch interface. Here it is in its entirety XNA Project PhingerPaint File ColorBlock.cs complete using System using Microsoft.Xna.Framework using Mi crosoft.Xna.Framework.Graphi cs using Mi crosoft.Xna.Framework.Input.Touch namespace PhingerPaint public class ColorBlock DrawableGameComponent SpriteBatch spriteBatch Texture2D block public ColorBlock Game game base game public Coloi Color set get public Rectangle .

Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.