private void OnNewStars(List <string> obj, OnNewStarsPushType command)    // and if a user asked for stars to be added
 {
     if (command == OnNewStarsPushType.Exploration)
     {
         AddSystems(obj);
     }
 }
예제 #2
0
 private void OnNewStars(List <string> obj, OnNewStarsPushType command)    // and if a user asked for stars to be added
 {
     if (command == OnNewStarsPushType.Expedition)
     {
         AppendRows(obj.ToArray());
     }
 }
예제 #3
0
 private void Discoveryform_OnNewStarsForTrilat(List <string> list, OnNewStarsPushType selection)      // when someone wants to send us sys, they do it via this IF
 {
     foreach (string s in list)
     {
         if (selection == OnNewStarsPushType.TriWanted)
         {
             AddWantedSystem(s);
         }
         else if (selection == OnNewStarsPushType.TriSystems)
         {
             AddSystemToDataGridViewDistances(s, false);
         }
     }
 }
        private void AddTo(OnNewStarsPushType pushtype)
        {
            IEnumerable <DataGridViewRow> selectedRows = dataGridViewNearest.SelectedCells.Cast <DataGridViewCell>()
                                                         .Select(cell => cell.OwningRow)
                                                         .Distinct()
                                                         .OrderBy(cell => cell.Index);

            List <string> syslist = new List <string>();

            foreach (DataGridViewRow r in selectedRows)
            {
                syslist.Add(r.Cells[0].Value.ToString());
            }

            if (uctg is IHistoryCursorNewStarList)
            {
                (uctg as IHistoryCursorNewStarList).FireNewStarList(syslist, pushtype);
            }
        }