public DecoratedButton(IDecoratedButton i_Button) { if (i_Button is CoreButton) { m_ButtonToDecorate = (i_Button as CoreButton).m_Button; } else { m_ButtonToDecorate = (i_Button as DecoratedButton).m_ButtonToDecorate; } m_DecoratedFatherButton = i_Button; m_ButtonToDecorate.Visible = true; m_ButtonToDecorate.Enabled = true; }
public DecoratorText(IDecoratedButton i_DecoratedButton, string i_text) : base(i_DecoratedButton) { m_text = i_text; }
public DecoratorFont(IDecoratedButton i_DecoratedButton) : base(i_DecoratedButton) { }
public DecoratorSetBackground (IDecoratedButton i_DecoratedButton, Color i_Color) : base(i_DecoratedButton) { m_Color = i_Color; }
private void FormMusic_Load(object sender, EventArgs e) { // Decorator m_YoutubeButton = new DecoratorText(new DecoratorSetBackground(new DecoratorFont(new CoreButton(buttonYouTubeChannel)), Color.Crimson), "YouTube Channel"); buttonYouTubeChannel.Visible = false; m_YoutubeButton.Execute(); // Decorator m_FacbookPageButton = new DecoratorText(new DecoratorSetBackground(new DecoratorFont(new CoreButton(buttonLinkToPage)), Color.FromArgb(((int)(((byte)59))), ((int)((byte)89)), ((int)((byte)152)))), "Facebook Page"); buttonLinkToPage.Visible = false; m_FacbookPageButton.Execute(); // Decorator m_ChromeButton = new DecoratorText(new DecoratorSetBackground(new DecoratorFont(new CoreButton(buttonPlayVideoOnYouTube)), Color.FromArgb(((int)((byte)252)), ((int)((byte)183)), ((int)((byte)0)))), "Play on Browser"); buttonPlayVideoOnYouTube.Visible = false; m_ChromeButton.Execute(); }