private void TextCode_TextChanged(object sender, EventArgs e) { if (_codeAnalyzer == null) { _codeAnalyzer = new CodeAnalyzer(); } _codeAnalyzer.Code = TextCode.Text; }
public static CodeAnalyzer CreateAnalyzerFromText(string text) { var analyzer = new CodeAnalyzer { Code = text }; return(analyzer); }
private void открытьToolStripMenuItem_Click(object sender, EventArgs e) { var openFileDialog = new OpenFileDialog { InitialDirectory = "D:\\", Filter = @"txt files (*.txt)|*.txt|All files (*.*)|*.*" }; if (openFileDialog.ShowDialog() == DialogResult.OK) { _codeAnalyzer = new CodeAnalyzer(openFileDialog.FileName); TextCode.Text = _codeAnalyzer.Code; } }