示例#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;
                }
            }
        }
示例#2
0
        // Handles Testing Mods on the Main Form (before Elsword is executed).
        private void TestMods()
        {
            this.Command1.Enabled = false;
            this.Command2.Enabled = false;
            this.Command4.Enabled = false;
            this.Command5.Enabled = false;
            this.packToolStripMenuItem.Enabled     = false;
            this.unpackToolStripMenuItem.Enabled   = false;
            this.testModsToolStripMenuItem.Enabled = false;
            this.launcherToolStripMenuItem.Enabled = false;
            var di = new DirectoryInfo(Application.StartupPath + "\\koms");

            foreach (var fi in di.GetFiles("*.kom"))
            {
                var kom_file = fi.Name;

                // do not copy kom files that are in the koms directory but cannot be found to copy from taget directory to the backup directory to restore later.
                KOMManager.CopyKomFiles(kom_file, Application.StartupPath + "\\koms\\", this.elsDir + "\\data");
            }

            var tr3 = new Thread(ExecutionManager.RunElswordDirectly)
            {
                Name = "Classes.ExecutionManager.RunElswordDirectly",
            };

            tr3.Start();
            this.testModsTmr.Enabled = true;
        }
示例#3
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;
                }
            }
        }
示例#4
0
        // Handles Testing Mods on the Main Form (before Elsword is executed).
        private void TestMods()
        {
            this.SetControlState(false, "Testing Mods...", "Testing Mods...");
            var di = new DirectoryInfo(Application.StartupPath + "\\koms");

            foreach (var fi in di.GetFiles("*.kom"))
            {
                var kom_file = fi.Name;

                // do not copy kom files that are in the koms directory but cannot be found to copy from taget directory to the backup directory to restore later.
                KOMManager.CopyKomFiles(kom_file, Application.StartupPath + "\\koms\\", this.elsDir + "\\data");
            }

            var tr3 = new Thread(ExecutionManager.RunElswordDirectly)
            {
                Name = nameof(ExecutionManager.RunElswordDirectly),
            };

            tr3.Start();
            this.testModsTmr.Enabled = true;
        }