private void Display()
        {
            List <MissionState> ml = last_he != null?discoveryform.history.MissionListAccumulator.GetMissionList(last_he.MissionList) : null;

            missionListCurrent.Clear();
            missionListPrevious.Clear();

            if (ml != null)
            {
                DateTime hetime = last_he.EventTimeUTC;

                List <MissionState> mcurrent = MissionListAccumulator.GetAllCurrentMissions(ml, hetime);

                foreach (MissionState ms in mcurrent)
                {
                    missionListCurrent.Add(ms, false);
                }

                missionListCurrent.Finish();

                List <MissionState> mprev = MissionListAccumulator.GetAllExpiredMissions(ml, hetime);

                var previousRows = new List <DataGridViewRow>(mprev.Count);

                foreach (MissionState ms in mprev)
                {
                    missionListPrevious.Add(ms, true);
                }

                missionListPrevious.Finish();
            }
        }
        //EliteDangerousCore.UIEvents.UIOverallStatus status,
        public JToken MakeResponse(int entry, string type)       // entry = -1 means latest
        {
            if (discoveryform.InvokeRequired)
            {
                return((JToken)discoveryform.Invoke(new Func <JToken>(() => MakeResponse(entry, type))));
            }
            else
            {
                JObject response = new JObject();
                response["responsetype"] = type;

                var hl = discoveryform.history;
                if (hl.Count == 0)
                {
                    response["entry"] = -1;
                }
                else
                {
                    if (entry < 0 || entry >= hl.Count)
                    {
                        entry = hl.Count - 1;
                    }

                    response["entry"] = entry;

                    HistoryEntry he = hl[entry];

                    List <MissionState> ml = discoveryform.history.MissionListAccumulator.GetMissionList(he.MissionList);

                    DateTime hetime = he.EventTimeUTC;

                    List <MissionState> mcurrent = MissionListAccumulator.GetAllCurrentMissions(ml, hetime);

                    JArray cur = new JArray();

                    foreach (MissionState ms in mcurrent)
                    {
                        cur.Add(MissionInfo(ms, false));
                    }

                    response["current"] = cur;

                    List <MissionState> mprev = MissionListAccumulator.GetAllExpiredMissions(ml, hetime);

                    JArray prev = new JArray();

                    foreach (MissionState ms in mprev)
                    {
                        prev.Add(MissionInfo(ms, true));
                    }

                    response["previous"] = prev;
                }

                return(response);
            }
        }