From 15f7cddb202bdf6e10417f24695403bb63f9c4dd Mon Sep 17 00:00:00 2001
From: Miepee <38186597+Miepee@users.noreply.github.com>
Date: Sat, 22 May 2021 15:20:11 +0200
Subject: [PATCH] add documentation + make class static
---
.../AM2RLauncher/MainForm/MainForm.UI.cs | 1 -
AM2RLauncher/AM2RLauncher/MainForm/Splash.cs | 24 ++++++++++++-------
2 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/AM2RLauncher/AM2RLauncher/MainForm/MainForm.UI.cs b/AM2RLauncher/AM2RLauncher/MainForm/MainForm.UI.cs
index 51d22e0..d22d00c 100644
--- a/AM2RLauncher/AM2RLauncher/MainForm/MainForm.UI.cs
+++ b/AM2RLauncher/AM2RLauncher/MainForm/MainForm.UI.cs
@@ -158,7 +158,6 @@ namespace AM2RLauncher
}
// Custom splash texts
- var Splash = new Splash();
string splash = Splash.GetSplash();
log.Info("Randomly chosen splash: " + splash);
diff --git a/AM2RLauncher/AM2RLauncher/MainForm/Splash.cs b/AM2RLauncher/AM2RLauncher/MainForm/Splash.cs
index 2ab704b..60859fc 100644
--- a/AM2RLauncher/AM2RLauncher/MainForm/Splash.cs
+++ b/AM2RLauncher/AM2RLauncher/MainForm/Splash.cs
@@ -5,10 +5,15 @@ using System.Linq;
namespace AM2RLauncher
{
- class Splash
+ ///
+ /// Class only for providing Splashes
+ ///
+ static class Splash
{
- // Cross-Platform splash strings
- readonly string[] generalSplash =
+ ///
+ /// Cross-Platform splash strings
+ ///
+ static readonly string[] generalSplash =
{
"The real Ridley is the friends we made along the way.",
"Now with 100% more Septoggs!",
@@ -34,8 +39,10 @@ namespace AM2RLauncher
"Use of the Launcher has now been authorized!",
};
- // Linux only splash strings
- readonly string[] linuxSplash =
+ ///
+ /// Linux only splash strings
+ ///
+ static readonly string[] linuxSplash =
{
"Sorry this is ugly, but at least it works.",
"GTK + QT = 💣",
@@ -53,11 +60,10 @@ namespace AM2RLauncher
};
///
- /// Get random splash string
- /// Checks if platform is using GTK, and gets splash text accordingly
+ /// Get a random splash string, according to the current OS.
///
-
- public string GetSplash()
+ /// The randomly chosen splash as a .
+ static public string GetSplash()
{
string[] combinedSplash;
Random rng = new Random();