- 8092S 객체 사용
- 중복종목 버그 수정
This commit is contained in:
30
NewsForm.cs
30
NewsForm.cs
@@ -63,6 +63,9 @@ namespace NewsCrawler
|
||||
if(lvList.SelectedItems.Count > 0)
|
||||
lvList.SelectedItems[0].EnsureVisible();
|
||||
}
|
||||
lvList.Columns[chTime.Index].TextAlign = HorizontalAlignment.Right;
|
||||
lvList.Columns[chResponseT.Index].TextAlign = HorizontalAlignment.Right;
|
||||
lvList.Columns[chResT.Index].TextAlign = HorizontalAlignment.Right;
|
||||
|
||||
Console.WriteLine(string.Format("{0} ddd", m_CrawlTimer.SynchronizingObject));
|
||||
Console.WriteLine(string.Format("init thread {0}", System.Threading.Thread.CurrentThread.ManagedThreadId.ToString()));
|
||||
@@ -92,11 +95,20 @@ namespace NewsCrawler
|
||||
if(m_bBuy == false)
|
||||
return;
|
||||
|
||||
if(m_CodeList.IsBuyableCode(Code) == true)
|
||||
if((Code.m_enType & CodeList.CODE_TYPE.DENIAL) == CodeList.CODE_TYPE.DENIAL)
|
||||
{
|
||||
m_CybosHelper.Buy(Code, Config.GetBuyPrice());
|
||||
m_CodeList.AddDuplicatedList(Code.m_strCode, Code.m_strName);
|
||||
Util.Log(Util.LOG_TYPE.DENIAL, string.Format("거부종목 ({0})", Code));
|
||||
return;
|
||||
}
|
||||
|
||||
if((Code.m_enType & CodeList.CODE_TYPE.DUPLICATED) == CodeList.CODE_TYPE.DUPLICATED)
|
||||
{
|
||||
Util.Log(Util.LOG_TYPE.DUPLICATED, string.Format("중복종목 ({0})", Code));
|
||||
return;
|
||||
}
|
||||
|
||||
m_CybosHelper.Buy(Code, Config.GetBuyPrice());
|
||||
m_CodeList.AddDuplicatedList(Code.m_strCode, Code.m_strName);
|
||||
}
|
||||
|
||||
public void OnManualItemBuy(CodeList.CODE_VALUE Code)
|
||||
@@ -122,8 +134,6 @@ 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)
|
||||
@@ -135,11 +145,11 @@ 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);
|
||||
}
|
||||
|
||||
m_CodeList.AddDuplicatedList(Code.m_strCode, Code.m_strName);
|
||||
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)
|
||||
@@ -151,6 +161,8 @@ namespace NewsCrawler
|
||||
ManualPopup.TopMost = true;
|
||||
ManualPopup.Show();
|
||||
}
|
||||
|
||||
m_CodeList.AddDuplicatedList(Code.m_strCode, Code.m_strName);
|
||||
break;
|
||||
|
||||
case TextCondition.TYPE.NOT_MATCHED:
|
||||
@@ -171,10 +183,10 @@ namespace NewsCrawler
|
||||
}
|
||||
else
|
||||
{
|
||||
if(lvList.Items.Cast<ListViewItem>().Any(s => s.SubItems[chLink.Index].Text == strURL))
|
||||
if(strURL != "" && lvList.Items.Cast<ListViewItem>().Any(s => s.SubItems[chLink.Index].Text == strURL))
|
||||
return;
|
||||
|
||||
lvList.Items.Add(new ListViewItem(new string[] { time.ToString("HH:mm:ss"), ResTime.ToString("HH:mm:ss"), strRef, strTitle, string.Format("{0} ms", responseT), strURL }));
|
||||
lvList.Items.Add(new ListViewItem(new string[] { time.ToString("HH:mm:ss"), ResTime.ToString("HH:mm:ss:fff"), strRef, strTitle, string.Format("{0:0.0000} ms", responseT), strURL }));
|
||||
|
||||
if(bInitial == false && chAutoSelect.Checked == true)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user