Ejemplo n.º 1
0
        // Get the size of the array for the Pad Data
        private void PreparePadDataArray()
        {
            GetPadData();
            xmPadDataList = new XMListItem[padDataList.Count];
            _xmChannels.Clear();
            // Create reference to XMListItems
            int i = 0;

            foreach (PadData pd in padDataList)
            {
                xmPadDataList[i] = new XMListItem(pd.Channel.ToString());
                xmPadDataList[i].RelativeBounds = new Rectangle(0, 0, 380, 88);
                _xmChannels.AddItem(xmPadDataList[i]);
                i++;
            }
        }
Ejemplo n.º 2
0
 // Get the size of the array for the Pad Data
 private void PreparePadDataArray()
 {
     GetPadData();
     xmPadDataList = new XMListItem[padDataList.Count];
     _xmChannels.Clear();
     // Create reference to XMListItems
     int i = 0;
     foreach (PadData pd in padDataList)
     {
         xmPadDataList[i] = new XMListItem(pd.Channel.ToString());
         xmPadDataList[i].RelativeBounds = new Rectangle(0,0,380,88);
         _xmChannels.AddItem(xmPadDataList[i]);
         i++;
     }
 }
Ejemplo n.º 3
0
        // On entering the screen
        public override void Activate()
        {
            base.Activate();

            // Mute UI sounds
            if (SingletonSoundCache.Instance.MuteSoundEffects == true)
            {
                wasUIsoundsOn = false;
            }
            else
            {
                wasUIsoundsOn = true;
                SingletonSoundCache.Instance.MuteSoundEffects = true;
            }

            // get user information
            SingletonConfig.Instance.GetPropertyAsString("XMEmail", out email);
            SingletonConfig.Instance.GetPropertyAsString("XMPassword", out password);
            SingletonConfig.Instance.GetPropertyAsString("XMRadio.Speed", out speed);

            // Log into XMRO
            loggedin = false;
            loggedin = Login();
            if (loggedin)
            {
                // Prepare the Pad Data List
                PreparePadDataArray();
                updatePadDataDisplay();

                // Create genres
                createGenreList();

                // get favorites and create the list
                favorites = new string[7];
                for (int i = 0; i < favorites.Length; i++)
                {
                    SingletonConfig.Instance.GetPropertyAsString("XMFav" + i.ToString(), out favorites[i]);
                }
                createFavsList();

                // Start the pad data updater
                updateTimer.Start();
                currentChannel = 0;

                // Volume control
                _volume.Text = wmp.settings.volume.ToString();
                _volume.FadeOut();
            }
            else
            {
                // Clear just in case a previous login worked
                _xmChannels.Clear();
                _xmFavs.Clear();
                _xmGenres.Clear();

                // Just show the preview
                _header.Text = "Not Logged In";
                XMListItem xmchannelitem;
                xmchannelitem = new XMListItem("000");
                xmchannelitem.RelativeBounds = new Rectangle(0, 0, 380, 88);
                xmchannelitem.Artist.Text    = "No Subscription";
                xmchannelitem.Song.Text      = "No Subscription";
                _xmChannels.AddItem(xmchannelitem);
            }

            // Give focus to the Channel List
            _xmChannels.Focus();
        }
Ejemplo n.º 4
0
        // On entering the screen
        public override void Activate()
        {
            base.Activate();

            // Mute UI sounds
            if (SingletonSoundCache.Instance.MuteSoundEffects == true)
            {
                wasUIsoundsOn = false;
            }
            else
            {
                wasUIsoundsOn = true;
                SingletonSoundCache.Instance.MuteSoundEffects = true;
            }

            // get user information
            SingletonConfig.Instance.GetPropertyAsString("XMEmail",out email);
            SingletonConfig.Instance.GetPropertyAsString("XMPassword",out password);
            SingletonConfig.Instance.GetPropertyAsString("XMRadio.Speed",out speed);

            // Log into XMRO
            loggedin = false;
            loggedin = Login();
            if (loggedin)
            {
                // Prepare the Pad Data List
                PreparePadDataArray();
                updatePadDataDisplay();

                // Create genres
                createGenreList();

                // get favorites and create the list
                favorites = new string[7];
                for (int i = 0; i < favorites.Length; i++)
                    SingletonConfig.Instance.GetPropertyAsString("XMFav"+i.ToString(),out favorites[i]);
                createFavsList();

                // Start the pad data updater
                updateTimer.Start();
                currentChannel = 0;

                // Volume control
                _volume.Text = wmp.settings.volume.ToString();
                _volume.FadeOut();
            }
            else
            {
                // Clear just in case a previous login worked
                _xmChannels.Clear();
                _xmFavs.Clear();
                _xmGenres.Clear();

                // Just show the preview
                _header.Text = "Not Logged In";
                XMListItem xmchannelitem;
                xmchannelitem = new XMListItem("000");
                xmchannelitem.RelativeBounds = new Rectangle(0,0,380,88);
                xmchannelitem.Artist.Text = "No Subscription";
                xmchannelitem.Song.Text = "No Subscription";
                _xmChannels.AddItem(xmchannelitem);
            }

            // Give focus to the Channel List
            _xmChannels.Focus();
        }