public override string ToString() { if (xml.El.Name != elName) { xml.El = xml.findLast(elName); } xml.addXElement(elName, new Dictionary <string, string> { { "Name", "" }, { "Value", val }, { "Type", uts.ToString() }, { "Group", group }, { "Comment", comment } }); return(xml.El.ToString()); }
/// <summary> /// 从字节大小构建 /// </summary> public FileLen(long len) { Len = len; int i = 0; Num = len; while (len >= 1024 && i <= (int)(units.DB)) { Num = len / 1024f; len = (int)Num; i++; } Ext = (units)i; Str = Num.ToString("F2") + " " + Ext.ToString(); }