diff --git a/Source/Client/Core/Preferences/UserLoginManager.cs b/Source/Client/Core/Preferences/UserLoginManager.cs index ef6ff934..0f0d7c94 100644 --- a/Source/Client/Core/Preferences/UserLoginManager.cs +++ b/Source/Client/Core/Preferences/UserLoginManager.cs @@ -21,16 +21,12 @@ public static LoginDataFile LoadLoginData() { // For testing purposes - if (Input.GetKey(KeyCode.LeftShift)) + if (Input.GetKey(KeyCode.LeftShift)) return GetTestingLoginFile(); + else { - LoginDataFile file = new LoginDataFile(); - file.UID = "UID"; - file.Username = "Username"; - return file; + if (File.Exists(Master.loginDataPath)) return Serializer.SerializeFromFile(Master.loginDataPath); + else return new LoginDataFile(); } - - if (File.Exists(Master.loginDataPath)) return Serializer.SerializeFromFile(Master.loginDataPath); - else return new LoginDataFile(); } public static void DeleteLoginData() { File.Delete(Master.loginDataPath); } @@ -55,6 +51,14 @@ public static void UseLoginData() } } + private static LoginDataFile GetTestingLoginFile() + { + LoginDataFile file = new LoginDataFile(); + file.UID = "UID"; + file.Username = "Username"; + return file; + } + public static void PromptCreateAccount(bool isQuickConnect) { Action toDo = delegate diff --git a/Source/Shared/Misc/Attributes.cs b/Source/Shared/Misc/Attributes.cs index 3a11d9e9..c6ed8289 100644 --- a/Source/Shared/Misc/Attributes.cs +++ b/Source/Shared/Misc/Attributes.cs @@ -4,7 +4,9 @@ namespace Shared { // Used for instantiating managers [AttributeUsage(AttributeTargets.Class, Inherited = false)] - public class RTManager : Attribute {} + public class RTManager : Attribute { } + // Used for loading in custom assemblies + [AttributeUsage(AttributeTargets.Class, Inherited = false)] public class RTStartupAttribute : Attribute { } } \ No newline at end of file