Inheritance: WeifenLuo.WinFormsUI.Docking.DockContent
Esempio n. 1
0
        private void Script_FormClosed(object pSender, FormClosedEventArgs pArgs)
        {
            ScriptForm script = pSender as ScriptForm;

            script.Packet.Selected = true;
            MainForm.StructureForm.ParseMaplePacket(script.Packet);
            Activate();
        }
Esempio n. 2
0
        private void mViewCommonScriptMenu_Click(object pSender, EventArgs pArgs)
        {
            var scriptPath = Helpers.GetCommonScriptPath(mLocale, mBuild);

            Helpers.MakeSureFileDirectoryExists(scriptPath);

            ScriptForm script = new ScriptForm(scriptPath, null);

            script.FormClosed += CommonScript_FormClosed;
            script.Show(DockPanel, new Rectangle(MainForm.Location, new Size(600, 300)));
        }
Esempio n. 3
0
        private void Script_FormClosed(object pSender, FormClosedEventArgs pArgs)
        {
            ScriptForm script = pSender as ScriptForm;

            script.Packet.Selected = true;
            try {
                MainForm.StructureForm.ParseFiestaPacket(script.Packet);
                Activate();
            } catch {
                // If Session Tab is closed, while Script window was opened from it and then closed, then we arrive here
            }
        }
Esempio n. 4
0
        private void mViewCommonScriptMenu_Click(object pSender, EventArgs pArgs)
        {
            string scriptPath = "Scripts" + Path.DirectorySeparatorChar + mLocale.ToString() + Path.DirectorySeparatorChar + mBuild.ToString() + Path.DirectorySeparatorChar + "Common.txt";

            if (!Directory.Exists(Path.GetDirectoryName(scriptPath)))
            {
                Directory.CreateDirectory(Path.GetDirectoryName(scriptPath));
            }
            ScriptForm script = new ScriptForm(scriptPath, null);

            script.FormClosed += CommonScript_FormClosed;
            script.Show(DockPanel, new Rectangle(MainForm.Location, new Size(600, 300)));
        }
Esempio n. 5
0
        private void mPacketList_ItemActivate(object pSender, EventArgs pArgs)
        {
            if (mPacketList.SelectedIndices.Count == 0)
            {
                return;
            }
            MaplePacket packet = mPacketList.SelectedItems[0] as MaplePacket;

            var scriptPath = Helpers.GetScriptPath(mLocale, mBuild, packet.Outbound, packet.Opcode);

            Helpers.MakeSureFileDirectoryExists(scriptPath);

            ScriptForm script = new ScriptForm(scriptPath, packet);

            script.FormClosed += Script_FormClosed;
            script.Show(DockPanel, new Rectangle(MainForm.Location, new Size(600, 300)));
        }
Esempio n. 6
0
        private void mPacketList_ItemActivate(object pSender, EventArgs pArgs)
        {
            if (mPacketList.SelectedIndices.Count == 0)
            {
                return;
            }
            FiestaPacket packet     = mPacketList.SelectedItems[0] as FiestaPacket;
            string       scriptPath = "Scripts" + Path.DirectorySeparatorChar + (packet.Outbound ? "Outbound" : "Inbound") + Path.DirectorySeparatorChar + "0x" + packet.Opcode.ToString("X4") + ".txt";

            if (!Directory.Exists(Path.GetDirectoryName(scriptPath)))
            {
                Directory.CreateDirectory(Path.GetDirectoryName(scriptPath));
            }
            ScriptForm script = new ScriptForm(scriptPath, packet);

            script.FormClosed += Script_FormClosed;
            script.Show(DockPanel, new Rectangle(MainForm.Location, new Size(600, 300)));
        }
Esempio n. 7
0
 private void mViewCommonScriptMenu_Click(object pSender, EventArgs pArgs)
 {
     string scriptPath = "Scripts" + Path.DirectorySeparatorChar + mLocale.ToString() + Path.DirectorySeparatorChar + mBuild.ToString() + Path.DirectorySeparatorChar + "Common.txt";
     if (!Directory.Exists(Path.GetDirectoryName(scriptPath))) Directory.CreateDirectory(Path.GetDirectoryName(scriptPath));
     ScriptForm script = new ScriptForm(scriptPath, null);
     script.FormClosed += CommonScript_FormClosed;
     script.Show(DockPanel, new Rectangle(MainForm.Location, new Size(600, 300)));
 }
Esempio n. 8
0
        private void mPacketList_ItemActivate(object pSender, EventArgs pArgs)
        {
            if (mPacketList.SelectedIndices.Count == 0) return;
            MaplePacket packet = mPacketList.SelectedItems[0] as MaplePacket;
            string scriptPath = "Scripts" + Path.DirectorySeparatorChar + mLocale.ToString() + Path.DirectorySeparatorChar + mBuild.ToString() + Path.DirectorySeparatorChar + (packet.Outbound ? "Outbound" : "Inbound") + Path.DirectorySeparatorChar + "0x" + packet.Opcode.ToString("X4") + ".txt";

            if (!Directory.Exists(Path.GetDirectoryName(scriptPath))) Directory.CreateDirectory(Path.GetDirectoryName(scriptPath));

            ScriptForm script = new ScriptForm(scriptPath, packet);
            script.FormClosed += Script_FormClosed;
            script.Show(DockPanel, new Rectangle(MainForm.Location, new Size(600, 300)));
        }