private void updateDropDownMenu(List <string> _lcs)
        {
            _loadDrop.VisibleItemCount = Math.Min(10, _lcs.Count); // Maximum visible items = 10
            int value = 0;

            if (_lcs.Count == _loadDrop.Items.Count)
            {
                value = _loadDrop.Value;
            }
            _loadDrop.Clear();
            if (_lcs.Count > 0)
            {
                for (int i = 0; i < _lcs.Count; i++)
                {
                    _loadDrop.AddItem(_lcs[i], _lcs[i]);
                }
                if (_loadDrop.Items.Count > value)
                {
                    _loadDrop.Value = value;
                }
            }
        }
 private void updateDropDownMenu2(List <ResultsValueType> resulttypes, ref int result_type)
 {
     _resulttypeDrop.VisibleItemCount = Math.Min(10, resulttypes.Count); // Maximum visible items = 10
     //int value = 0;
     //if (_results.Count == _resulttypeDrop.Items.Count)
     //{
     //    value = _resulttypeDrop.Value;
     //}
     _resulttypeDrop.Clear();
     if (resulttypes.Count > 0)
     {
         for (int i = 0; i < resulttypes.Count; i++)
         {
             _resulttypeDrop.AddItem(((int)resulttypes[i]).ToString(), resulttypes[i].ToString());
         }
         //if (_resulttypeDrop.Items.Count > value)
         //{
         //    _resulttypeDrop.Value = value;
         //}
         _resulttypeDrop.Value = _resultDropLastValue;
         result_type           = Int32.Parse(_resulttypeDrop.Items[_resulttypeDrop.Value].name);
     }
 }
 private void updateDropDownMenu(List <string> _lcs)
 {
     _loadDrop.VisibleItemCount = Math.Min(10, _lcs.Count); // Maximum visible items = 10
     // Save menu value if runing analysis again
     //int value = 0;
     //if (_lcs.Count == _loadDrop.Items.Count)
     //{
     //    value = _loadDrop.Value;
     //}
     _loadDrop.Clear();
     if (_lcs.Count > 0)
     {
         for (int i = 0; i < _lcs.Count; i++)
         {
             _loadDrop.AddItem(_lcs[i], _lcs[i]);
         }
         //if (_loadDrop.Items.Count > value)
         //{
         //    _loadDrop.Value = value;
         //}
     }
     _loadDrop.Value = _loadDropLastValue;
 }