Beispiel #1
0
 /// <summary>
 /// 设置此语法树显示器控件要监控的源代码控件
 /// </summary>
 /// <param name="sourceCodeViewer"></param>
 public void SetSourceCodeViewer(ISourceCodeVisable <TEnumTokenType, TEnumVType, TTreeNodeValue> sourceCodeViewer)
 {
     m_SourceCodeViewer = sourceCodeViewer;
     if (sourceCodeViewer != null && (!sourceCodeViewer.Contains(this)))
     {
         sourceCodeViewer.AddSyntaxTreeViewer(this);
     }
 }
Beispiel #2
0
        /// <summary>
        /// 单词列表窗口
        /// </summary>
        /// <param name="sourceCodeViewer"></param>
        public TokenListCGTextBoxForm(ISourceCodeVisable <EnumTokenTypeCG, EnumVTypeCG, TreeNodeValueCG> sourceCodeViewer)
        {
            InitializeComponent();

            this.txtTokenList.SetSourceCodeViewer(sourceCodeViewer);

            Application.Idle += new EventHandler(this.Application_Idle);
        }
 /// <summary>
 /// 设置所监视的源代码显示控件
 /// </summary>
 public void SetSourceCodeViewer(
     ISourceCodeVisable <TEnumTokenType, TEnumVType, TTreeNodeValue> value)
 {
     m_SourceCodeViewer = value;
     if (value != null && (!value.Contains(this)))
     {
         value.AddTokenListViewer(this);
     }
 }
Beispiel #4
0
        /// <summary>
        /// 语法树可视化控件
        /// </summary>
        /// <param name="sourceCodeViewer">源代码控件</param>
        public SyntaxTreeCGTreeViewForm(ISourceCodeVisable <EnumTokenTypeCG, EnumVTypeCG, TreeNodeValueCG> sourceCodeViewer)
        {
            InitializeComponent();

            this.trvSyntaxTree.SetSourceCodeViewer(sourceCodeViewer);
            //(this.trvSyntaxTree as ISyntaxTreeVisable<EnumTokenTypeCG, EnumVTypeCG>).SetSourceCodeViewer(sourceCodeViewer);

            Application.Idle += new EventHandler(this.Application_Idle);
        }