-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
259 lines (109 loc) · 5.41 KB
/
Program.cs
File metadata and controls
259 lines (109 loc) · 5.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
using System;
using System.CodeDom.Compiler;
using System.IO;
using Microsoft.CSharp;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
namespace TextCode
{
class Program : GlobalAttributes
{
[STAThread]
static void Main(string[] args)
{
//Specify the Path to the File Location you are about to create;
string fileLocation = @"C:\Users\USER\Documents\ARS\";
//specify the name of file and extention you are about to create or edit
string nameOfFile = "index.html";
//creating a path for the ARSharp.NET Framework
string path = $"{fileLocation}{nameOfFile}";
Console.WriteLine("<!DOCTYPE html>");
/* All ARSharp.Net Framework Code Begins from Here */
string style = "<style>" +
"body {" +
"font - family: Arial;" +
"margin: 0;" +
"}" +
".header {padding: 60px;" +
"text - align: center;" +
"background: #1abc9c;" +
"color: white;" +
"font - size: 30px;" +
"}" +
".content { padding: 20px; }" +
"</style> ";
//calling the Div Framework Tag
DivTag div = new DivTag();
//calling the Paragraph Framework Tag
ParagraphTag p = new ParagraphTag();
//calling the Paragraph Framework Tag
TitleTag title = new TitleTag();
BodyTag body = new BodyTag();
HeadTag head = new HeadTag();
HtmlTag html = new HtmlTag();
Header1Tag h1 = new Header1Tag();
//Main Code Starts here
html.lang = "en";
html.Open();
head.Open();
title.Open();
p.P("ARSharp.NET Frame Work Page");
title.Close();
//Frame work template has not been implemeted for any Console.WriteLines
Console.WriteLine("<meta charset = \"UTF - 8\">");
Console.WriteLine("<meta name=\"viewport\" content=\"width = device - width, initial - scale = 1\">");
// Console.WriteLine("<link rel=\"stylesheet\" type=\"text/css\" href=\"index.css\" media=\"screen\"/>");
Console.WriteLine(style);
head.Close();
body.Open();
div.classes = "header";
div.Open();
h1.H1("This is a Simple ARSharp Framework Page");
p.P("Built from Scratch using C#, Cool Init?");
div.Close();
div.classes = "content";
div.Open();
h1.H1("This is a Simple ARSharp Framework Page");
p.P("What i Know about evolving!");
h1.H1("You're welcome to the First ARSharp Frame Work Template");
p.P("I know you might be confused on what ASRSharp Means");
h1.H1("About ARSharp!");
p.P("ARShpart means Abandy Roosevelt Sharp for Web, inspired from the Microsoft C# and ASP.NET");
h1.H1("What does ARSharp Do?");
p.P("ARSharp is a framework for removing the abtraction of OOP and Clases directly from you face.");
p.P("One key thing of a programming language is ABSTRACTION, imagine calling a Paragraph Tag with just \"p.P()\", Cool!! I Know right?");
h1.H1("Future of ARSharp");
p.P("This project intends to build a fullstack webpage using the ARSharp framework, currently the local Command Prompt handles the Compiling;" +
" The Compiler?Translator is currently worked on, please do feel to contact me if you would like to contribute."
+ " The project intends to competite with .NET for Web and Jade or Pub (A JavaScript template engine)");
h1.H1("Contact");
p.P("Phone Number: +2348168187776");
p.P("Twitter: @dev_roosevelt");
p.P("LinkedIn: /rooseveltabandy");
p.P("Cheers!!! :)");
div.Close();
body.Close();
html.Close();
/* All ARSharp.Net Framework Ends Here
*Do not Edit Beyound this line :)
Thank you.
Don't even think about it!!!
High level warning
*/
System.Diagnostics.Process process = new System.Diagnostics.Process();
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
startInfo.FileName = "cmd.exe";
startInfo.Arguments = "/c TextCode.exe" + $"> {path}";
process.StartInfo = startInfo;
process.Start();
process.WaitForExit();
startInfo.RedirectStandardOutput = true;
startInfo.UseShellExecute = false;
startInfo.CreateNoWindow = true;
}
}
}