TAILIEUCHUNG - Pro WPF in C# 2010 phần 6

Tìm kiếm cho mình một tài liệu tiếng Anh - Thông thường những tài liệu tiếng Anh thường viết rất chi tiết, và có cả phần nâng cao Nhưng không phải ai cũng có thể đọc và hiểu tốt tiếng anh. Do đó mà tôi khuyên bạn nên đọc tài liệu tiếng Việt trước. Một tài liệu tiếng Anh hay sẽ giúp bạn nâng cao kỹ năng của mình kể cả tiếng anh lẫn lập trình. | CHAPTER 16 ADVANCED ANIMATION private void cmdStart_Click object sender RoutedEventArgs e false Reset the game. droppedCount 0 savedCount 0 secondsBetweenBombs initialSecondsBetweenBombs secondsToFall initialSecondsToFall Start the bomb-dropping timer. secondsBetweenBombs Every time the timer fires the code creates a new Bomb object and sets its position on the Canvas. The bomb is placed just above the top edge of the Canvas so it can fall seamlessly into view. It s given a random horizontal position that falls somewhere between the left and right sides private void bombTimer_Tick object sender EventArgs e Create the bomb. Bomb bomb new Bomb true Position the bomb. Random random new Random double 0 int - 50 Add the bomb to the Canvas. bomb . The code then dynamically creates a storyboard to animate the bomb. Two animations are used one that drops the bomb by changing the attached property and one that wiggles the bomb by changing the angle of its rotate transform. Because and are attached properties you must set them using the and methods . Attach mouse click event for defusing the bomb . bomb_MouseLeftButtonDown Create the animation for the falling bomb. Storyboard storyboard new Storyboard DoubleAnimation fallAnimation new DoubleAnimation secondsToFall fallAnimation bomb 492 CHAPTER 16 ADVANCED ANIMATION fallAnimation new PropertyPath fallAnimation Create the animation for the bomb wiggle. DoubleAnimation .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.