Example #1
0
        private void lvwMapMarkers_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (lvwMapMarkers.SelectedItems.Count == 0)
            {
                return;
            }

            ListViewItem selectedItem = lvwMapMarkers.SelectedItems[0];

            StructureMarker selectedMarker = new StructureMarker();

            if (selectedItem.Tag is ArkStructure)
            {
                ArkStructure selectedStructure = (ArkStructure)selectedItem.Tag;
                selectedMarker.Colour = "White";
                selectedMarker.Lat    = (double)selectedStructure.Location?.Latitude.GetValueOrDefault(0);
                selectedMarker.Lon    = (double)selectedStructure.Location?.Longitude.GetValueOrDefault(0);
                selectedMarker.X      = selectedStructure.Location.X;
                selectedMarker.Y      = selectedStructure.Location.Y;
                selectedMarker.Z      = selectedStructure.Location.Z;
            }
            else if (selectedItem.Tag is StructureMarker)
            {
                selectedMarker = (StructureMarker)selectedItem.Tag;
            }


            HighlightStructure?.Invoke(this, selectedMarker);
        }
Example #2
0
 private void frmStructureLocations_FormClosed(object sender, FormClosedEventArgs e)
 {
     HighlightStructure?.Invoke(this, null);
 }