Exemplo n.º 1
0
        private void RefreshCodeView(SourceRef sourceCodeRef)
        {
            if (sourceCodeRef == m_PrevRef)
            {
                return;
            }

            m_PrevRef = sourceCodeRef;

            if (sourceCodeRef == null)
            {
                txtCodeView.Text = "!! NULL !!";
            }
            else
            {
                SourceCode sc = m_Script.GetSourceCode(sourceCodeRef.SourceIdx);
                //txtCodeView.Text = sc.Lines[sourceCodeRef.FromLine + 1] + "\n" +
                //	sourceCodeRef.ToString();
                txtCodeView.Text = sc.GetCodeSnippet(sourceCodeRef) + "\r\n\r\n" + sourceCodeRef.ToString();
            }
        }