예제 #1
0
        private void LastCellField_OnMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            ScreenshotRegion screener = new ScreenshotRegion(this);

            if (screener.ShowDialog() == true)
            {
                _gamePreset.LastCell = screener.Rectangle;
                UpdatePresetControls();
            }
        }
예제 #2
0
        private void TurnSpriteSelectionCommand_Click(object sender, RoutedEventArgs e)
        {
            ScreenshotRegion screener = new ScreenshotRegion(this);

            if (screener.ShowDialog() == true)
            {
                _gamePreset.TurnSprite = screener.Picture;
                UpdatePresetControls();
            }
        }
예제 #3
0
        private void AddNewXCellSprite_Click(object sender, RoutedEventArgs e)
        {
            ScreenshotRegion screener = new ScreenshotRegion(this);

            if (screener.ShowDialog() == true)
            {
                _gamePreset.XCellSprites.Add(screener.Picture);
                _gamePreset.HasChanges = true;
                UpdatePresetControls();
            }
        }
예제 #4
0
        private void FreeCellSpriteSelectionCommand_Click(object sender, RoutedEventArgs e)
        {
            var image = (Bitmap)((Button)sender).Tag;
            ScreenshotRegion screener = new ScreenshotRegion(this);

            if (screener.ShowDialog() == true)
            {
                var itemIndex = _gamePreset.FreeCellSprites.IndexOf(image);
                _gamePreset.FreeCellSprites.RemoveAt(itemIndex);
                _gamePreset.FreeCellSprites.Insert(itemIndex, screener.Picture);
                _gamePreset.HasChanges = true;
                UpdatePresetControls();
            }
        }