private void tvGrammar_AfterSelect(object sender, TreeViewEventArgs e) { if (e.Node == null) { return; } if (e.Node.Tag == null) { return; } if (tabMain.SelectedTab == tabMain_Parse) { if (e.Node.Tag != null) { IDE.Annotation an = (IDE.Annotation)e.Node.Tag; if (an.Element != null) { an = an.Element.Annotation; } if ((!tbSource_Selecting) && an.SourcePosition.IsInit) { an.SourcePosition.ToRTB(tbParse_Source); } if ((!tbCompiled_Selecting) && an.CompiledPosition.IsInit) { an.CompiledPosition.ToRTB(tbCompiled); } } } }
private void tbCompiled_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right) { if (_compile_tp.Item(tbCompiled.GetCharIndexFromPosition(e.Location), out _selectedAnnotation)) { _selectedAnnotation = _selectedAnnotation.FirstRunnable.Annotation; cmsRTF.Show(tbCompiled, e.X, e.Y); } } }
private void tvGrammar_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) { if (e.Button == MouseButtons.Right) { if (e.Node.Tag != null) { _selectedAnnotation = (IDE.Annotation)e.Node.Tag; if (_selectedAnnotation.FirstRunnable != null) { _selectedAnnotation = _selectedAnnotation.FirstRunnable.Annotation; cmsRTF.Show(tvGrammar, e.X, e.Y); } } } }
private void lvDebug_Runnables_MouseClick(object sender, MouseEventArgs e) { if (e.Button != MouseButtons.Right) { return; } var lvi = lvDebug_Runnables.GetItemAt(e.X, e.Y); if (lvi == null) { return; } _selectedAnnotation = (IDE.Annotation)lvi.Tag; cmsRTF.Show(lvDebug_Runnables, e.Location); }
private void tbParse_Source_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right) { if (_source_tp.Item(tbParse_Source.GetCharIndexFromPosition(e.Location), out _selectedAnnotation)) { tvGrammar.SelectedNode = _selectedAnnotation.TreeViewNode; if (_selectedAnnotation.FirstRunnable != null) { _selectedAnnotation = _selectedAnnotation.FirstRunnable.Annotation; } if (_selectedAnnotation.FirstRunnable != null) { cmsRTF.Show(tbParse_Source, e.X, e.Y); } } } }