|
namespace GG.GameAttackCombos.Logic {
/// <summary>
/// Represents a button for a platform.
/// </summary>
public class Button {
#region Properties
/// <summary>
/// The ID of this button; used to identify it.
/// </summary>
public string Id { get; private set; }
/// <summary>
/// The platform for this button (e.g. PS3, Xbox360, etc).
/// </summary>
public string Platform { get; private set; }
/// <summary>
/// The resource key for an icon that represents this button.
/// </summary>
public string IconKey { get; private set; }
#endregion
/// <summary>
/// Initializes an instance of Button.
/// </summary>
public Button() { }
/// <summary>
/// Initializes an instance of Button.
/// </summary>
/// <param name="id">The ID of this button.</param>
/// <param name="platform">The platform for this button.</param>
public Button(string id, string platform)
: this() {
Id = id;
Platform = platform;
}
/// <summary>
/// Initializes an instance of Button.
/// </summary>
/// <param name="id">The ID of this button.</param>
/// <param name="platform">The platform for this button.</param>
/// <param name="iconKey">The resource key of an icon for this button.</param>
public Button(string id, string platform, string iconKey)
: this(id, platform) {
IconKey = iconKey;
}
/// <summary>
/// Overriden to include the button's name.
/// </summary>
/// <returns></returns>
public override string ToString() {
return string.Format("Button: {0}-{1}", Platform, Id);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I began programming on my Commodore 64 at around the age of 12. After migrating to DOS and then Windows, I decided to take on the Web. Several languages and platforms later, I have settled in with .NET nicely. I am currently the owner of a software consulting company and lead application developer for a learning-based technology consultation company.
The love of a finished application is usually at war with the desire to improve it as soon as it's released (they're never really finished).