Esempio n. 1
0
 private void mViewCommonScriptMenu_Click(object pSender, EventArgs pArgs)
 {
     string scriptPath = "Scripts" + Path.DirectorySeparatorChar + _protocol.GetCommonScriptLocation();
     if (!Directory.Exists(Path.GetDirectoryName(scriptPath))) Directory.CreateDirectory(Path.GetDirectoryName(scriptPath));
     var script = new ScriptForm(scriptPath, null);
     script.FormClosed += CommonScript_FormClosed;
     script.Show(DockPanel, new Rectangle(MainForm.Location, new Size(600, 300)));
 }
Esempio n. 2
0
        private void mPacketList_ItemActivate(object pSender, EventArgs pArgs)
        {
            if (mPacketList.SelectedIndices.Count == 0) return;

            var packet = mPacketList.SelectedItems[0].Tag as _IBasePacket;

            string scriptPath = "Scripts" + Path.DirectorySeparatorChar + _protocol.GetScriptLocation(packet);
            if (!Directory.Exists(Path.GetDirectoryName(scriptPath))) Directory.CreateDirectory(Path.GetDirectoryName(scriptPath));

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