- 10초 내에 시초가를 받지 못한 경우 패스
This commit is contained in:
2
MarketWatch.Designer.cs
generated
2
MarketWatch.Designer.cs
generated
@@ -249,7 +249,7 @@
|
|||||||
this.materialLabel3.Name = "materialLabel3";
|
this.materialLabel3.Name = "materialLabel3";
|
||||||
this.materialLabel3.Size = new System.Drawing.Size(162, 18);
|
this.materialLabel3.Size = new System.Drawing.Size(162, 18);
|
||||||
this.materialLabel3.TabIndex = 6;
|
this.materialLabel3.TabIndex = 6;
|
||||||
this.materialLabel3.Text = "Version : 2017.02.03.11";
|
this.materialLabel3.Text = "Version : 2017.02.06.12";
|
||||||
//
|
//
|
||||||
// lvItems
|
// lvItems
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -26,6 +26,9 @@ namespace MarketWatchNS
|
|||||||
MarketWatch m_Listener = null;
|
MarketWatch m_Listener = null;
|
||||||
bool m_bEnd = false;
|
bool m_bEnd = false;
|
||||||
|
|
||||||
|
bool m_bCancel = true;
|
||||||
|
int m_iCheckTimeInSec;
|
||||||
|
|
||||||
System.Timers.Timer m_Timer = new System.Timers.Timer();
|
System.Timers.Timer m_Timer = new System.Timers.Timer();
|
||||||
|
|
||||||
public PriceCheck(int iSeq, string strCode, string strCodeName, MarketWatch Listener, int iTimeInSec)
|
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.Received += StockCur_Received;
|
||||||
m_StockCur.Subscribe();
|
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.Elapsed += Timer_Elapsed;
|
||||||
m_Timer.Start();
|
m_Timer.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
|
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()
|
public bool IsEnd()
|
||||||
|
|||||||
Reference in New Issue
Block a user