mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-06-01 19:04:50 +00:00
Moved RPC init/deinit to Program file
This commit is contained in:
@@ -61,6 +61,9 @@
|
||||
<setting name="LoadSubPcks" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="ShowRichPresence" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
</PckStudio.Properties.Settings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
|
||||
@@ -121,7 +121,6 @@ namespace PckStudio
|
||||
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
RPC.Initialize();
|
||||
UpdateRPC();
|
||||
|
||||
skinToolStripMenuItem1.Click += (sender, e) => setFileType_Click(sender, e, PckFile.FileData.FileType.SkinFile);
|
||||
@@ -148,7 +147,6 @@ namespace PckStudio
|
||||
private void FormMain_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
checkSaveState();
|
||||
RPC.Deinitialize();
|
||||
}
|
||||
|
||||
private void openToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using PckStudio.Classes.Misc;
|
||||
|
||||
namespace PckStudio
|
||||
{
|
||||
@@ -21,12 +22,13 @@ namespace PckStudio
|
||||
[STAThread]
|
||||
static void Main(string[] args)
|
||||
{
|
||||
System.Globalization.CultureInfo.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture;
|
||||
ApplicationScope.Initialize();
|
||||
RPC.Initialize();
|
||||
MainInstance = new MainForm();
|
||||
if (args.Length > 0 && File.Exists(args[0]) && args[0].EndsWith(".pck"))
|
||||
MainInstance.LoadPckFromFile(args[0]);
|
||||
Application.Run(MainInstance);
|
||||
RPC.Deinitialize();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user