private void RefreshDefaultPrices()
        {
            if (lstItems.SelectedValue != null)
            {
                cmbStation.Enabled = true;
                txtItemSellPrice.Enabled = true;
                txtDefaultBuyPrice.Enabled = true;
                chkUseReprocessVal.Enabled = true;
                chkForceDefaultBuyPrice.Enabled = true;
                chkForceDefaultSellPrice.Enabled = true;

                int itemID = ((EveDataSet.invTypesRow)(((DataRowView)lstItems.SelectedItem).Row)).typeID;
                currentItem = itemValues.GetItem(itemID, (int)cmbStation.SelectedValue);

                txtItemSellPrice.Text = new IskAmount(currentItem.DefaultSellPrice).ToString();
                txtDefaultBuyPrice.Text = new IskAmount(currentItem.DefaultBuyPrice).ToString();
                lblCalculatedSellPrice.Text = new IskAmount(currentItem.CurrentSellPrice).ToString();
                lblLastUpdated.Text = currentItem.LastSellPriceCalc.ToString();
                // For this setting, get the value from the static class as it must always be for
                // the -1 'Any region' setting.
                chkUseReprocessVal.Checked = itemValues.UseReprocessValGet(itemID);
                chkForceDefaultBuyPrice.Checked = itemValues.ForceDefaultBuyPriceGet(itemID);
                chkForceDefaultSellPrice.Checked = itemValues.ForceDefaultSellPriceGet(itemID);
            }
            else
            {
                cmbStation.Enabled = false;
                txtItemSellPrice.Enabled = false;
                txtDefaultBuyPrice.Enabled = false;
                chkUseReprocessVal.Enabled = false;
                chkForceDefaultBuyPrice.Enabled = false;
                chkForceDefaultSellPrice.Enabled = false;
            }
        }
 /*private void RefreshList()
 {
     if (lstItems.SelectedIndex < 0 && itemsList.Count > 0)
     {
         lstItems.SelectedIndex = 0;
     }
     else if (lstItems.SelectedIndex >= 0 && itemsList.Count > 1)
     {
         lstItems.BeginUpdate();
         lstItems.SelectedIndex = lstItems.SelectedIndex +
             (lstItems.SelectedIndex == itemsList.Count - 1 ? -1 : 1);
         lstItems.SelectedIndex = lstItems.SelectedIndex +
             (lstItems.SelectedIndex == itemsList.Count - 1 ? 1 : -1);
     }
     cmbStation.SelectedValue = -1;
 }*/
 private void btnClear_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Really clear all item value data?", "Confirm",
         MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
     {
         currentItem = null;
         itemsList.Clear();
         itemValues.ClearAllItems();
         //RefreshList();
         RefreshDefaultPrices();
     }
 }
        private void lstItems_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyData == Keys.Delete)
            {
                EveDataSet.invTypesRow item = (EveDataSet.invTypesRow)((DataRowView)lstItems.SelectedItem).Row;

                currentItem = null;
                itemValues.RemoveItem(item.typeID);
                itemsList.RemoveinvTypesRow(itemsList.FindBytypeID(item.typeID));
                //RefreshList();
                RefreshDefaultPrices();
            }
        }