예제 #1
0
        public void ActivateNavigationItem()
        {
            var selectedItem = GetSelectedItem();

            if (selectedItem == null)
            {
                Console.WriteLine("No Item selected.");
                return;
            }
            if (selectedItem.Type == NavigationTypes.Folder)
            {
                ActivePlayer.NavigateDownOneLevel(selectedItem);
            }
            else if (selectedItem.Type == NavigationTypes.Picture)
            {
                //Stop currently playing item on Renderer
                Stop();
                //Show photo
                _state.SetPictureMode((selectedItem as Photo).SourceUrl);
                //Fire signal to broadcast state has changed
                FireStateChangedEvent();
            }
            else
            {
                Play(selectedItem as Song);
            }
        }