public Form1() { InitializeComponent(); pathFile = ""; numberErrors = 0; this.control = new ControlCompile(this.richTextBox1, this.dataGridView1, ref this.numberErrors); }
private void button1_Click(object sender, EventArgs e) { this.control = new ControlCompile(this.richTextBox1, this.dataGridView1, ref this.numberErrors); int position = this.richTextBox1.SelectionStart; int line = this.richTextBox1.GetLineFromCharIndex(position) + 1; int column = position - this.richTextBox1.GetFirstCharIndexOfCurrentLine(); this.label2.Text = line.ToString(); this.label4.Text = column.ToString(); if (this.numberErrors <= 0) { MessageBox.Show("Se analizo con exito"); } else { MessageBox.Show("No se compilo con exito, Existen errores por arreglar"); } }