示例#1
0
文件: MainForm.cs 项目: dekk7/xEngine
        private void OnEditManageTileBrushes(object sender, EventArgs eventArgs)
        {
            TileBrushDialog tileBrushDialog
                = new TileBrushDialog(m_map, m_tileBrushCollection);
            tileBrushDialog.ShowDialog(this);

            UpdateTileBrushDropDown();
            UpdateEditControls();
        }
示例#2
0
文件: MainForm.cs 项目: dekk7/xEngine
        private void OnEditMakeTileBrush(object sender, EventArgs eventArgs)
        {
            Layer layer = m_mapPanel.SelectedLayer;
            if (layer == null)
                return;

            TileSelection tileSelection = m_mapPanel.TileSelection;
            if (tileSelection.IsEmpty())
                return;

            string tileBrushId = m_tileBrushCollection.GenerateId();
            TileBrush newTileBrush = new TileBrush(tileBrushId, layer, tileSelection);

            TileBrushDialog tileBrushDialog
                = new TileBrushDialog(m_map, m_tileBrushCollection, newTileBrush);
            if (tileBrushDialog.ShowDialog(this) == DialogResult.OK)
            {
                UpdateTileBrushDropDown();
                m_mapPanel.TileSelection.Clear();

                OnToolsTileBrush(sender, eventArgs);

                UpdateTileBrushDropDown();
                UpdateEditControls();
            }
        }