private void Script_FormClosed(object pSender, FormClosedEventArgs pArgs) { ScriptForm script = pSender as ScriptForm; script.Packet.Selected = true; MainForm.StructureForm.ParseMaplePacket(script.Packet); Activate(); }
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))); }
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 } }
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))); }
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))); }
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))); }
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))); }
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))); }