private void Paint(string txt, string title = "") { txt = txt.Replace("%H%", classname); txt = txt.Replace("%N%", classnameplural); txt = txt.Replace("%T%", idtype); txt = txt.Replace("%Z%", module); txt = txt.Replace("%z%", module.ToLower()); txt = txt.Replace("%h%", classname.ToLower()); txt = txt.Replace("%n%", classnameplural.ToLower()); txt = txt.Replace("%Y%", workspace); txt = txt.Replace("%Z1%", workspace); txt = txt.Replace("%P%", Stringer.Params(fields)); txt = txt.Replace("%V%", Stringer.Variables(fields)); txt = txt.Replace("%W%", Stringer.Variables(fields, "x")); txt = txt.Replace("%QJ%", Stringer.QueryJoins(fields)); txt = txt.Replace("%WT1%", Stringer.TableParams(fields, idtype, "SQLSERVER")); txt = txt.Replace("%WT2%", Stringer.TableParams(fields, idtype, "MYSQL")); txt = txt.Replace("%WT3%", Stringer.TableParams(fields, idtype, "POSTGRES")); txt = txt.Replace("%U%", Stringer.UpperVariables(fields)); txt = txt.Replace("%M%", Stringer.ModelVariables(fields)); txt = txt.Replace("%Q%", Stringer.QueryString(fields)); txt = txt.Replace("%F%", Stringer.Queryable(fields)); txt = txt.Replace("%F1%", Stringer.QueryableView(fields)); txt = txt.Replace("%FG%", Stringer.FactorMapper(fields)); txt = txt.Replace("%DV%", Stringer.DetailView(fields, formats)); txt = txt.Replace("%C%", Stringer.Properties(fields)); txt = txt.Replace("%C2%", Stringer.Properties(fields, 2)); txt = txt.Replace("%JM%", Stringer.JSModel(fields)); txt = txt.Replace("%TC%", Stringer.TableColumns(fields)); txt = txt.Replace("%J%", Stringer.JObjectHelper(fields)); txt = txt.Replace("%B%", Stringer.ViewBag(fields)); txt = txt.Replace("%D%", Stringer.Document(fields)); txt = txt.Replace("%G%", Stringer.Paginator(fields)); txt = txt.Replace("%TR%", Stringer.TableHeader(fields)); txt = txt.Replace("%TD%", Stringer.TableRow(fields)); txt = txt.Replace("%MM1%", Stringer.MigrationMapper(fields)); txt = txt.Replace("%MM2%", Stringer.MigrationMapper(fields, 2)); txt = txt.Replace("%SR%", Stringer.SearchFields(fields, formats)); txt = txt.Replace("%S%", Stringer.SaveFields(fields, formats)); txt = txt.Replace("'", "\""); txt = txt.Replace("`", "'"); code.AppendLine(title); code.AppendLine(txt); code.AppendLine(""); code.AppendLine("-------------------------------------------------"); code.AppendLine(""); }
private void Paint(string txt, string title = "") { txt = txt.Replace("%H%", v1); txt = txt.Replace("%N%", v2); txt = txt.Replace("%T%", v3); txt = txt.Replace("%Z%", v5); txt = txt.Replace("%z%", v5.ToLower()); txt = txt.Replace("%h%", v1.ToLower()); txt = txt.Replace("%n%", v2.ToLower()); txt = txt.Replace("%P%", Stringer.Params(fields)); txt = txt.Replace("%V%", Stringer.Variables(fields)); txt = txt.Replace("%W%", Stringer.Variables(fields, "x")); txt = txt.Replace("%WT1%", Stringer.TableParams(fields, v3, "SQLSERVER")); txt = txt.Replace("%WT2%", Stringer.TableParams(fields, v3, "MYSQL")); txt = txt.Replace("%WT3%", Stringer.TableParams(fields, v3, "POSTGRES")); txt = txt.Replace("%U%", Stringer.UpperVariables(fields)); txt = txt.Replace("%M%", Stringer.ModelVariables(fields)); txt = txt.Replace("%Q%", Stringer.QueryString(fields)); txt = txt.Replace("%F%", Stringer.Queryable(fields)); txt = txt.Replace("%F1%", Stringer.QueryableView(fields)); txt = txt.Replace("%FG%", Stringer.FactorMapper(fields)); txt = txt.Replace("%DV%", Stringer.DetailView(fields, formats)); txt = txt.Replace("%C%", Stringer.Properties(fields)); txt = txt.Replace("%JM%", Stringer.JSModel(fields)); txt = txt.Replace("%TC%", Stringer.TableColumns(fields)); txt = txt.Replace("%J%", Stringer.JObjectHelper(fields)); txt = txt.Replace("%B%", Stringer.ViewBag(fields)); txt = txt.Replace("%D%", Stringer.Document(fields)); txt = txt.Replace("%G%", Stringer.Paginator(fields)); txt = txt.Replace("%TR%", Stringer.TableHeader(fields)); txt = txt.Replace("%TD%", Stringer.TableRow(fields)); txt = txt.Replace("%SR%", Stringer.SearchFields(fields, formats)); txt = txt.Replace("%S%", Stringer.SaveFields(fields, formats)); txt = txt.Replace("'", "\""); txt = txt.Replace("`", "'"); code.AppendLine(title); code.AppendLine(txt); code.AppendLine(""); code.AppendLine("-------------------------------------------------"); code.AppendLine(""); }