public LuaFunctionsForm(LuaDocumentation docs) { _docs = docs; InitializeComponent(); Icon = Properties.Resources.TextDocIcon; FunctionView.RetrieveVirtualItem += FunctionView_QueryItemText; }
private void InstallBizLuaToSublime2(LuaDocumentation docs) { var bizCompletions = Path.Combine(AppDataFolder, SublimeLuaPath, SublimeCompletionsFilename); var text = docs.ToSublime2CompletionList(); File.WriteAllText(bizCompletions, text); }
private void InstallBizLuaToNotepad(LuaDocumentation docs) { var bizAutocomplete = Path.Combine(AppDataFolder, NotepadPath, NotepadAutoCompleteFileName); var text = docs.ToNotepadPlusPlusAutoComplete(); // TODO //File.WriteAllText(bizCompletions, text); }
public void InstallBizLua(TextEditors editor, LuaDocumentation docs) { switch (editor) { case TextEditors.Sublime2: InstallBizLuaToSublime2(docs); break; case TextEditors.NotePad: InstallBizLuaToNotepad(docs); break; } }
public virtual void LuaRegister(Type callingLibrary, LuaDocumentation docs = null) { Lua.NewTable(Name); var luaAttr = typeof(LuaMethodAttributes); var methods = GetType() .GetMethods() .Where(m => m.GetCustomAttributes(luaAttr, false).Any()); foreach (var method in methods) { var luaMethodAttr = method.GetCustomAttributes(luaAttr, false).First() as LuaMethodAttributes; var luaName = Name + "." + luaMethodAttr.Name; Lua.RegisterFunction(luaName, this, method); if (docs != null) { docs.Add(new LibraryFunction(Name, callingLibrary.Description(), method)); } } }
public EmuLuaLibrary() { Docs = new LuaDocumentation(); }
public EmuLuaLibrary() { Docs = new LuaDocumentation(); _lua["keepalives"] = _lua.NewTable(); }
public EmuLuaLibrary() { Docs = new LuaDocumentation(); //if(NLua.Lua.WhichLua == "NLua") _lua["keepalives"] = _lua.NewTable(); }
public LuaFunctionsForm(LuaDocumentation docs) { _docs = docs; InitializeComponent(); FunctionView.RetrieveVirtualItem += FunctionView_QueryItemText; }