public void ParseCode() { mPrometStrings.Clear(); mPrometStrings.AddRange(UConfig.KeyWords); int count = Coder.CodeManager.GetCodeCount(); for (int i = 0; i < count; i++) { UCodeLine line = Coder.CodeManager.GetCodeLine(i); int cutCount = line.GetCutCount(); for (int n = 0; n < cutCount; n++) { UCodeCut cut = line.GetCutByIndex(n); if (cut.CutType == UCutType.VariableName || cut.CutType == UCutType.ClassName || cut.CutType == UCutType.FunctionName) { if (!mPrometStrings.Contains(cut.Data)) { mPrometStrings.Add(cut.Data); } } } } }
private void RenderCodeLine(IRenderer renderer, float x, float y, UCodeLine line) { try { float renderX = x; int count = line.GetCutCount(); for (int i = 0; i < count; i++) { UCodeCut cut = line.GetCutByIndex(i); RenderCodeCut(renderer, renderX, y, cut); renderX = renderX + UHelper.GetAbsoluteLength(cut.Data) * renderer.CharWidth; } } catch (Exception ex) { throw ex; } }