add documentation + make class static

pull/9/head
Miepee 6 years ago
parent d3812de326
commit 15f7cddb20

@ -158,7 +158,6 @@ namespace AM2RLauncher
} }
// Custom splash texts // Custom splash texts
var Splash = new Splash();
string splash = Splash.GetSplash(); string splash = Splash.GetSplash();
log.Info("Randomly chosen splash: " + splash); log.Info("Randomly chosen splash: " + splash);

@ -5,10 +5,15 @@ using System.Linq;
namespace AM2RLauncher namespace AM2RLauncher
{ {
class Splash /// <summary>
/// Class only for providing Splashes
/// </summary>
static class Splash
{ {
// Cross-Platform splash strings /// <summary>
readonly string[] generalSplash = /// Cross-Platform splash strings
/// </summary>
static readonly string[] generalSplash =
{ {
"The real Ridley is the friends we made along the way.", "The real Ridley is the friends we made along the way.",
"Now with 100% more Septoggs!", "Now with 100% more Septoggs!",
@ -34,8 +39,10 @@ namespace AM2RLauncher
"Use of the Launcher has now been authorized!", "Use of the Launcher has now been authorized!",
}; };
// Linux only splash strings /// <summary>
readonly string[] linuxSplash = /// Linux only splash strings
/// </summary>
static readonly string[] linuxSplash =
{ {
"Sorry this is ugly, but at least it works.", "Sorry this is ugly, but at least it works.",
"GTK + QT = 💣", "GTK + QT = 💣",
@ -53,11 +60,10 @@ namespace AM2RLauncher
}; };
/// <summary> /// <summary>
/// Get random splash string /// Get a random splash string, according to the current OS.
/// Checks if platform is using GTK, and gets splash text accordingly
/// </summary> /// </summary>
/// <returns>The randomly chosen splash as a <see cref="string"/>.</returns>
public string GetSplash() static public string GetSplash()
{ {
string[] combinedSplash; string[] combinedSplash;
Random rng = new Random(); Random rng = new Random();

Loading…
Cancel
Save