Example #1
0
        private void InitLeftButtons()
        {
            mListLeftButtons.Clear();
            ImageButtonItem item;

            if (State.Length > 2 && State.Substring(2, 1) == "1")
            {
                item      = new ImageButtonItem();
                item.Name = "Open";
                item.Icon = "/VCNAudioControls;component/Themes/Images/open.png";
                mListLeftButtons.Add(item);
            }
            if (State.Length > 3 && State.Substring(3, 1) == "1")
            {
                item      = new ImageButtonItem();
                item.Name = "Play";
                item.Icon = "/VCNAudioControls;component/Themes/Images/play.png";
                mListLeftButtons.Add(item);
            }
            if (State.Length > 4 && State.Substring(4, 1) == "1")
            {
                item      = new ImageButtonItem();
                item.Name = "Pause";
                item.Icon = "/VCNAudioControls;component/Themes/Images/pause.png";
                mListLeftButtons.Add(item);
            }
            if (State.Length > 5 && State.Substring(5, 1) == "1")
            {
                item      = new ImageButtonItem();
                item.Name = "Stop";
                item.Icon = "/VCNAudioControls;component/Themes/Images/stop.png";
                mListLeftButtons.Add(item);
            }
            if (State.Length > 6 && State.Substring(6, 1) == "1")
            {
                item      = new ImageButtonItem();
                item.Name = "Slower";
                item.Icon = "/VCNAudioControls;component/Themes/Images/slower.png";
                mListLeftButtons.Add(item);
            }
            if (State.Length > 7 && State.Substring(7, 1) == "1")
            {
                item      = new ImageButtonItem();
                item.Name = "Faster";
                item.Icon = "/VCNAudioControls;component/Themes/Images/faster.png";
                mListLeftButtons.Add(item);
            }
        }
Example #2
0
        private void InitRightButtons()
        {
            mListRightButtons.Clear();
            ImageButtonItem item;

            if (State.Length > 9 && State.Substring(9, 1) == "1")
            {
                item         = new ImageButtonItem();
                item.Name    = "ChannelMode";
                item.Display = "D";
                mListRightButtons.Add(item);
            }
            if (State.Length > 10 && State.Substring(10, 1) == "1")
            {
                item         = new ImageButtonItem();
                item.Name    = "Close";
                item.Display = "X";
                mListRightButtons.Add(item);
            }
        }
Example #3
0
        public void ButtonCommand_Executed(object sender, ImageButtonItem item)
        {
            switch (item.Name)
            {
            case "Open":
                BtnOpen_Click();
                break;

            case "Play":
                BtnPlay_Click();
                break;

            case "Pause":
                BtnPause_Click();
                break;

            case "Stop":
                BtnStop_Click();
                break;

            case "Slower":
                BtnSlower_Click();
                break;

            case "Faster":
                BtnFaster_Click();
                break;

            case "ChannelMode":
                BtnChannelMode_Click();
                break;

            case "Close":
                BtnClose_Click();
                break;
            }
        }