public override string ToString() { StringBuilder sb = new StringBuilder(); if (inputs.getInput_atIndex(0) == null || inputs.getInput_atIndex(1) == null) { sb.Append(""); } else { switch (logicType) { case BasicLogic.AND: sb.Append(string.Format("{0," + TabTool.numberOfSpaces() + "}", inputs.getInput_atIndex(0).ToString())); sb.Append(" ADD " + inputs.getInput_atIndex(1).ToString() + " "); break; case BasicLogic.OR: sb.Append(string.Format("{0," + TabTool.numberOfSpaces() + "}", inputs.getInput_atIndex(0).ToString())); sb.Append(" OR " + inputs.getInput_atIndex(1).ToString() + " "); break; default: break; } } return(sb.ToString()); }
public override string ToString() { StringBuilder sb = new StringBuilder(""); if (inputs.getInput_atIndex(1) == null) { sb.AppendLine(string.Format("{0," + TabTool.numberOfSpaces() + "}", "SELECT *")); } else { sb.AppendLine(string.Format("{0," + TabTool.numberOfSpaces() + "}", "SELECT " + inputs.getInput_atIndex(1).ToString())); } if (inputs.getInput_atIndex(0) == null) { sb.Append(string.Format("{0," + TabTool.numberOfSpaces() + "}", "FROM error:NoT")); } else { sb.Append(string.Format("{0," + TabTool.numberOfSpaces() + "}", "FROM " + inputs.getInput_atIndex(0).ToString())); } if (inputs.getInput_atIndex(2) != null) { sb.AppendLine(); sb.Append(string.Format("{0," + TabTool.numberOfSpaces() + "}", inputs.getInput_atIndex(2).ToString())); } return(sb.ToString()); }
public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append(string.Format("{0," + TabTool.numberOfSpaces() + "}", "WHERE ")); if (inputs.getInput_atIndex(0) != null) { if (inputs.getInput_atIndex(0).output_dataType == VidData_Type.DATABASE_COL) { sb.Append(inputs.getInput_atIndex(0).ToString()); if (inFlag) { sb.Append(" IN \n"); } else if (likeFlag) { sb.Append(" LIKE \n"); } } else { sb.Append("( \n"); TabTool.tabindex++; sb.Append(string.Format("{0," + TabTool.numberOfSpaces() + "}", inputs.getInput_atIndex(0).ToString())); TabTool.tabindex--; sb.Append(string.Format("{0," + TabTool.numberOfSpaces() + "}", ") \n")); } } else { if (isEXISTS) { sb.AppendLine("EXISTS"); } else { sb.AppendLine("NOT EXISTS"); } } if (inputs.getInput_atIndex(1) != null) { sb.AppendLine(string.Format("{0," + TabTool.numberOfSpaces() + "}", "(")); TabTool.tabindex++; sb.AppendLine(string.Format("{0," + TabTool.numberOfSpaces() + "}", inputs.getInput_atIndex(1).ToString())); TabTool.tabindex--; sb.Append(string.Format("{0," + TabTool.numberOfSpaces() + "}", ")")); } return(sb.ToString()); }
// Use this for initialization void Start() { StringBuilder sb = new StringBuilder(); for (int i = 0; i < 3; i++) { sb.AppendLine(string.Format("{0," + TabTool.numberOfSpaces() + "}", "public void Bob()")); TabTool.tabindex++; sb.AppendLine(string.Format("{0," + TabTool.numberOfSpaces() + "} {1,10}", ":1", ":2")); for (int x = 0; x < 3; x++) { sb.AppendLine(string.Format("{0," + TabTool.numberOfSpaces() + "} {1,10}", ":1", ":2")); } TabTool.tabindex--; } t.text = sb.ToString(); }