public override bool IsTableObjectDependOn(vdPrimary table) { //we call only the base check because there are not tables objects reference to this object properties. if (Deleted) { return(false); } if (base.IsTableObjectDependOn(table)) { return(true); } return(false); }
public override bool IsTableObjectDependOn(vdPrimary table) { if (Deleted) { return(false); //always check if this object is deleted } if (base.IsTableObjectDependOn(table)) { return(true); //always check the base implamentation } //check properties of object that reference the table object. if (TextStyle != null && object.ReferenceEquals(TextStyle, table)) { return(true); } return(false); }
private string GetFigurePropByName(vdPrimary vdp, string propName) { if (vdp == null) { return(null); } if (string.IsNullOrEmpty(vdp.Props)) { return(null); } var propStrings = vdp.Props.Split(new char[2] { '\r', '\n' }); foreach (var propStr in propStrings) { if (string.IsNullOrEmpty(propStr)) { continue; } var index = propStr.IndexOf('='); if (index < 0) { continue; } var name = propStr.Substring(0, index); var prop = propStr.Substring(index + 1, propStr.Length - index - 1); if (string.Compare(propName, name) == 0) { return(prop); } } return(null); }
private void AddXPropertiesToEntity(Dictionary <string, List <PropertyData> > dictProperty, vdPrimary vdf) { StringBuilder sb = new StringBuilder(); foreach (string groupName in dictProperty.Keys) { List <PropertyData> listData = dictProperty[groupName]; sb.Append(groupName + "=" + _gPropertyGroupSeparator + "\r\n"); foreach (PropertyData prop in listData) { var propValue = string.IsNullOrEmpty(prop.Value) ? "" : prop.Value; sb.Append(prop.Name + "=" + propValue + "\r\n"); } } vdf.Props = sb.ToString(); }