Esempio n. 1
0
        /// <summary>
        /// Updates the extents of the map element taking into account its size of screen and scale.
        /// </summary>
        private void UpdateMapElement(LayoutControl layoutControl, IEnvelope extents)
        {
            var map = layoutControl.GetMainMap();

            if (map != null)
            {
                map.Envelope    = extents;
                map.Initialized = true;

                layoutControl.ClearSelection();
                layoutControl.AddToSelection(map);
            }
        }
Esempio n. 2
0
        private void OnListBoxSelectedIndexChanged(object sender, EventArgs e)
        {
            if (_suppressSelectionChange)
            {
                return;
            }

            _suppressSelectionChange = true;

            _layoutControl.SuspendLayout();
            _layoutControl.ClearSelection();
            _layoutControl.AddToSelection(new List <LayoutElement>(_listbox.SelectedItems.OfType <LayoutElement>()));
            _layoutControl.ResumeLayout();

            _suppressSelectionChange = false;
        }