public void ClearErrors() { foreach (TabItem page in tabStrip1.Tabs) { foreach (Control ctl in page.AttachedControl.Controls) { if (ctl.GetType() == typeof(ucFunction)) { SpanIndicatorLayer layer = ((ucFunction)ctl).syntaxEditor1.Document.SpanIndicatorLayers[ErrorLayerKey]; if (layer != null) layer.Clear(); break; } } } if (listErrors.InvokeRequired) { CrossThreadHelper.CallCrossThreadMethod(listErrors.Items, "Clear", null); } else { listErrors.Items.Clear(); } }
private void ClearErrors() { errors.Clear(); errorTreeList.Nodes.Clear(); SpanIndicatorLayer indicatorLayer = editor.Document.SpanIndicatorLayers[ErrorLayerKey]; if (indicatorLayer != null) { indicatorLayer.Clear(); } }