- 10초 내에 시초가를 받지 못한 경우 패스

This commit is contained in:
2017-02-06 11:55:59 +09:00
parent 434d1a193a
commit cca2b69e5e
2 changed files with 26 additions and 3 deletions

View File

@@ -249,7 +249,7 @@
this.materialLabel3.Name = "materialLabel3";
this.materialLabel3.Size = new System.Drawing.Size(162, 18);
this.materialLabel3.TabIndex = 6;
this.materialLabel3.Text = "Version : 2017.02.03.11";
this.materialLabel3.Text = "Version : 2017.02.06.12";
//
// lvItems
//

View File

@@ -26,6 +26,9 @@ namespace MarketWatchNS
MarketWatch m_Listener = null;
bool m_bEnd = false;
bool m_bCancel = true;
int m_iCheckTimeInSec;
System.Timers.Timer m_Timer = new System.Timers.Timer();
public PriceCheck(int iSeq, string strCode, string strCodeName, MarketWatch Listener, int iTimeInSec)
@@ -43,14 +46,34 @@ namespace MarketWatchNS
m_StockCur.Received += StockCur_Received;
m_StockCur.Subscribe();
m_Timer.Interval = iTimeInSec*1000;
m_iCheckTimeInSec = iTimeInSec;
m_bCancel = true;
m_Timer.Interval = 10*1000;
m_Timer.Elapsed += Timer_Elapsed;
m_Timer.Start();
}
private void Timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
Stop();
if(m_bCancel == true)
{
if(m_iStartPrice < 0)
{
Stop();
}
else
{
m_Timer.Stop();
m_Timer.Interval = (m_iCheckTimeInSec-10)*1000;
m_Timer.Start();
}
m_bCancel = false;
}
else
{
Stop();
}
}
public bool IsEnd()