Skip to content

Commit 206fff2

Browse files
Converter Example Testing
1 parent 21bc035 commit 206fff2

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

Test-Environment/Program.cs

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
using EZCode.Converter;
2+
13
namespace TestEnvironment
24
{
35
internal static class Program
@@ -11,7 +13,32 @@ static void Main()
1113
// To customize application configuration such as set high DPI settings or default font,
1214
// see https://aka.ms/applicationconfiguration.
1315
ApplicationConfiguration.Initialize();
14-
Application.Run(new ConverterExample());
16+
//Application.Run(new ConverterExample());
17+
18+
Converter converter = new Converter();
19+
string all = converter.Convert(
20+
"""
21+
window Wind new : x:50, y:60, w:100, h:100, t:text, minwidth:50, maxwidth:50, tert:dfs, icon:C\;/Users/jlham/OneDrive/Desktop/EZCode_Logos/Normal/EZCode_Logo.ico
22+
shape shp x:50, y:50
23+
label lb t:TEXT
24+
textbox tb x:50, y:25, t:TEXT
25+
button btn t:TEXT, y:25
26+
Wind display shp
27+
Wind display lb
28+
Wind display tb
29+
Wind display btn
30+
31+
Wind open
32+
Wind change : w:600
33+
""", Converter.ProgrammingLanguage.Python, out Converter.ProgramFile[] files);
34+
35+
for (int i = 0; i < files.Length; i++)
36+
{
37+
File.WriteAllText(Path.Combine("D:\\Python\\ezcode\\Conv", files[i].Name), files[i].Content);
38+
}
39+
File.WriteAllText(Path.Combine("D:\\Python\\ezcode\\Conv", "All.py"), all);
40+
41+
Application.Exit();
1542
}
1643
}
1744
}

0 commit comments

Comments
 (0)