- 매수하지 않아도 중복 종목에 추가
This commit is contained in:
@@ -126,8 +126,13 @@ namespace NewsCrawler
|
||||
public void AddDuplicatedList(string strCode, string strName)
|
||||
{
|
||||
CODE_VALUE Result = m_CodeList.Find(s => s.m_strCode == strCode);
|
||||
if(Result != null)
|
||||
Result.m_enType |= CODE_TYPE.DUPLICATED;
|
||||
if(Result == null)
|
||||
return;
|
||||
|
||||
if((Result.m_enType & CODE_TYPE.DUPLICATED) == CODE_TYPE.DUPLICATED)
|
||||
return;
|
||||
|
||||
Result.m_enType |= CODE_TYPE.DUPLICATED;
|
||||
|
||||
string strPath = Util.GetConfigPath()+"/code-duplicated.txt";
|
||||
File.AppendAllText(strPath, strName+Environment.NewLine);
|
||||
|
||||
@@ -122,6 +122,8 @@ namespace NewsCrawler
|
||||
break;
|
||||
|
||||
case TextCondition.TYPE.POSITIVE:
|
||||
m_CodeList.AddDuplicatedList(Code.m_strCode, Code.m_strName);
|
||||
|
||||
if((Code.m_enType&CodeList.CODE_TYPE.DENIAL) == CodeList.CODE_TYPE.DENIAL)
|
||||
Util.Log(Util.LOG_TYPE.DENIAL, string.Format("[{0}] {1} (keyword:{2}, code:{3})", strRef, strTitle, MatchResult.m_strKeyword, Code.ToString()));
|
||||
else if((Code.m_enType&CodeList.CODE_TYPE.DENIAL) == CodeList.CODE_TYPE.DUPLICATED)
|
||||
@@ -132,10 +134,12 @@ namespace NewsCrawler
|
||||
{
|
||||
Util.Log(Util.LOG_TYPE.POSITIVE, string.Format("[{0}] {1} (keyword:{2}, code:{3})", strRef, strTitle, MatchResult.m_strKeyword, Code.ToString()));
|
||||
BuyItem(Code);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case TextCondition.TYPE.MANUAL:
|
||||
m_CodeList.AddDuplicatedList(Code.m_strCode, Code.m_strName);
|
||||
|
||||
Util.Log(Util.LOG_TYPE.MANUAL_KEYWORD, string.Format("[{0}] {1} (keyword:{2}, code:{3})", strRef, strTitle, MatchResult.m_strKeyword, Code.ToString()));
|
||||
|
||||
if(m_bBuy == true)
|
||||
|
||||
Reference in New Issue
Block a user