예제 #1
0
 private void TextCode_TextChanged(object sender, EventArgs e)
 {
     if (_codeAnalyzer == null)
     {
         _codeAnalyzer = new CodeAnalyzer();
     }
     _codeAnalyzer.Code = TextCode.Text;
 }
예제 #2
0
        public static CodeAnalyzer CreateAnalyzerFromText(string text)
        {
            var analyzer = new CodeAnalyzer {
                Code = text
            };

            return(analyzer);
        }
예제 #3
0
        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;
            }
        }