현재가를 객체별 함수로 나눔
This commit is contained in:
@@ -155,11 +155,14 @@ namespace upper_limit_crawler
|
||||
{
|
||||
WATCH_ITEM WatchItem = WatchList[strCode];
|
||||
OWN_ITEM OwnItem = m_OwnList.Find(itemFind => itemFind.m_strCode == strCode);
|
||||
if (OwnItem == null)
|
||||
continue;
|
||||
|
||||
int iDisplayCurPrice = 0;
|
||||
if (lvItem.SubItems[chCurPrice.Index].Text.Length > 0)
|
||||
iDisplayCurPrice = int.Parse(Regex.Replace(lvItem.SubItems[chCurPrice.Index].Text, @"\D", ""));
|
||||
|
||||
if (WatchItem.m_iCurPrice != iDisplayCurPrice && iDisplayCurPrice != 0)
|
||||
if (WatchItem.m_iCurPrice != iDisplayCurPrice)
|
||||
{
|
||||
int iCurPrice = WatchItem.m_iCurPrice;
|
||||
int iComp = iCurPrice - (int)OwnItem.m_iUnitBEP; // or OwnItem.m_dConclusionUnitPrice
|
||||
@@ -177,7 +180,7 @@ namespace upper_limit_crawler
|
||||
else
|
||||
lvItem.SubItems[chEvaluationProfit.Index].ForeColor = Color.Blue;
|
||||
lvItem.SubItems[chEvaluationPrice.Index].Text = OwnItem.m_iEvaluationPrice.ToString("###,###,##0");
|
||||
lvItem.SubItems[chProfitRate.Index].Text = OwnItem.m_dProfitRate.ToString("#,##0.00")+"%";
|
||||
lvItem.SubItems[chProfitRate.Index].Text = OwnItem.m_dProfitRate.ToString("#,##0.00%");
|
||||
if (OwnItem.m_dProfitRate > 0)
|
||||
lvItem.SubItems[chProfitRate.Index].ForeColor = Color.Red;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user