Files
PCK-Studio/PCK-Studio/Program.cs
MattNL 6e3b88aa18 Removed restriction on file extension
LCE technically allows for any file to be opened regardless of file extension as long as it is a valid PCK file. Removing this allows advanced users to be creative with pack stylization
2026-01-25 14:07:00 -05:00

48 lines
1.8 KiB
C#

using System;
using System.Diagnostics;
using System.IO;
using System.Windows.Forms;
using PckStudio.Internal.App;
using System.Linq;
using PckStudio.Internal;
using PckStudio.Core.App;
using PckStudio.Properties;
namespace PckStudio
{
static class Program
{
internal static readonly Uri ProjectUrl = new Uri("https://github.com/PhoenixARC/-PCK-Studio");
internal static readonly Uri RawProjectUrl = new Uri("https://raw.githubusercontent.com/PhoenixARC/-PCK-Studio");
internal static readonly string BaseAPIUrl = "http://api.pckstudio.xyz/api/pck";
internal static readonly string BackUpAPIUrl = "https://raw.githubusercontent.com/PhoenixARC/pckstudio.tk/main/studio/PCK/api/";
internal static readonly string AppData = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), Application.ProductName);
internal static readonly string AppDataCache = Path.Combine(AppData, "cache");
internal static MainForm MainInstance { get; private set; }
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
Updater.Initialize(RawProjectUrl, Settings.Default.AutoUpdate);
ApplicationScope.Initialize();
Trace.TraceInformation("Startup");
RPC.Initialize();
MainInstance = new MainForm();
Updater.SetOwner(MainInstance);
if (args.Length > 0)
{
MainInstance.LoadPckFromFile(args.Where(arg => File.Exists(arg)));
}
Application.ApplicationExit += (sender, e) => { RPC.Deinitialize(); };
MainInstance.FocusMe();
Application.Run(MainInstance);
}
}
}