예제 #1
0
        private void setTileSizePalTSMI_Click(object sender, EventArgs e)
        {
            SizeDialog tsd = new SizeDialog(PaletteData.TileSize);

            tsd.ShowDialog();
            PaletteData.TileSize = tsd.NewSize;
            this.DataPanel_Paint(this, null);
        }
예제 #2
0
        private void setTileSizeTSMI_Click(object sender, EventArgs e)
        {
            SizeDialog tsd = new SizeDialog(GraphicsData.TileSize);

            tsd.ShowDialog();
            Point p = tsd.NewSize;

            if (((p.X | p.Y) & 1) == 0)
            {
                GraphicsData.TileSize = tsd.NewSize;
                this.DataPanel_Paint(this, null);
            }
            else
            {
                MessageBox.Show("The dimensions of a tile can not be odd", "Invalid Tile Size");
            }
        }
예제 #3
0
        private void setPanelSizeTSMI_Click(object sender, EventArgs e)
        {
            SizeDialog tsd = new SizeDialog(new Point((int)GraphicsData.PanelWidth, (int)GraphicsData.PanelHeight));

            tsd.ShowDialog();
            Point p = tsd.NewSize;

            if (((p.X | p.Y) & 1) == 0)
            {
                GraphicsData.PanelWidth  = (uint)p.X;
                GraphicsData.PanelHeight = (uint)p.Y;
                this.DataPanel_Paint(this, null);
            }
            else
            {
                MessageBox.Show("The dimensions of a tile can not be odd", "Invalid Tile Size");
            }
        }