Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
 void mediaEmulator_IsEnabledChanged(MediaEmulator emulator, bool isEnabled)
 {
     IsEnabled = isEnabled;
 }
Exemplo n.º 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;
 }
Exemplo n.º 5
0
 void mediaEmulator_IsEnabledChanged(MediaEmulator emulator, bool isEnabled)
 {
     if (!isEnabled)
     {
         Bordmonitor.EnableRadioMenu();
     }
 }
Exemplo n.º 6
0
 private RadioMenu(MediaEmulator mediaEmulator)
     : base(mediaEmulator)
 {
     Manager.AddMessageReceiverForSourceDevice(DeviceAddress.Radio, ProcessRadioMessage);
     MultiFunctionSteeringWheel.ButtonPressed += MultiFunctionSteeringWheel_ButtonPressed;
 }