From 2a7d4ad139c57ec2ae04fa387f2b02e6f80b733d Mon Sep 17 00:00:00 2001 From: miku-666 <74728189+NessieHax@users.noreply.github.com> Date: Wed, 28 Sep 2022 16:45:42 +0200 Subject: [PATCH] Add Debug Listener and made Program variables readonly --- PCK-Studio/Program.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/PCK-Studio/Program.cs b/PCK-Studio/Program.cs index 8f7c3a2b..e09bb7a9 100644 --- a/PCK-Studio/Program.cs +++ b/PCK-Studio/Program.cs @@ -1,4 +1,5 @@ using System; +using System.Diagnostics; using System.IO; using System.Windows.Forms; @@ -6,16 +7,19 @@ namespace PckStudio { static class Program { - public static string BaseAPIUrl = "http://api.pckstudio.xyz/api/pck"; - public static string BackUpAPIUrl = "https://raw.githubusercontent.com/PhoenixARC/pckstudio.tk/main/studio/PCK/api/"; - public static string AppData = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "PCK-Studio"); - public static string AppDataCache = Path.Combine(AppData, "cache"); + public static readonly string BaseAPIUrl = "http://api.pckstudio.xyz/api/pck"; + public static readonly string BackUpAPIUrl = "https://raw.githubusercontent.com/PhoenixARC/pckstudio.tk/main/studio/PCK/api/"; + public static readonly string AppData = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "PCK-Studio"); + public static readonly string AppDataCache = Path.Combine(AppData, "cache"); /// /// The main entry point for the application. /// [STAThread] static void Main(string[] args) { +#if DEBUG + Debug.Listeners.Add(new TextWriterTraceListener(Console.Out)); +#endif var f = new MainForm(); if (args.Length > 0 && File.Exists(args[0]) && args[0].EndsWith(".pck")) f.LoadFromPath(args[0]);