コード例 #1
0
        /// <summary>
        /// Shows the properties for a map.
        /// </summary>
        /// <param name="map">The map to show the properties for.</param>
        public void ShowMapProperties(EditorMap map)
        {
            // Create new form instance if needed
            if (_currentPropertiesForm == null || _currentPropertiesForm.Disposing || _currentPropertiesForm.IsDisposed)
            {
                _currentPropertiesForm = new MapPropertiesToolForm();
            }

            // If not already visible, show it
            if (!_currentPropertiesForm.Visible)
            {
                if (DockPanel == null)
                {
                    _currentPropertiesForm.Show();
                }
                else
                {
                    _currentPropertiesForm.Show(DockPanel);
                }
            }

            // Set the map
            _currentPropertiesForm.Map = map;
        }
コード例 #2
0
ファイル: MapPropertiesTool.cs プロジェクト: Vizzini/netgore
        /// <summary>
        /// Shows the properties for a map.
        /// </summary>
        /// <param name="map">The map to show the properties for.</param>
        public void ShowMapProperties(EditorMap map)
        {
            // Create new form instance if needed
            if (_currentPropertiesForm == null || _currentPropertiesForm.Disposing || _currentPropertiesForm.IsDisposed)
                _currentPropertiesForm = new MapPropertiesToolForm();

            // If not already visible, show it
            if (!_currentPropertiesForm.Visible)
            {
                if (DockPanel == null)
                    _currentPropertiesForm.Show();
                else
                    _currentPropertiesForm.Show(DockPanel);
            }

            // Set the map
            _currentPropertiesForm.Map = map;
        }