Exemplo n.º 1
0
        // Handles Testing Mods on the Main Form (when Elsword (the game window) closes).
        private void TestMods2(object sender, EventArgs e)
        {
            if (!ProcessExtensions.Executing)
            {
                if (ExecutionManager.RunningElswordDirectly)
                {
                    KOMManager.DeployCallBack(ExecutionManager.RunningElswordDirectly);
                }
                else
                {
                    var di = new DirectoryInfo(Application.StartupPath + "\\koms");
                    foreach (var fi in di.GetFiles("*.kom"))
                    {
                        var kom_file = fi.Name;
                        KOMManager.MoveOriginalKomFilesBack(kom_file, this.elsDir + "\\data\\backup", this.elsDir + "\\data");
                    }

                    this.SetControlState(true, string.Empty, this.Text);

                    // restore window state from before testing mods.
                    this.WindowState = FormWindowState.Normal;
                    this.Show();
                    this.Activate();
                    this.testModsTmr.Enabled = false;
                }
            }
        }
Exemplo n.º 2
0
        // Handles Testing Mods on the Main Form (when Elsword (the game window) closes).
        private void TestMods2(object sender, EventArgs e)
        {
            var executing = ProcessExtensions.Executing;

            if (!executing)
            {
                if (ExecutionManager.RunningElswordDirectly)
                {
                    KOMManager.DeployCallBack(ExecutionManager.RunningElswordDirectly);
                    if (string.Equals(this.Label2.Text, string.Empty))
                    {
                        this.Label2.Text = "Testing Mods...";
                    }
                }
                else
                {
                    var di = new DirectoryInfo(Application.StartupPath + "\\koms");
                    foreach (var fi in di.GetFiles("*.kom"))
                    {
                        var kom_file = fi.Name;
                        KOMManager.MoveOriginalKomFilesBack(kom_file, this.elsDir + "\\data\\backup", this.elsDir + "\\data");
                    }

                    this.Command1.Enabled = true;
                    this.Command2.Enabled = true;
                    this.Command4.Enabled = true;
                    this.Command5.Enabled = true;
                    this.packToolStripMenuItem.Enabled     = true;
                    this.unpackToolStripMenuItem.Enabled   = true;
                    this.testModsToolStripMenuItem.Enabled = true;
                    this.launcherToolStripMenuItem.Enabled = true;
                    this.Label2.Text = string.Empty;

                    // restore window state from before testing mods.
                    this.WindowState = FormWindowState.Normal;
                    this.Show();
                    this.Activate();
                    this.testModsTmr.Enabled = false;
                }
            }
        }