示例#1
0
        private void ShowScript(string script, string title)
        {
            var viewer = new ScriptViewer
            {
                TextScript = { Text = script },
                Title      = title
            };

            viewer.Show();
        }
示例#2
0
        private void bScriptExplorer_Click(object sender, EventArgs e)
        {
            if (m_ScriptExplorer == null)
            {
                m_ScriptExplorer = new ScriptViewer();

                if (m_ScriptExplorer.GetFolderInfo())
                {
                    m_ScriptExplorer.Closed += m_ScriptExplorer_Closed;
                    m_ScriptExplorer.Show();
                }
                else
                {
                    m_ScriptExplorer.Dispose();
                    m_ScriptExplorer = null;
                }
            }
            else
            {
                m_ScriptExplorer.BringToFront();
            }
        }
示例#3
0
        private void scriptViewer_btn_Click(object sender, EventArgs e)
        {
            DatDigger.Sections.Script.LuaFile lf = new DatDigger.Sections.Script.LuaFile();
            lf.LoadFile(new BinaryReaderEx(File.OpenRead((string)charaSelector.SelectedNode.Tag)));
            if (lf == null)
            {
                Trace.TraceInformation("Not a valid LUA file.");
                return;
            }

            ScriptViewer sv = new ScriptViewer(lf);
            sv.Show();
        }