Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Button" /> class.
 /// </summary>
 /// <param name="buttonType">Type of the button.</param>
 /// <param name="url">The URL.</param>
 /// <param name="visible">if set to <c>true</c> [visible].</param>
 /// <param name="grouped">if set to <c>true</c> [grouped].</param>
 public Button(Enums.ButtonType buttonType, string url, bool visible = true, bool grouped = false)
 {
     this.Type        = buttonType;
     this.RedirectUrl = url;
     this.Visible     = visible;
     this.Group       = grouped;
 }
Example #2
0
 public ButtonConfig(string name, Enums.ButtonType buttonType)
     : base()
 {
     this.Value      = null;
     this.Name       = name;
     this.ButtonType = buttonType;
 }
        public Button CreateButton(Enums.ButtonType buttonType)
        {
            switch (buttonType)
            {
            case Enums.ButtonType.Play:
                return(new PlayButton("Play", ConsoleKey.Enter));

            case Enums.ButtonType.Stop:
                return(new StopButton("Stop", ConsoleKey.Escape));

            case Enums.ButtonType.Pause:
                return(new PauseButton("Pause", ConsoleKey.Spacebar));

            default:
                return(null);
            }
        }
Example #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Button" /> class.
 /// </summary>
 /// <param name="buttonType">Type of the button.</param>
 /// <param name="visible">if set to <c>true</c> [visible].</param>
 /// <param name="grouped">if set to <c>true</c> [grouped].</param>
 public Button(Enums.ButtonType buttonType, bool visible = true, bool grouped = false)
 {
     this.Type    = buttonType;
     this.Visible = visible;
     this.Group   = grouped;
 }