private void UpdateComboBox(HistoryList hl)
        {
            ShipYardList shm    = hl.Shipyards;
            string       cursel = comboBoxYards.Text;

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

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

            comboBoxYards.Items.AddRange(shm.ShipList());

            var list = (from ShipYard x in shm.GetFilteredList() select x.Ident()).ToList();        // yard list repeats allowed within timescale

            comboBoxYards.Items.AddRange(list);

            if (cursel == "")
            {
                cursel = GetSetting(dbYardSave, "");
            }

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

            comboBoxYards.Enabled      = false;
            comboBoxYards.SelectedItem = cursel;
            comboBoxYards.Enabled      = true;
        }
예제 #2
0
        private void UpdateComboBox(HistoryList hl)
        {
            ShipYardList shm    = hl.shipyards;
            string       cursel = comboBoxYards.Text;

            string the = "Travel History Entry".Tx(this);

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

            comboBoxYards.Items.AddRange(shm.ShipList());

            var list = (from ShipYard x in shm.GetFilteredList() select x.Ident(EDDiscoveryForm.EDDConfig.DisplayUTC)).ToList();        // yard list repeats allowed within timescale

            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;
        }