コード例 #1
0
        private void SelectColor(int code)
        {
            ColorDialog dialog = new ColorDialog();

            dialog.Color = TileBox.BackColor;
            if (dialog.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            if (code == 1)
            {
                TileBox.Color1 = dialog.Color;
            }
            else if (code == 2)
            {
                TileBox.Color2 = dialog.Color;
            }
            else if (code == 3)
            {
                TileBox.Color3 = dialog.Color;
            }

            UpdateButtonColors();
            TileBox.Refresh();
            UpdateTilePreview();
        }
コード例 #2
0
        private void MenuBackColor_Click(object sender, EventArgs e)
        {
            ColorDialog dialog = new ColorDialog();

            dialog.Color = TileBox.BackColor;
            if (dialog.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            TileBox.BackColor = dialog.Color;
            TileBox.Refresh();
            UpdateTilePreview();
        }
コード例 #3
0
        private void UpdateTileDisplay()
        {
            int count = Tileset.Count - 1;

            if (count < 0)
            {
                count = 0;
            }

            LblTileIndex.Text = TileIndex.ToString() + " / " + count.ToString();

            if (TileIndex >= 0 && TileIndex < Tileset.Count)
            {
                TileBox.Tile = Tileset[TileIndex];
                TileBox.Refresh();
                UpdateTilePreview();
            }
        }
コード例 #4
0
 private void BtnShiftDown_Click(object sender, EventArgs e)
 {
     TileBox.Tile.ShiftY(1);
     TileBox.Refresh();
     UpdateTilePreview();
 }
コード例 #5
0
 private void BtnFlipY_Click(object sender, EventArgs e)
 {
     TileBox.Tile.FlipY();
     TileBox.Refresh();
     UpdateTilePreview();
 }
コード例 #6
0
 private void BtnRotate_Click(object sender, EventArgs e)
 {
     TileBox.Tile.Rotate();
     TileBox.Refresh();
     UpdateTilePreview();
 }
コード例 #7
0
 private void BtnSwap_Click(object sender, EventArgs e)
 {
     TileBox.Tile.Swap();
     TileBox.Refresh();
     UpdateTilePreview();
 }
コード例 #8
0
 private void BtnFill_Click(object sender, EventArgs e)
 {
     TileBox.Tile.Fill(TileBox.ColorCode);
     TileBox.Refresh();
     UpdateTilePreview();
 }
コード例 #9
0
 private void BtnClear_Click(object sender, EventArgs e)
 {
     TileBox.Tile.Clear();
     TileBox.Refresh();
     UpdateTilePreview();
 }
コード例 #10
0
 private void MenuShowColorIndexes_Click(object sender, EventArgs e)
 {
     TileBox.ShowCodes = MenuShowColorIndexes.Checked;
     TileBox.Refresh();
     UpdateTilePreview();
 }
コード例 #11
0
 private void MenuShowGrid_Click(object sender, EventArgs e)
 {
     TileBox.ShowGrid = MenuShowGrid.Checked;
     TileBox.Refresh();
     UpdateTilePreview();
 }