private void DisplayBlockDetails(VisualiserBlock block) { //display details IList <String> details = new List <String>(); details.Add(String.Format("Type: {0}", block.Type)); lstBlockDetails.DataSource = details; }
private void DisplayCurrentBlock() { if (lstBlockList.SelectedItem != null) { VisualiserBlock currentBlock = (VisualiserBlock)lstBlockList.SelectedItem; _suspendSourceSelectionChanged = true; DisplayBlockDetails(currentBlock); MarkBlockInSource(currentBlock); _suspendSourceSelectionChanged = false; } }
//marks the text of the specified block in the source private void MarkBlockInSource(VisualiserBlock block) { rtSource.Select(block.Position, block.Content.Length); rtSource.Focus(); }