private void ShowScript(string script, string title) { var viewer = new ScriptViewer { TextScript = { Text = script }, Title = title }; viewer.Show(); }
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(); } }
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(); }