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); }
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(); }
public void Remove(IControlButton <Feed> i_Button) { m_ControlButtons.Remove(i_Button); }
public void Add(IControlButton <Feed> i_Button) { m_ControlButtons.Add(i_Button); }