Windows/BombDropperWindow.xaml.cs
(开头部分) 7KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using MahAppsMetro.Demo.Views;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows.Threading;
namespace MahAppsMetro.Demo.Windows
{
/// <summary>
/// BombDropperWindow.xaml 的互動邏輯
/// </summary>
public partial class BombDropperWindow : Window
{
DispatcherTimer bombTimer = new DispatcherTimer();
Dictionary<Bomb, Storyboard> storyboards = new Dictionary<Bomb, Storyboard>();
public BombDropperWindow()
{
InitializeComponent();
bombTimer.Tick += BombTimer_Tick;
}
private void canvasBackground_SizeChanged(object sender, SizeChangedEventArgs e)
{
RectangleGeometry rect = new RectangleGeometry();
rect.Rect = new Rect(0, 0, canvasBackground.ActualWidth, canvasBackground.ActualHeight);
canvasBackground.Clip = rect;
}
int droppedCount = 0;
int savedCount = 0;
double initialSecondsBetweenBombs = 1.3;
double initialSecondsToFall = 3.5;
double SecondsBetweenBombs;
double secondsToFall;
private void cmdStart_Click(object sender, RoutedEventArgs e)
{
cmdStart.IsEnabled = false;
//reset game
droppedCount = 0;
savedCount = 0;
SecondsBetweenBombs = initialSecondsBetweenBombs;
secondsToFall = initialSecondsToFall;
//start the bomb-dropping game
bombTimer.Interval = TimeSpan.FromSeconds(SecondsBetweenBombs);
bombTimer.Start();
}
后面还有 144 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。