예제 #1
0
        private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            RefreshPropGrid();
            if (listBox1.SelectedItems.Count > 0)
            {
                metaDataTB.Enabled = true;

                _muteEvents     = true;
                metaDataTB.Text = (listBox1.SelectedItems[0] as Area).MetaData;
                _muteEvents     = false;
            }
            else
            {
                metaDataTB.Enabled = false;
            }

            if (SyncSelection && !_muteEvents)
            {
                _muteEvents = true;

                AreaMapComponent.DeselectAll();
                foreach (Area area in listBox1.SelectedItems)
                {
                    AreaMapComponent.AddToSelection(area);
                }

                _muteEvents = false;
            }
        }
예제 #2
0
        public void SetSelection(List <string> inSelectionList)
        {
            _areaMapComponent.DeselectAll(false);
            List <Area> areas = new List <Area>();

            foreach (string item in inSelectionList)
            {
                Area found = AreaMapComponent.FindArea(item);
                if (found != null)
                {
                    areas.Add(found);
                }
            }

            if (areas.Count > 0)
            {
                _areaMapComponent.AddToSelection(areas, false);
            }

            _areaMapComponent.Invalidate();
        }