예제 #1
0
 /// <summary>
 /// Runs Elsword Directly.
 /// This is an blocking call that has to run in an separate thread from Els_kom's main thread.
 /// NEVER UNDER ANY CIRCUMSTANCES RUN THIS IN THE MAIN THREAD, YOU WILL DEADLOCK ELS_KOM!!!
 /// </summary>
 public static void RunElswordDirectly()
 {
     if (System.IO.File.Exists(System.Windows.Forms.Application.StartupPath + "\\Settings.ini"))
     {
         INIObject settingsini = new INIObject(System.Windows.Forms.Application.StartupPath + "\\Settings.ini");
         ElsDir = settingsini.Read("Settings.ini", "ElsDir");
         if (ElsDir.Length > 0)
         {
             if (System.IO.File.Exists(ElsDir + "\\data\\x2.exe"))
             {
                 RunningElswordDirectly = true;
                 Shell(ElsDir + "\\data\\x2.exe", "pxk19slammsu286nfha02kpqnf729ck", false, false, false, false, System.Diagnostics.ProcessWindowStyle.Normal, ElsDir + "\\data\\", true);
                 RunningElswordDirectly = false;
             }
             else
             {
                 MessageManager.ShowError("Can't find '" + ElsDir + "\\data\\x2.exe'. Make sure the File Exists and try to Test your mods Again!", "Error!");
             }
         }
         else
         {
             MessageManager.ShowError("The Elsword Directory Setting is not set. Make sure to Set your Elsword Directory Setting and try to Test your mods Again!", "Error!");
         }
     }
     else
     {
         MessageManager.ShowError("The Elsword Directory Setting is not set. Make sure to Set your Elsword Directory Setting and try to Test your mods Again!", "Error!");
     }
 }
예제 #2
0
 /// <summary>
 /// Runs Elsword Launcher.
 /// This is an blocking call that has to run in an separate thread from Els_kom's main thread.
 /// NEVER UNDER ANY CIRCUMSTANCES RUN THIS IN THE MAIN THREAD, YOU WILL DEADLOCK ELS_KOM!!!
 /// </summary>
 public static void RunElswordLauncher()
 {
     if (System.IO.File.Exists(System.Windows.Forms.Application.StartupPath + "\\Settings.ini"))
     {
         INIObject settingsini = new INIObject(System.Windows.Forms.Application.StartupPath + "\\Settings.ini");
         ElsDir = settingsini.Read("Settings.ini", "ElsDir");
         if (ElsDir.Length > 0)
         {
             if (System.IO.File.Exists(ElsDir + "\\voidels.exe"))
             {
                 RunningElsword = true;
                 Shell(ElsDir + "\\voidels.exe", "", false, false, false, false, System.Diagnostics.ProcessWindowStyle.Normal, ElsDir, true);
                 RunningElsword = false;
             }
             else
             {
                 if (System.IO.File.Exists(ElsDir + "\\elsword.exe"))
                 {
                     RunningElsword = true;
                     Shell(ElsDir + "\\elsword.exe", "", false, false, false, false, System.Diagnostics.ProcessWindowStyle.Normal, ElsDir, true);
                     RunningElsword = false;
                 }
                 else
                 {
                     MessageManager.ShowError("Can't find '" + ElsDir + "\\elsword.exe'. Make sure the File Exists and try to update Elsword Again!", "Error!");
                 }
             }
         }
         else
         {
             MessageManager.ShowError("The Elsword Directory Setting is not set. Make sure to Set your Elsword Directory Setting and try to update Elsword Again!", "Error!");
         }
     }
     else
     {
         MessageManager.ShowError("The Elsword Directory Setting is not set. Make sure to Set your Elsword Directory Setting and try to update Elsword Again!", "Error!");
     }
 }