Example #1
0
 /// <summary>
 /// Handle click on a bucket button
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void BucketButton_OnClick(object sender, RoutedEventArgs e)
 {
     var current = this.FindName("SelectedEntity") as Label;
     if (current == null)
         return;
     this.currentBucket_ = ((BucketButton) sender).Type;
     current.Content = new AssetImage(this.currentBucket_);
 }
Example #2
0
        public MainWindow()
        {
            InitializeComponent();
            this.currentBucket_ = KeResources.Type.BlockBk;
            var se = this.FindName("SelectedEntity") as Label;
            if (se != null)
                se.Content = new AssetImage(this.currentBucket_);

            CreateBoard(10, 5);
            this.painting_ = false;
            this.cleaning_ = false;
        }