Add Debug Listener and made Program variables readonly

This commit is contained in:
miku-666
2022-09-28 16:45:42 +02:00
parent f19aafaf56
commit 2a7d4ad139

View File

@@ -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");
/// <summary>
/// The main entry point for the application.
/// </summary>
[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]);