Beispiel #1
0
        private void OnMapProperties(object sender, EventArgs eventArgs)
        {
            MapPropertiesDialog mapPropertiesDialog = new MapPropertiesDialog(m_map, false);

            if (mapPropertiesDialog.ShowDialog(this) == DialogResult.OK)
            {
                m_needsSaving = true;
                UpdateFileControls();
                UpdateEditControls();
                m_mapTreeView.UpdateTree();
            }
        }
Beispiel #2
0
        private void OnFileNew(object sender, EventArgs eventArgs)
        {
            if (!HandleUnsavedChanges(sender, eventArgs))
                return;

            Map map = new Map("Untitled Map");

            MapPropertiesDialog mapPropertiesDialog = new MapPropertiesDialog(map, true);

            if (mapPropertiesDialog.ShowDialog(this) == DialogResult.OK)
            {
                m_map = map;
                m_mapTreeView.Map = m_map;
                m_mapTreeView.UpdateTree();
                m_tilePicker.Map = map;
                m_mapPanel.Map = map;

                m_needsFilename = true;
                m_needsSaving = true;

                m_commandHistory.Clear();
                m_selectedComponent = null;

                // refresh tile brush definitions
                m_tileBrushCollection.LoadFromMap(m_map);

                // refresh auto tile definitions
                AutoTileManager.Instance.Refresh(m_map);

                UpdateAllControls();
            }
        }