private void OnBroadcastThreadState(object source, Core.BroadcastMarketThreadStateEventArgs e) { if (id != e.ThreadProcessId) return; MarketUpdatedEvent(); SetStatus(status); }
private void FormMain_Load(object sender, EventArgs e) { Text = ((AssemblyTitleAttribute)Attribute.GetCustomAttribute(Assembly.GetExecutingAssembly(), typeof(AssemblyTitleAttribute))).Title + " - Version " + Assembly.GetExecutingAssembly().GetName().Version; Icon = Resources.lignite; marketViewContainer.ClearMarkets(); systemStatusMonitor1.Start(); systemStatusMonitor1.RefreshFeed(); ligniteEngine = new Core(); /*** Add event handlers so we know when something changes ***/ if (__NewMessageEventEventHandler == null) { __NewMessageEventEventHandler = NewLigniteMessageReceived; ligniteEngine.OnNewMessage += __NewMessageEventEventHandler; } if (__MarketProcessorThreadStatusChangedEventHandler == null) { __MarketProcessorThreadStatusChangedEventHandler = MarketProcessorThreadStatusChanged; ligniteEngine.OnMarketProcessorThreadStatusChanged += __MarketProcessorThreadStatusChangedEventHandler; } if (__MarketDataUpdatedEventEventHandler == null) { __MarketDataUpdatedEventEventHandler = MarketDataUpdated; ligniteEngine.OnMarketDataUpdated += __MarketDataUpdatedEventEventHandler; } marketViewContainer.ShowMenuPathInDisplayName = Settings.Default.ShowCompleteMenuPath; marketViewContainer.ShowStartingPricesIfAvailable = Settings.Default.ShowBetfairStartingPrices; placeBetForm = new SimplePlaceBetForm(); placeBetForm.Show(); placeBetForm.Hide(); placeBetForm.Controller = MasterEventController; MasterEventController.BroadcastMarketStateRequest += MasterEventController_BroadcastMarketStateRequest; }