void InitCodeGenerate() { int longestNameLength = (from x in FieldsList select x.Name.Length).Max(); int longestTypeLength = (from x in FieldsList select x.Type.Length).Max(); longestTypeLength++; longestNameLength++; CodeGenerate = new CodeGenerateHelper { IndentGlobalValue = 0 }; CodeGenerate.AddColumnAlignInt("Type", longestTypeLength); CodeGenerate.AddColumnAlignInt("FieldName", longestNameLength); }
void InitCodeGenerate() { int longestF1Length = (from x in RelationsList select x.Field1.Length).Max(); int longestF2Length = (from x in RelationsList select x.Field2.Length).Max(); longestF1Length++; longestF2Length++; CodeGenerate = new CodeGenerateHelper { IndentGlobalValue = 0 }; CodeGenerate.AddColumnAlignInt("Field1", longestF1Length); CodeGenerate.AddColumnAlignInt("Field2", longestF2Length); CodeGenerate.AddColumnAlignInt("Table", Math.Max(Math.Max(Table1.Length, Table2.Length), "QueryBuildDataSource".Length)); }
void InitCodeGenerate() { int longestNameLength = FieldsList.Count > 0 ? (from x in FieldsList select x.Name.Length).Max() : 10; int longestTypeLength = FieldsList.Count > 0 ? (from x in FieldsList select x.Type.Length).Max() : 10; longestTypeLength = Math.Max("DialogField".Length, longestTypeLength); longestTypeLength++; longestNameLength += 2; CodeGenerate = new CodeGenerateHelper { IndentGlobalValue = 0 }; CodeGenerate.AddColumnAlignInt("Type", longestTypeLength); CodeGenerate.AddColumnAlignInt("FieldName", longestNameLength); CodeGenerate.AddColumnAlignInt("DlgName", longestNameLength + 2); }