Exemplo n.º 1
0
        private void FillGrid()
        {
            ZipCodes.RefreshCache();
            _listZipCodes = ZipCodes.GetDeepCopy();
            gridZipCode.BeginUpdate();
            gridZipCode.ListGridColumns.Clear();
            GridColumn col;

            col = new GridColumn(Lan.g(this, "ZipCode"), 75);
            gridZipCode.ListGridColumns.Add(col);
            col = new GridColumn(Lan.g(this, "City"), 270);
            gridZipCode.ListGridColumns.Add(col);
            col = new GridColumn(Lan.g(this, "State"), 50);
            gridZipCode.ListGridColumns.Add(col);
            col = new GridColumn(Lan.g(this, "Frequent"), 80);
            gridZipCode.ListGridColumns.Add(col);
            gridZipCode.ListGridRows.Clear();
            GridRow row;

            foreach (ZipCode zip in _listZipCodes)
            {
                row = new GridRow();
                row.Cells.Add(zip.ZipCodeDigits);
                row.Cells.Add(zip.City);
                row.Cells.Add(zip.State);
                row.Cells.Add((zip.IsFrequent ? "X" : ""));
                row.Tag = zip;
                gridZipCode.ListGridRows.Add(row);
            }
            gridZipCode.EndUpdate();
        }
Exemplo n.º 2
0
 private void FillComboZip()
 {
     comboZip.Items.Clear();
     _listZipCodes = ZipCodes.GetDeepCopy(true);
     for (int i = 0; i < _listZipCodes.Count; i++)
     {
         comboZip.Items.Add((_listZipCodes[i]).ZipCodeDigits
                            + " (" + (_listZipCodes[i]).City + ")");
     }
 }
Exemplo n.º 3
0
        private void FillList()
        {
            //refreshing is done within each routine
            listMatches.Items.Clear();
            string itemText = "";

            _listZipCodes = ZipCodes.GetDeepCopy();
            for (int i = 0; i < _listZipCodes.Count; i++)
            {
                itemText = (_listZipCodes[i]).City + " "
                           + (_listZipCodes[i]).State;
                if ((_listZipCodes[i]).IsFrequent)
                {
                    itemText += Lan.g(this, " (freq)");
                }
                listMatches.Items.Add(itemText);
            }
            listMatches.SelectedIndex = -1;
        }
Exemplo n.º 4
0
        private void FillList()
        {
            //refreshing is done within each routine
            listMatches.Items.Clear();
            string itemText = "";

            _listZipCodes = ZipCodes.GetDeepCopy();
            if (!string.IsNullOrWhiteSpace(_zipCodeDigits))
            {
                _listZipCodes.RemoveAll(x => x.ZipCodeDigits != _zipCodeDigits);
            }
            for (int i = 0; i < _listZipCodes.Count; i++)
            {
                itemText = (_listZipCodes[i]).City + " "
                           + (_listZipCodes[i]).State;
                if ((_listZipCodes[i]).IsFrequent)
                {
                    itemText += Lan.g(this, " (freq)");
                }
                listMatches.Items.Add(itemText);
            }
            listMatches.SelectedIndex = -1;
        }