public override void HandleAttribute(string attribute, string value) { switch (attribute) { case ConstInterface.MG_ATTR_CALLINGTASK: _callingTaskTag = value; break; case ConstInterface.MG_ATTR_PATH_PARENT_TASK: _pathParentTaskTag = value; break; case ConstInterface.MG_ATTR_SUBFORM_CTRL: _subformCtrlName = value; break; case XMLConstants.MG_ATTR_DITIDX: _ditIdx = XmlParser.getInt(value); break; case ConstInterface.MG_ATTR_MODAL: _isModal = (value[0] == '1'); break; case ConstInterface.MG_ATTR_TRANS_OWNER: _transOwner = value; break; case ConstInterface.MG_ATTR_NEWID: _newId = value.TrimEnd(' '); break; case ConstInterface.MG_ATTR_KEY: _key = value; break; case ConstInterface.MG_ATTR_ARGLIST: _varList = new ArgumentsList(); _varList.fillList(value, (Task)MGDataCollection.Instance.GetTaskByID(TaskTag)); break; case ConstInterface.MG_ATTR_OBJECT: Obj = value; break; default: base.HandleAttribute(attribute, value); break; } }
public void HandleAttribute(string attribute, string valueStr) { switch (attribute) { case XMLConstants.MG_ATTR_TASKID: TaskTag = valueStr; break; case ConstInterface.MG_ATTR_HANDLERID: { int i = valueStr.IndexOf(","); string handlerId = i > -1 ? valueStr.Substring(i + 1) : valueStr; _handlerId = handlerId; } break; case ConstInterface.MG_ATTR_OBJECT: Obj = valueStr; break; case ConstInterface.MG_ATTR_MESSAGE: XmlParser.unescape(valueStr); break; case ConstInterface.MG_ATTR_HTML: _html = XmlParser.unescape(valueStr); break; case ConstInterface.MG_ATTR_MODAL: _isModal = (valueStr[0] == '1'); break; case ConstInterface.MG_ATTR_URL: _url = XmlParser.unescape(valueStr); break; case ConstInterface.MG_ATTR_SRCTASK: break; case XMLConstants.MG_ATTR_VALUE: _val = XmlParser.unescape(valueStr); break; case ConstInterface.MG_ATTR_CALLINGTASK: _callingTaskTag = valueStr; break; case ConstInterface.MG_ATTR_PATH_PARENT_TASK: _pathParentTaskTag = valueStr; break; case ConstInterface.MG_ATTR_ARGLIST: _varList = new ArgumentsList(); _varList.fillList(valueStr, (Task)MGDataTable.Instance.GetTaskByID(TaskTag)); break; case ConstInterface.MG_ATTR_TEXT: _text = XmlParser.unescape(valueStr); break; case ConstInterface.MG_ATTR_TITLE: _title = valueStr; break; case ConstInterface.MG_ATTR_IMAGE: _image = valueStr[0]; break; case ConstInterface.MG_ATTR_BUTTONS: _buttonsID = valueStr[0]; break; case ConstInterface.MG_ATTR_DEFAULT_BUTTON: _defaultButton = XmlParser.getInt(valueStr); break; case ConstInterface.MG_ATTR_RETURN_VAL: _returnValStr = valueStr; break; case ConstInterface.MG_ATTR_ERR_LOG_APPEND: _errLogAppend = XmlParser.getBoolean(valueStr); break; case ConstInterface.MG_ATTR_DISPLAY: _display = valueStr[0]; break; case ConstInterface.MG_ATTR_MODE: _mode = valueStr[0]; break; case ConstInterface.MG_ATTR_ACK: _sendAck = (XmlParser.getInt(valueStr) != 0); break; case ConstInterface.MG_ATTR_NULL: _isNull = (XmlParser.getInt(valueStr) == 1); break; case ConstInterface.MG_ATTR_PAR_ATTRS: _attr = (StorageAttribute)valueStr[0]; break; case ConstInterface.MG_ATTR_OLDID: _oldId = StrUtil.rtrim(valueStr); break; case ConstInterface.MG_ATTR_NEWID: _newId = StrUtil.rtrim(valueStr); break; case ConstInterface.MG_ATTR_TOP: XmlParser.getInt(valueStr); break; case ConstInterface.MG_ATTR_LEFT: XmlParser.getInt(valueStr); break; case ConstInterface.MG_ATTR_WIDTH: XmlParser.getInt(valueStr); break; case ConstInterface.MG_ATTR_HEIGHT: XmlParser.getInt(valueStr); break; case ConstInterface.MG_ATTR_LEN: _htmlLen = XmlParser.getInt(valueStr); break; case ConstInterface.MG_ATTR_ENCRYPT: _encryptXML = (XmlParser.getInt(valueStr) == 1); break; case ConstInterface.MG_ATTR_SCAN: _htmlScan = (XmlParser.getInt(valueStr) == 1); break; case ConstInterface.MG_ATTR_STANDALONE: _standalone = (XmlParser.getInt(valueStr) == 1); break; case ConstInterface.MG_ATTR_KEY: _key = valueStr; break; case XMLConstants.MG_ATTR_DITIDX: _ditIdx = XmlParser.getInt(valueStr); break; case ConstInterface.MG_ATTR_TRANS_OWNER: _transOwner = valueStr; break; case ConstInterface.MG_ATTR_SUBFORM_CTRL: _subformCtrlName = valueStr; break; // code to be used when RangeAdd is called on the server, with a local data field case ConstInterface.MG_ATTR_FIELD_INDEX: // temporary code! will be moved to a factory if (UserRange == null) { UserRange = new UserRange() { nullMin = true, nullMax = true } } ; UserRange.veeIdx = XmlParser.getInt(valueStr); break; case ConstInterface.MG_ATTR_MIN_VALUE: UserRange.min = valueStr; UserRange.nullMin = false; break; case ConstInterface.MG_ATTR_MAX_VALUE: UserRange.max = valueStr; UserRange.nullMax = false; break; // end of RangeAdd code default: Logger.Instance.WriteErrorToLog( "There is no such tag in Command class. Insert case to Command.initElements for " + attribute); break; } }