public object GetValue(params object[] args) { XmlScenarioTable table = _component as XmlScenarioTable; int rowIndex = (int)args[0]; int colIndex = table.Columns(_columnName).Index; return(table.Cell(rowIndex, colIndex).Value); }
public void SetValue(params object[] args) { XmlScenarioTable table = _component as XmlScenarioTable; int rowIndex = XmlScenarioTable.ActiveRowIndex[table];// (int)args[0]; int colIndex = table.Columns(_columnName).Index; if (args.Length > 0) { table.Cell(rowIndex, colIndex).Value = args[0]; } else { throw new Exception("XmlTableMatchInfo.SetValue(value) 에 value가 없습니다."); } }
public virtual void LoadXml(XmlDocument xDoc, XmlNode rootNode, Boolean refLoad = false) { if (rootNode == null) { return; } _xDoc = xDoc; XmlControlHandler.GetDefaultXmlItemAttributes(rootNode, xDoc, this); _sendingParser = XmlGetter.Attribute(rootNode, "SendingParser"); _args = ValueParser.getArgs(XmlGetter.Attribute(rootNode, "Args")); _format = new XmlMatchFormat(); //초기값. foreach (XmlNode child in rootNode.ChildNodes) { if (child.Name.Equals("Format")) { XmlNode xFormat = child; _format = new XmlMatchFormat(); if (xFormat != null) { _format.LoadXml(xDoc, xFormat, refLoad); } } else { String comName = child.Name; string recentName = null; if (_recentTarget.ContainsKey(comName)) { recentName = _recentTarget[comName]; } if (comName.Equals("ScenarioTable")) { String targetName = XmlGetter.Attribute(child, "TargetName"); if (targetName.Length == 0) { if (recentName != null) { targetName = recentName; } else { throw new Exception("ScenarioTable 을 위한 TargetName이 정의되지 않았습니다."); } } IXmlComponent com = XmlControlHandler.GetComponentByName(targetName); //같은 타입에서는 여러번 TargetName을 쓰지 않아도 인식하도록.. if (com != null) { XmlScenarioTable table = com as XmlScenarioTable; if (table != null) { if (targetName.Length > 0) { _recentTarget[comName] = targetName;//모든 속성이 맞으면 등록.. } XmlTableMatchInfo info = new XmlTableMatchInfo(targetName, table); info.LoadXml(xDoc, child); _matchInfoItems.Add(info); _targetComponents.Add(com); String column = XmlGetter.Attribute(child, "ColumnName"); if (column.Length > 0) { if (table.ColumnNames.Contains(column)) { table.Columns(column).RelativeObject["XmlMatchData"] = XmlMatchData.NowLoading; } else { throw new Exception("XmlMatchComponent: Table[" + table.Name + "]에 Column[" + column + "] 이 없습니다."); } } } else { throw new Exception("targetName [" + targetName + "]은 ScenarioTable 이 아닙니다."); } } else { throw new Exception("TargetName [" + targetName + "] 은 배치되지 않았습니다."); } } } } }