AGS.Plugin.Lua.LuaForAGSEditorComponent.IEditorComponent C# (CSharp) Метод

IEditorComponent() публичный Метод

public IEditorComponent ( XmlNode node ) : void
node System.Xml.XmlNode
Результат void
        void IEditorComponent.FromXml(XmlNode node)
        {
            globalsTable.Clear();
            if (node != null)
            {
                XmlElement xmlLua = node["Lua"];
                if (xmlLua != null)
                {
                    /*
                    XmlElement rooms = lua["Rooms"];
                    if (rooms != null)
                    {
                        foreach (XmlNode roomNode in rooms.ChildNodes)
                        {
                            if (roomNode is XmlElement && roomNode.Name == "Room")
                            {
                                CachedRoomInfo roomInfo = new CachedRoomInfo((XmlElement)roomNode);
                                RoomInfoCache[roomInfo.Number] = roomInfo;
                            }
                        }
                    }
                    */
                    if (xmlLua.HasAttribute("Enabled"))
                    {
                        IsPluginEnabled = bool.Parse(xmlLua.GetAttribute("Enabled"));
                    }
                    if (xmlLua.HasAttribute("ShownEnableMessage"))
                    {
                        ShownEnableMessage = bool.Parse(xmlLua.GetAttribute("ShownEnableMessage"));
                    }
                    if (xmlLua.HasAttribute("ShownDisableMessage"))
                    {
                        ShownDisableMessage = bool.Parse(xmlLua.GetAttribute("ShownDisableMessage"));
                    }
                    XmlElement xmlLuaScriptFolderRoot = xmlLua["LuaScriptFolderRoot"];
                    if (xmlLuaScriptFolderRoot != null)
                    {
                        restoredScriptsInfo = xmlLuaScriptFolderRoot;
                    }
                    XmlElement xmlCompileTimeScripts = xmlLua["CompileTimeScripts"];
                    if (xmlCompileTimeScripts != null)
                    {
                        restoredCompileScripts = new List<string>();
                        foreach (XmlNode xmlScript in xmlCompileTimeScripts)
                        {
                            if (xmlScript.NodeType == XmlNodeType.Element && xmlScript.Name == "Script")
                            {
                                restoredCompileScripts.Add(xmlScript.InnerText);
                            }
                        }
                    }
                    else
                    {
                        restoredCompileScripts = null;
                    }
                    XmlElement xml_G = xmlLua["_G"];
                    if (xml_G != null)
                    {
                        MessageBox.Show(xml_G.OuterXml);
                        globalsTable.FromXml(xml_G);
                    }
                }
            }
        }

Same methods

LuaForAGSEditorComponent::IEditorComponent ( string controlID ) : IList
LuaForAGSEditorComponent::IEditorComponent ( ) : void
LuaForAGSEditorComponent::IEditorComponent ( XmlTextWriter writer ) : void
LuaForAGSEditorComponent::IEditorComponent ( string controlID ) : void
LuaForAGSEditorComponent::IEditorComponent ( string propertyName, object oldValue ) : void