public void Init(MessageBroker broker) { base.Init(broker); System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; broker.Subscribe(this, typeof(UserClickedLoginMessage)); broker.Subscribe(this, typeof(UserClickedLogoffMessage)); }
public MainWindow(MessageBroker broker) { this.broker = broker; broker.SubscribeSubclasses(this, typeof(AFSDMessage)); FSDMessages = new ObservableCollection<AFSDMessage>(); Logs = new ObservableCollection<LogMessage>(); InitializeComponent(); }
public MainWindow(MessageBroker broker) { this.broker = broker; broker.Subscribe(this, typeof(FlightsimConnectedMessage)); broker.Subscribe(this, typeof(FSDConnectedMessage)); broker.Subscribe(this, typeof(CommErrorMessage)); broker.Subscribe(this, typeof(SimCommErrorMessage)); broker.Subscribe(this, typeof(FSDDisconnectedMessage)); broker.Subscribe(this, typeof(FlightsimDisconnectedMessage)); textMessageHandler = new TextMessageHandler(this); broker.Subscribe(textMessageHandler, typeof (TextMessageSend)); broker.Subscribe(textMessageHandler, typeof (TextMessageReceive)); InitializeComponent(); }
/* TO BE PLACED IN MAIN PROGRAM * * protected override void DefWndProc(ref Message m) { if (m.Msg == WM_USER_SIMCONNECT) { if (simconnect != null) { simconnect.ReceiveMessage(); } } else { base.DefWndProc(ref m); } } * */ public override void Init(MessageBroker broker) { base.Init(broker); SetupWindowsMessaging(); broker.Subscribe(this, typeof(UserClickedLoginMessage)); broker.Subscribe(this, typeof(UserClickedLogoffMessage)); broker.Subscribe(this, typeof(TrafficPositionReportMessage)); }
public void OnModuleLoad(MessageBroker broker) { sci.Init(broker); }
public void OnModuleLoad(MessageBroker messageBroker) { this.messageBroker = messageBroker; window = new MainWindow(messageBroker); window.Show(); }
public void OnModuleLoad(MessageBroker broker) { vspcMessageHandler.Init(broker); }