Example #1
0
 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));
 }
Example #2
0
 public MainWindow(MessageBroker broker)
 {
     this.broker = broker;
     broker.SubscribeSubclasses(this, typeof(AFSDMessage));
     FSDMessages = new ObservableCollection<AFSDMessage>();
     Logs = new ObservableCollection<LogMessage>();
     InitializeComponent();
 }
Example #3
0
        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();
        }
Example #4
0
 /* 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));
 }
Example #5
0
 public void OnModuleLoad(MessageBroker broker)
 {
     sci.Init(broker);
 }
Example #6
0
 public void OnModuleLoad(MessageBroker messageBroker)
 {
     this.messageBroker = messageBroker;
     window = new MainWindow(messageBroker);
     window.Show();
 }
Example #7
0
 public void OnModuleLoad(MessageBroker broker)
 {
     vspcMessageHandler.Init(broker);
 }