Example #1
0
        /// <summary>
        /// Handles the Click event of the ControlSettings control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        void ControlSettings_Click(object sender, EventArgs e)
        {
            var tb = ToolBar.GetToolBar(ToolBarVisibility.Map);

            if (tb == null)
            {
                return;
            }

            var map = tb.DisplayObject as EditorMap;

            if (map == null)
            {
                return;
            }

            // Display BG properties
            if (_form == null || _form.IsDisposed)
            {
                _form = new MapEditNPCSpawnsToolForm();
            }

            _form.Map = map;
            _form.Show(MainForm.DockPanel, WeifenLuo.WinFormsUI.Docking.DockState.Float);
        }
        /// <summary>
        /// Handles the Click event of the ControlSettings control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        void ControlSettings_Click(object sender, EventArgs e)
        {
            var tb = ToolBar.GetToolBar(ToolBarVisibility.Map);
            if (tb == null)
                return;

            var map = tb.DisplayObject as EditorMap;
            if (map == null)
                return;

            // Display BG properties
            if (_form == null || _form.IsDisposed)
                _form = new MapEditNPCSpawnsToolForm();

            _form.Map = map;
            _form.Show();
        }