private void StockDecoder_onStock(object sender, Mitake.Events.StockEvent e)
 {
     if (e.Header == 0x53)
     {
         if (e.Type == 0x38)
         {
             EncodeUtil.EncodeSymbol(e.Source);
             __cSymbolBuffer.Add(e.Source.Data, 0, e.Source.Length);
         }
     }
 }
Exemplo n.º 2
0
        static void StockDecoder_StockProc(object sender, Mitake.Events.StockEvent e)
        {
            if (e.Type == 0x38)
            {
                Decode_S38.Decode(e.Serial, e.Source);
            }

            if (e.Header == 0x53 && e.Serial == 598 && (e.Type == 0x31 || e.Type == 0x3e || e.Type == 0xb1 || e.Type == 0xbe))
            {
                MitakeQuote cQuote = MitakeStorage.Storage.GetQuote(e.Serial);
                if (cQuote != null)
                {
                    if (cQuote.即時資訊.Time >= dddd)
                    {
                        //Thread.Sleep(2000);
                    }
                    System.Console.WriteLine(cQuote.即時資訊.Serial + " " + cQuote.即時資訊.Time.ToString("yyyyMMdd HH:mm:ss") + " " + cQuote.即時資訊.Bid.Price + " " + cQuote.即時資訊.Ask.Price + " " + cQuote.即時資訊.Price + " " + cQuote.即時資訊.Single + " " + cQuote.即時資訊.Volume);
                }
                Decode_S31.Decode(cQuote, e.Source);
            }
        }