private void _smartTagTimer_Tick(object sender, EventArgs e) { if (((((base.get_Document().get_Length() > 0) && this._textForSmartTagDirty) && ((DateTimeOffset.Now > this._lastChange.AddMilliseconds(500.0)) && (this._lastCursorPos == base.get_SelectedView().get_Selection().get_EndOffset()))) && !base.get_IntelliPrompt().get_SmartTag().get_Visible()) && (this._slowSmartTagCount < 2)) { CustomCSharpSyntaxLanguage language = base.get_Document().get_Language() as CustomCSharpSyntaxLanguage; if (language != null) { Stopwatch stopwatch = Stopwatch.StartNew(); try { language.ShowNamespaceSmartTag(this, this._lastCursorPos); } catch (ArgumentOutOfRangeException) { } stopwatch.Stop(); if ((stopwatch.ElapsedMilliseconds > 0x7d0L) || ((stopwatch.ElapsedMilliseconds > 500L) && !this._firstSmartTag)) { this._slowSmartTagCount += 2; } else if (!((stopwatch.ElapsedMilliseconds <= 100L) || this._firstSmartTag)) { this._slowSmartTagCount++; } this._firstSmartTag = false; } this._textForSmartTagDirty = false; } }
internal bool CheckSmartTagAtLocation(int location) { CustomCSharpSyntaxLanguage language = base.get_Document().get_Language() as CustomCSharpSyntaxLanguage; if (language == null) { return(false); } try { return(language.ShowNamespaceSmartTag(this, location)); } catch { return(false); } }