编译原理经典算法的可视化实现 - 图文

编译原理经典算法的可视化实现 rtSource.Clear(); listShow.Items.Clear(); paint(); rtSource.Text = reader.ReadToEnd(); } } else {

return; }

}

private void rtSource_TextChanged(object sender, EventArgs e) {

rtSource.SelectionColor = Color.Black; if (this.rtSource.Text.Length == 0) {

this.toolExcute.Enabled = false; this.toolRecovery.Enabled = false; this.toolStop.Enabled = false; } else {

this.toolStop.Enabled = true; this.toolExcute.Enabled = true; this.toolRecovery.Enabled = true; } }

/*颜色改变*/

private void changecolor() {

rtSource.SelectionStart = i-1; rtSource.SelectionLength = 1;

rtSource.SelectionColor = Color.Red; i++; }

/*文件删除*/

33

编译原理经典算法的可视化实现 /*实现执行*/ private void fileSave() { if (File.Exists(\)) File.Delete(\); FileStream fs = new FileStream(\, FileMode.OpenOrCreate, FileAccess.Write); StreamWriter m_streamWriter = new StreamWriter(fs); m_streamWriter.Flush(); m_streamWriter.BaseStream.Seek(0, SeekOrigin.Begin); m_streamWriter.Write(rtSource.Text); m_streamWriter.Flush(); m_streamWriter.Close();

}

>>灞曞紑鍏ㄦ枃<<
12@gma联系客服:779662525#qq.com(#替换为@)