本文整理汇总了C#中IVsTextView.UpdateTipWindow方法的典型用法代码示例。如果您正苦于以下问题:C# IVsTextView.UpdateTipWindow方法的具体用法?C# IVsTextView.UpdateTipWindow怎么用?C# IVsTextView.UpdateTipWindow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IVsTextView
的用法示例。
在下文中一共展示了IVsTextView.UpdateTipWindow方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CheckCaretPosition
public void CheckCaretPosition (IVsTextView textView) {
if (textView == null) return;
int line, col, pos, space;
textView.GetCaretPos (out line, out col);
textView.GetNearestPosition(line, col, out pos, out space);
if (pos < this.pos || pos > this.pos + this.len) {
textView.UpdateTipWindow (this.textTipWindow, (uint)TipWindowFlags.UTW_DISMISS);
}
}
示例2: Update
public void Update(string text, int pos, int len, IVsTextView textView) {
if (textView == null) return;
this.pos = pos;
this.len = len;
this.text = text;
if (text == "" || text == null)
NativeHelpers.RaiseComError(HResult.E_FAIL);
textView.UpdateTipWindow(textTipWindow, (uint)TipWindowFlags.UTW_CONTEXTCHANGED | (uint)TipWindowFlags.UTW_CONTENTCHANGED);
this.isWindowUp = true;
}
示例3: Close
public void Close(IVsTextView textView) {
if (this.isWindowUp)
textView.UpdateTipWindow(this.textTipWindow, (uint)TipWindowFlags.UTW_DISMISS);
this.textTipWindow = null;
}
示例4: Update
/// <include file='doc\ViewFilter.uex' path='docs/doc[@for="TextTipData.Update"]/*' />
public void Update(string textValue, int pos, int len, IVsTextView textView) {
if (textView == null) return;
this.pos = pos;
this.len = len;
this.text = textValue;
if (textValue == null || textValue.Length == 0)
NativeHelpers.RaiseComError(NativeMethods.E_FAIL);
int hr = textView.UpdateTipWindow(textTipWindow, (uint)TipWindowFlags.UTW_CONTEXTCHANGED | (uint)TipWindowFlags.UTW_CONTENTCHANGED);
Debug.Assert(NativeMethods.Succeeded(hr), "UpdateTipWindow");
this.isWindowUp = true;
}
示例5: Close
/// <include file='doc\ViewFilter.uex' path='docs/doc[@for="TextTipData.Close"]/*' />
public void Close(IVsTextView textView) {
if (this.textTipWindow != null) {
if (this.isWindowUp)
NativeMethods.ThrowOnFailure(textView.UpdateTipWindow(this.textTipWindow, (uint)TipWindowFlags.UTW_DISMISS));
Marshal.ReleaseComObject(this.textTipWindow);
this.textTipWindow = null;
}
}
示例6: CheckCaretPosition
public void CheckCaretPosition(IVsTextView textView)
{
if (textView == null) return;
int line, col, pos, space;
var hr = textView.GetCaretPos(out line, out col);
if (NativeMethods.Failed(hr))
return;
NativeMethods.ThrowOnFailure(textView.GetNearestPosition(line, col, out pos, out space));
if (pos < this.pos || pos > this.pos + this.len)
{
NativeMethods.ThrowOnFailure(textView.UpdateTipWindow(this.textTipWindow, (uint)TipWindowFlags.UTW_DISMISS));
}
}