2020-01-27 20:03:44 +08:00
|
|
|
|
using CodeWalker.GameFiles;
|
|
|
|
|
using CodeWalker.Properties;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Diagnostics;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Windows.Forms;
|
2023-10-28 03:31:09 +08:00
|
|
|
|
using CodeWalker.Utils;
|
2023-11-12 01:59:17 +08:00
|
|
|
|
using CodeWalker.Core.Utils;
|
2024-01-07 02:41:10 +08:00
|
|
|
|
using System.Diagnostics.Tracing;
|
|
|
|
|
using System.Threading;
|
2020-01-27 20:03:44 +08:00
|
|
|
|
|
|
|
|
|
namespace CodeWalker.RPFExplorer
|
|
|
|
|
{
|
|
|
|
|
static class Program
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The main entry point for the application.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[STAThread]
|
|
|
|
|
static void Main()
|
|
|
|
|
{
|
2023-11-12 01:59:17 +08:00
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
if (!NamedPipe.TrySendMessageToOtherProcess("explorer"))
|
|
|
|
|
{
|
2024-01-07 02:41:10 +08:00
|
|
|
|
CodeWalker.Program.LoadConfig();
|
2023-11-12 01:59:17 +08:00
|
|
|
|
ConsoleWindow.Hide();
|
|
|
|
|
//Process.Start("CodeWalker.exe", "explorer");
|
|
|
|
|
Application.EnableVisualStyles();
|
|
|
|
|
Application.SetCompatibleTextRenderingDefault(false);
|
|
|
|
|
|
|
|
|
|
var form = new ExploreForm();
|
|
|
|
|
var namedPipe = new NamedPipe(form);
|
2024-01-07 02:41:10 +08:00
|
|
|
|
namedPipe.StartServer();
|
2023-11-12 01:59:17 +08:00
|
|
|
|
|
|
|
|
|
Application.Run(form);
|
|
|
|
|
|
|
|
|
|
GTAFolder.UpdateSettings();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch(Exception ex)
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine(ex.ToString());
|
|
|
|
|
throw;
|
|
|
|
|
}
|
|
|
|
|
|
2020-01-27 20:03:44 +08:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|