Source file content:
Using system.drawing; using system.componentmodel; using system.windows.form; using system.data ;. using system.data ;. USING SYSTEM.
A summary description of Namespace Wzy2 {///
Private system.windows.Forms.Button Button1; Private System.windows.Forms.Button Button2; Private System.Windows.Forms.Button Button3;
Private system.windows.forms.richtextbox richtextbox1; private system.windows.forms.richtextbox richtextbox2;
Private system.windows.forms.openfiledialog openfiledialog1; private system.windows.Forms.savefiledialog savefiledialog1; ///
Public Form1 () {// // Windows Form Designer Support for // InitializeComponent ();
// // Todo: Add any constructor code after INITIALIZEComponent call //}
///
#REGION Windows Form Designer The code ///
/// summary> private void initializecomponent () {this.label1 = new system.windows.forms.label (); this.button1 = new system.windows.forms.button (); this.richtextbox1 = new system. Windows.Forms.RichTextBox (); this.button2 = new System.Windows.Forms.Button (); this.richTextBox2 = new System.Windows.Forms.RichTextBox (); this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog (); This.savefiledialog1 = new system.windows.Forms.savefileDialog (); this.button3 = new system.windows.Forms.Button (); this.suspendlayout (); // // label1 // this.label1. Location = new system.drawing.point (8, 8); this.label1.name = "label1"; this.label1.size = new system.drawing.size (72, 24); this.label1.tabindex = 0; THIS.Label1.Text = "Specious Analysis"; // // Button1 // this.Button1.Location = New System.drawing.Point (240, 8); this.Button1.name = "Button1"; this.button1. Size = new system.drawing.size (64, 23); this.button1.tabindex = 1; this.button1.text = "Analysis"; t his.button1.Click = new System.EventHandler (this.button1_Click); // // richTextBox1 // this.richTextBox1.Location = new System.Drawing.Point (24, 48); this.richTextBox1.Name = "richTextBox1 "; this.richTextBox1.Size = new System.Drawing.Size (240, 352); this.richTextBox1.TabIndex = 2; this.richTextBox1.Text =" "; // this.richTextBox1.TextChanged = new System.EventHandler (this.RichtextBox1_textchanged); // // Button2 // this.button2.location = new system.drawing.point (96, 8); this.button2.name = "button2"; this.button2.size =
New system.drawing.size (64, 23); this.button2.tabindex = 3; this.button2.text = "Read"; this.button2.click = new system.eventhandler (this.button2_click); // // richTextBox2 // this.richTextBox2.Location = new System.Drawing.Point (280, 48); this.richTextBox2.Name = "richTextBox2"; this.richTextBox2.Size = new System.Drawing.Size (280, 352) "This.richtextbox2.tabindex = 4; this.richtextbox2.text =" "; /// button3 // this.button3.Location = new system.drawing.point (384, 8); this.button3.name =" Button3 "; this.button3.size = new system.drawing.size (56, 23); this.button3.tabindex = 5; this.button3.text =" save "; this.button3.click = new system.eventhandler (this.button3_click); // // form1 // this.autoscalebasesize = new system.drawing.size (6, 14); this.clientsize = new system.drawing.size (584, 430); this.controls.add (this.button3); this.controls.add (this.richtextbox2); this.Controls.add (this.button2); this.controls.add (this.rich TEXTBOX1); this.controls.add (this.button1); this.controls.add (this.label1); this.maximizebox = false; this.name = "form1"; this.text = "form1"; // this .Load = new system.eventhandler (this.form1_load); this.ResumeLayout (false);} #ENDREGION
///
// Classify the word array, with a number to mark the categories of each word. String [,] TwoStringArray = StringArraytotwostringArray (StringArray);
// Used to output a two-dimensional array. PRINTSTRING (TwoStringArray);
} /// /// /// // One cycle is obtained by a word. For (int i = 0; i IF (Chartemp == ' ' || CHARTEMP == '*' || CHARTEMP == '/' || CHARTEMP == '=' || CHARTEMP == '<' || Chartemp == '>' || chartemp == '!') {stringsave = stringsave chartemp.tostring (); i = i 1; int test2 = 0; while (test2 == 0) {chartemp = getch [i ]; If (chartemp == ' ' || CHARTEMP == '-' || chartemp == '*' || chartemp == '/' || chartemp == '=' || CHARTEMP == '<' || CHARTEMP == '>' || chartemp == '!') {stringsave = stringsave chartemp.tostring (); i = i 1;} else test2 = 1;} StringToarRayString (ref stringarrange, stringsave);} StringsAve = ""; // The word consisting of the classifier. IF (chartemp == '(' || chartemp == ')' || chartemp == '{' || chartemp == '}' || chartemp == '[' || CHARTEMP == ']' || Chartemp == ',' || chartemp == ':' || chartemp == ';' || chartemp == '"|| chartemp ==' / '|| chartemp ==' // ') { Stringsave = stringsund chartemp.tostring (); StringToarRaystring (Ref stringarRaystring (ref stringarrange, stringsave);}} Return StringarRrange;} /// For (int i = 0; i || StringArray [I] == "[" || StringArray [i] == "]" || StringArray [i] == "," | | StringArray [i] == ";" || StringArray [i] == ":" | StringArray [i] == "/" || StringArray [i] == "/ *" || stringArray [i] == "* /") {twoarray [0, j] = "3"; twoarray [1, j] = StringArray [i]; this.onaaRraytotwo (Ref twoarray, refi);} // Number 4 else if (StringArray [i] .tochararray () [0]> = '0 '&& stringArray [i] .tochararray () [0] <=' 9 ') {twoarray [0, j] = "4"; // Digital Twoarray [1, j] = StringArray [i]; this.oneArraytotwo Ref twoarray, Ref j);} /} / other 5 (variables, etc.) else {twoarray [0, j] = "5"; twoarray [1, j] = stringArray [i]; this.onaArraytotwo (Ref twoarray, Ref j }} Return twoarray;}}}