private void mViewCommonScriptMenu_Click(object pSender, EventArgs pArgs) { string scriptPath = "Scripts" + 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; FiestaPacket packet = mPacketList.SelectedItems[0] as FiestaPacket; string scriptPath = "Scripts" + Path.DirectorySeparatorChar + "1" + 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))); }