Example #1
0
        public EventCommandProvider(Dictionary <string, object> node)
        {
            Format = ProjectManager.Components[node["Format"] as string] as FormatProvider;

            Groups   = new Dictionary <string, EventCommandGroup>();
            Commands = new Dictionary <string, EventCommand>();

            var groups = node["EventCommands"] as System.Xml.XmlNodeList;

            foreach (System.Xml.XmlNode group in groups)
            {
                if (group.Name != "Group")
                {
                    continue;
                }

                EventCommandGroup item = new EventCommandGroup(group, this);
                Groups.Add(item.ID, item);

                foreach (var cmd in item.Commands)
                {
                    Commands.Add(cmd.Key, cmd.Value);
                }
            }
        }
Example #2
0
        public EventCommand(System.Xml.XmlNode node, EventCommandGroup group)
        {
            ID = node.Attributes["ID"].Value;
            Name = node.Attributes["Name"].Value;
            Group = group;
            if (node.Attributes["Format"] != null)
            {
                Format = group.Provider.Format.PrepareFormat(node.Attributes["Format"].Value);
            }
            else
                Format = Name;

            if (node.Attributes["GeneratedBy"] != null)
            {
                IsGenerated = true;
                GeneratedBy = node.Attributes["GeneratedBy"].Value;
            }
        }
Example #3
0
        public EventCommand(System.Xml.XmlNode node, EventCommandGroup group)
        {
            ID    = node.Attributes["ID"].Value;
            Name  = node.Attributes["Name"].Value;
            Group = group;
            if (node.Attributes["Format"] != null)
            {
                Format = group.Provider.Format.PrepareFormat(node.Attributes["Format"].Value);
            }
            else
            {
                Format = Name;
            }

            if (node.Attributes["GeneratedBy"] != null)
            {
                IsGenerated = true;
                GeneratedBy = node.Attributes["GeneratedBy"].Value;
            }
        }