/// <summary>
        /// This gets all the labels, if the flag is false it removes the ones which are verified
        /// </summary>
        /// <param name="all"></param>
        /// <param name="client"></param>
        /// <returns></returns>
        public static List <GenericLabelForWorldMap> GetListFromDateSelection(bool all, HistoryMapWebClient client)
        {
            var        result          = client.GetButtons().GetAwaiter().GetResult();
            List <int> indexesToRemove = new List <int>();

            if (!all)
            {
                foreach (var button in result)
                {
                    if (button.verified)
                    {
                        indexesToRemove.Add(result.IndexOf(button));
                    }
                }
                int i = 0;
                foreach (var index in indexesToRemove)
                {
                    result.RemoveAt(index - i);
                    i++;
                }
            }


            return(result);
        }
        /// <summary>
        /// This gets the list of buttons and filters them
        /// </summary>
        /// <param name="startDate">The staring date we want to filter from</param>
        /// <param name="endDate">the end date we want to filter from</param>
        /// <returns>an array of genericlabelforworldmap forms</returns>
        public static List <GenericLabelForWorldMap> GetListFromDateSelection(LocalDate startDate, LocalDate endDate)
        {
            if (_client == null)
            {
                _client = new HistoryMapWebClient("defaultUser", "ry3kGKijkF12Abwxczm1");
            }
            var result = _client.GetButtons(startDate, endDate).GetAwaiter().GetResult();
            var list   = new List <GenericLabelForWorldMap>();

            foreach (var item in result)
            {
                if (item.verified)
                {
                    list.Add(item);
                }
            }
            return(list);
        }