コード例 #1
0
 private void ClearExistingEditor()
 {
     if (_mapEditor != null)
     {
         if (MessageBox.Show(Strings.ConfirmNewMap, Strings.CaptionNewMap, MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes)
         {
             DoSave();
         }
         rootPanel.Controls.Remove(_mapEditor);
         _mapEditor = null;
     }
 }
コード例 #2
0
        private void LoadMapDefinitionForEditing(IMapDefinition mdf)
        {
            CleanupExistingMap();

            if (mdf.BaseMap != null)
            {
                if (mdf.BaseMap.GroupCount > 0)
                {
                    MessageBox.Show(Strings.TiledMapNote, Strings.TitleTiledMap);
                }
            }

            _mapEditor = new LiveMapDefinitionEditorCtrl();
            _mapEditor.Bind(new ResourceEditorService(mdf.ResourceID, _conn));
            _bComputeLayerCsAndExtentOnFirstLayerAdded = _mapEditor.EditorService.IsNew;
            _mapEditor.Map.LayerAdded += OnMapLayerAdded;
            _mapEditor.Dock            = DockStyle.Fill;
            rootPanel.Controls.Add(_mapEditor);
        }