Пример #1
0
        public IControlButton <Feed> ForwardStep(string i_Button)
        {
            IControlButton <Feed> changedButton = null;

            foreach (IControlButton <Feed> button in ControlButtons)
            {
                if (button.Command.Title == i_Button)
                {
                    if (button.Status == ePanelBarStatus.Off)
                    {
                        AddState();
                    }

                    button.ForwardStatus();

                    if (button.Status != ePanelBarStatus.Off)
                    {
                        currentFeed = button.Command.Execute(CurrentFeed);
                    }
                    else
                    {
                        currentFeed = RemoveState();
                    }

                    changedButton = button;
                }
            }

            return(changedButton);
        }
Пример #2
0
        private void ControlButton_Click(object sender, MouseEventArgs e)
        {
            picture = sender as PictureBox;
            IControlButton <Feed> controlButton = panelBar.ForwardStep(picture.Name.Split(':')[0]);
            string commandName = controlButton.Command.Title;

            picture.ImageLocation = string.Format("../../img/panelBar/{0}{1}.png", commandName, controlButton.Status);
            picture.Name          = string.Format("{0}:{1}", commandName, controlButton.Status);

            displayFeedForm();
        }
Пример #3
0
 public void Remove(IControlButton <Feed> i_Button)
 {
     m_ControlButtons.Remove(i_Button);
 }
Пример #4
0
 public void Add(IControlButton <Feed> i_Button)
 {
     m_ControlButtons.Add(i_Button);
 }