Beispiel #1
0
        private void UpdateComboBox(HistoryList hl)
        {
            OutfittingList ofl    = hl.outfitting;
            string         cursel = comboBoxYards.Text;

            string the = "Travel History Entry".T(EDTx.UserControlOutfitting_TravelHistoryEntry);

            comboBoxYards.Items.Clear();
            comboBoxYards.Items.Add(the);

            comboBoxYards.Items.AddRange(ShipModuleData.Instance.GetAllModTypes());

            var list = (from x in ofl.GetFilteredList() select x.Ident(EDDiscoveryForm.EDDConfig.DisplayUTC)).ToList();

            comboBoxYards.Items.AddRange(list);

            if (cursel == "")
            {
                cursel = SQLiteDBClass.GetSettingString(DbYardSave, "");
            }

            if (cursel == "" || !comboBoxYards.Items.Contains(cursel))
            {
                cursel = the;
            }

            comboBoxYards.Enabled      = false;
            comboBoxYards.SelectedItem = cursel;
            comboBoxYards.Enabled      = true;
        }
        private void Reset(bool full = true)
        {
            currenthe              = null;
            outfitting             = new OutfittingList();
            shipinformationlist    = new ShipInformationList();
            matlist                = new MaterialCommoditiesList();
            missionlistaccumulator = new MissionListAccumulator(); // and mission list..
            cashledger             = new Ledger();

            if (full)
            {
                lastutc       = DateTime.Now.AddYears(-100);
                currentcmdrnr = -1;
            }
        }