Example #1
0
        private void newToolStripMenuItem_Click(object sender, EventArgs e)
        {
            tileSet = Properties.Resources._default;

            tileSetSize = new Size(4, 2);
            tileSize    = new Size(64, 64);
            mapSize     = new Size(5, 5);

            selectedTile = new Point(0, 0);
            map          = new Point[5, 5];

            option = null;

            splitContainer1.Panel1.AutoScrollMinSize = new Size(tileSetSize.Width * tileSize.Width,
                                                                tileSetSize.Height * tileSize.Height);
            splitContainer1.Panel2.AutoScrollMinSize = new Size(mapSize.Width * tileSize.Width,
                                                                mapSize.Width * tileSize.Width);

            graphicsPanel1.Invalidate();
            graphicsPanel2.Invalidate();
        }
Example #2
0
        private void attributesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (option == null)
            {
                option = new ToolWindow();

                option.NumericUpDownMapHeight      = mapSize.Height;
                option.NumericUpDownMapWidth       = mapSize.Width;
                option.NumericUpDownTileSetHeight  = tileSetSize.Height;
                option.NumericUpDownTileSetWidth   = tileSetSize.Width;
                option.NumericUpDownTileSizeHeight = tileSize.Height;
                option.NumericUpDownTileSizeWidth  = tileSize.Width;

                option.FormClosed  += new FormClosedEventHandler(option_FormClosed);
                option.optionApply += new ToolWindow.ApplyEventHandler(option_optionApply);
                option.optionOK    += new ToolWindow.ApplyEventHandler(option_optionOK);

                if (DialogResult.OK == option.ShowDialog())
                {
                }
            }
        }
Example #3
0
 void option_FormClosed(object sender, FormClosedEventArgs e)
 {
     option = null;
 }