private void OnRtnDepthMarketData_Tick_callback(object sender, ref CTick pDepthMarketData) { try { OnRtnDepthMarketData_Tick(this, new OnTickArgs(ref pDepthMarketData)); } catch (System.Exception) { Thread.Sleep(5); try { OnRtnDepthMarketData_Tick(this, new OnTickArgs(ref pDepthMarketData)); } catch (System.Exception) { Thread.Sleep(5); try { OnRtnDepthMarketData_Tick(this, new OnTickArgs(ref pDepthMarketData)); } catch (System.Exception) { Thread.Sleep(5); try { OnRtnDepthMarketData_Tick(this, new OnTickArgs(ref pDepthMarketData)); } catch (System.Exception) { //MessageBox.Show("MdApiWrapper::OnRtnDepthMarketData_Tick_callback:" + ex.ToString()); } } } } }
private void OnRtnDepthMarketData_Tick(ref CTick pTick) { try { RtnDepthMarketData_Tick(this, new OnTickArgs(ref pTick)); } catch (System.Exception ex) { Thread.Sleep(5); try { RtnDepthMarketData_Tick(this, new OnTickArgs(ref pTick)); } catch (System.Exception) { Thread.Sleep(5); try { RtnDepthMarketData_Tick(this, new OnTickArgs(ref pTick)); } catch (System.Exception) { Thread.Sleep(5); try { RtnDepthMarketData_Tick(this, new OnTickArgs(ref pTick)); } catch (System.Exception) { MessageBox.Show("MdApiWrapper::OnRtnDepthMarketData_Tick_callback:" + ex.ToString()); } } } } }
static void Main(string[] args) { Console.OutputEncoding = Encoding.Unicode; EventManager = new EventManager(); TickThread = new CTick(); InputThread = new VInput(); //Starts the input manager thread InputThread.Start(); //Start the ticks trigger thread TickThread.Start(); //Starts a new game CGame.NewGame(); string[] soundFile = Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.MyMusic), "*.wav"); System.Media.SoundPlayer sp = new System.Media.SoundPlayer(); //Infinite loop for the game while (true) { foreach (string music in soundFile) { sp.SoundLocation = music; sp.PlaySync(); } } }
private void OnHistoryTick_3(ref CTick pTick) { OnHistoryTick_1(this, ref pTick); }
private void OnRtnDepthMarketData_Tick_3(ref CTick pDepthMarketData_Tick) { OnRtnDepthMarketData_Tick_1(this, ref pDepthMarketData_Tick); }
public static void OnRtnDepthMarketData_Tick(ref CTick pTick) { Console.WriteLine("{0} {1}", pTick.InstrumentID, pTick.ExchangeTime); }
public OnTickArgs(ref CTick pTick) { this.pTick = pTick; }