public XWPKeyCommand(XElement XElement, bool Obrigatory)
        {
            XmlLinqElementReader reader = new XmlLinqElementReader(XElement, XOApplication.xmlReaderLog);

            string keyAttr = reader.ReadAttribute("key", Obrigatory);

            if (!string.IsNullOrEmpty(keyAttr))
            {
                _keys = keyAttr.Split(';').Select(p => new XWPKey(this, p)).ToArray();
            }
            else
            {
                _keys = new XWPKey[] { };
            }
            
            _command = reader.ReadAttributeEnum("command", XWPKeyCommandType.none);

            if (_command == XWPKeyCommandType.none)
                XmlLinqReaderLog.WriteToLog(XOApplication.xmlReaderLog, XElement, "command", "Command can't have None type. It will be omitted.", false);

            _keyContexts = reader.GetChildren("KeyContext", Range.NotBound).Select(p => new XWPKeyCommandContext(this, p)).ToArray();

        }
Example #2
0
 internal XOKey(XWPKey XWPKey)
 {
     _xwpKey = XWPKey;
 }