Beispiel #1
0
        private BordmonitorMenu(MediaEmulator mediaEmulator)
            : base(mediaEmulator)
        {
            mediaEmulator.IsEnabledChanged += mediaEmulator_IsEnabledChanged;

            Radio.OnOffChanged += Radio_OnOffChanged;
            Manager.AddMessageReceiverForSourceDevice(DeviceAddress.Radio, ProcessRadioMessage);
            Manager.AddMessageReceiverForDestinationDevice(DeviceAddress.Radio, ProcessToRadioMessage);
        }
Beispiel #2
0
        public MenuBase(MediaEmulator mediaEmulator)
        {
            homeScreen = HomeScreen.Instance;
            CurrentScreen = homeScreen;

            this.mediaEmulator = mediaEmulator;
            mediaEmulator.IsEnabledChanged += mediaEmulator_IsEnabledChanged;
            mediaEmulator.PlayerIsPlayingChanged += ShowPlayerStatus;
            mediaEmulator.PlayerStatusChanged += ShowPlayerStatus;
            mediaEmulator.PlayerChanged += mediaEmulator_PlayerChanged;
            mediaEmulator_PlayerChanged(mediaEmulator.Player);
        }
Beispiel #3
0
 void mediaEmulator_IsEnabledChanged(MediaEmulator emulator, bool isEnabled)
 {
     IsEnabled = isEnabled;
 }
Beispiel #4
0
 public static BordmonitorMenu Init(MediaEmulator mediaEmulator)
 {
     if (instance != null)
     {
         // TODO implement hot switch of emulators
         throw new Exception("Already inited");
     }
     instance = new BordmonitorMenu(mediaEmulator);
     return instance;
 }
Beispiel #5
0
 void mediaEmulator_IsEnabledChanged(MediaEmulator emulator, bool isEnabled)
 {
     if (!isEnabled)
     {
         Bordmonitor.EnableRadioMenu();
     }
 }
Beispiel #6
0
 private RadioMenu(MediaEmulator mediaEmulator)
     : base(mediaEmulator)
 {
     Manager.AddMessageReceiverForSourceDevice(DeviceAddress.Radio, ProcessRadioMessage);
     MultiFunctionSteeringWheel.ButtonPressed += MultiFunctionSteeringWheel_ButtonPressed;
 }