/* void m_SKQuoteLib2_OnConnection(int nKind, int nCode) * { * if (nKind == 3001) * { * * if (nCode == 0) * { * label_2.ForeColor = Color.Yellow; * } * } * else if (nKind == 3002) * { * label_2.ForeColor = Color.Red; * } * else if (nKind == 3003) * { * label_2.ForeColor = Color.Green; * } * else if (nKind == 3021)//網路斷線 * { * label_2.ForeColor = Color.DarkRed; * } * }*/ void m_SKQuoteLib_OnNotifyQuote(short sMarketNo, short sStockIdx) { SKSTOCK pSKStock = new SKSTOCK(); SKQuoteLib.SKQuoteLib_GetStockByIndex(sMarketNo, sStockIdx, ref pSKStock); OnUpDateDataRow(pSKStock); }
private void SKQuoteLib_OnNotifyQuote(short sMarketNo, short sStockIndex) { SKSTOCK pSKStock = new SKSTOCK(); m_pSKQuoteLib.SKQuoteLib_GetStockByIndex(sMarketNo, sStockIndex, ref pSKStock); double dClose = pSKStock.nClose / (Math.Pow(10, pSKStock.sDecimal)); long lQtyStock = Convert.ToInt64(dStockList[pSKStock.bstrStockNo]); dMarketValue[pSKStock.bstrStockNo] = Convert.ToInt64(dClose * lQtyStock * 1000); UpdateTAIEX(); }