- 임시 커밋

This commit is contained in:
2017-02-08 16:26:29 +09:00
parent 152e6af4e8
commit 31791b2dd7
8 changed files with 260 additions and 17 deletions

View File

@@ -167,7 +167,7 @@ namespace NewsCrawler
m_PriceCheckTimer.Elapsed += PriceCheckTimer_Elapsed;
m_PriceCheckTimer.Start();
m_bBuy = true;
m_bBuy = chBuy.Checked;
Test();
}
@@ -451,6 +451,53 @@ namespace NewsCrawler
m_CodeList.AddDuplicatedList(Code.m_strCode, Code.m_strName);
}
public void OnReceivedProfitChange(string strCodeName, bool bBlackCheckers, float fProfit)
{
string strKeyword = string.Format("손익구조 변동({0})", bBlackCheckers?"흑자전환":fProfit+"%");
CodeList.CODE_VALUE Code = m_CodeList.GetCodeByName(strCodeName);
if(Code == null)
{
Util.Log(Util.LOG_TYPE.VERVOSE, string.Format("[DartAPI][{0}] 종목을 찾을 수 없음({1})", strKeyword, strCodeName));
return;
}
if(bBlackCheckers == false && fProfit < Config.GetProfitChangeRate())
{
Util.Log(Util.LOG_TYPE.VERVOSE, string.Format("[DartAPI][{0}] 영업이익률 낮음({1}, {2}% / {3}%)", strKeyword, strCodeName, fProfit, Config.GetProfitChangeRate()));
return;
}
string strRef = "DartAPI";
string strTitle = string.Format("{0} - {1}", strKeyword, strCodeName);
if((Code.m_enType & CodeList.CODE_TYPE.DENIAL) == CodeList.CODE_TYPE.DENIAL)
Util.Log(Util.LOG_TYPE.DENIAL, string.Format("[{0}] {1}", strRef, strTitle));
else if((Code.m_enType & CodeList.CODE_TYPE.DUPLICATED) == CodeList.CODE_TYPE.DUPLICATED)
Util.Log(Util.LOG_TYPE.DUPLICATED, string.Format("[{0}] {1}", strRef, strTitle));
else if((Code.m_enType & CodeList.CODE_TYPE.MANUAL) == CodeList.CODE_TYPE.MANUAL)
{
Util.Log(Util.LOG_TYPE.MANUAL_CODE, string.Format("[{0}] {1}", strRef, strTitle));
if(m_bBuy == true)
{
ModelessPopup ManualPopup = new ModelessPopup(this);
ManualPopup.SetMessage(string.Format("{0}\n[{1}] {2}\n\n매수하시겠습니까?",
DateTime.Now.ToString("[hh:mm:ss]"),
strRef, strTitle), Code);
ManualPopup.TopMost = true;
ManualPopup.Show();
}
}
else
{
BuyItem(Code);
Util.Log(Util.LOG_TYPE.POSITIVE, string.Format("[{0}] {1}", strRef, strTitle));
}
m_CodeList.AddDuplicatedList(Code.m_strCode, Code.m_strName);
}
public bool IsDuplicatedURL(string strURL)
{
if(strURL == "")