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;
            }
        }
示例#5
0
		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));
				}
			}
		}
示例#6
0
 public EmuLuaLibrary()
 {
     Docs = new LuaDocumentation();
 }
示例#7
0
 public EmuLuaLibrary()
 {
     Docs = new LuaDocumentation();
     _lua["keepalives"] = _lua.NewTable();
 }
示例#8
0
 public EmuLuaLibrary()
 {
     Docs = new LuaDocumentation();
     //if(NLua.Lua.WhichLua == "NLua")
     _lua["keepalives"] = _lua.NewTable();
 }
示例#9
0
 public EmuLuaLibrary()
 {
     Docs = new LuaDocumentation();
 }
示例#10
0
 public LuaFunctionsForm(LuaDocumentation docs)
 {
     _docs = docs;
     InitializeComponent();
     FunctionView.RetrieveVirtualItem += FunctionView_QueryItemText;
 }