diff --git a/CodeShowWeb/Index.aspx b/CodeShowWeb/Index.aspx index f1e4148..4d7d7bc 100644 --- a/CodeShowWeb/Index.aspx +++ b/CodeShowWeb/Index.aspx @@ -3,7 +3,7 @@
-
+
+ <%=GetCode() %>
+
+
+
-
+
<%=GetCode() %>
diff --git a/CodeShowWeb/Index.aspx.cs b/CodeShowWeb/Index.aspx.cs
index 01c80ba..d83fc43 100644
--- a/CodeShowWeb/Index.aspx.cs
+++ b/CodeShowWeb/Index.aspx.cs
@@ -17,25 +17,36 @@ namespace CodeShowWeb
public string GetCode()
{
- string CodeLang = GetLang();
+ string CodeLang = GetLangParam();
+
+ string CodeStr = "";
if (CodeLang == "Java")
{
- return new JavaCodeWrite().ModelToJavaCode("CoderEngine", "A");
+ CodeStr = new JavaCodeWrite().ModelToJavaCode("CoderEngine", "A");
}
else if (CodeLang == "Swift")
{
- return new SwiftCodeWrite().ModelToSwiftCode("CoderEngine", "A");
+ CodeStr = new SwiftCodeWrite().ModelToSwiftCode("CoderEngine", "A");
}
else if (CodeLang == "JavaScript")
{
- return new AjaxCodeWrite().ModelToAjaxCode("CoderEngine", "A");
+ CodeStr = new AjaxCodeWrite().ModelToAjaxCode("CoderEngine", "A");
+ }
+
+ else if (CodeLang == "CSharp")
+ {
+ CodeStr = new CSharpCodeWrite().ModelToCSCode("CoderEngine", "A");
}
- return "代码语言尚未支持";
+ //避免类似 List